pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
How to control pg_catalog results for each users?
6+ messages / 5 participants
[nested] [flat]

* How to control pg_catalog results for each users?
@ 2023-01-30 05:00 hirose shigeo(廣瀬 繁雄 □SWC○ACT) <shigeo.hirose@toshiba.co.jp>
  2023-01-30 05:23 ` Re: How to control pg_catalog results for each users? David G. Johnston <david.g.johnston@gmail.com>
  2023-01-30 08:41 ` Re: How to control pg_catalog results for each users? Laurenz Albe <laurenz.albe@cybertec.at>
  0 siblings, 2 replies; 6+ messages in thread

From: hirose shigeo(廣瀬 繁雄 □SWC○ACT) @ 2023-01-30 05:00 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

Hello,

PostgreSQL provides pg_catalog as a system catalog.
However, PostgreSQL does not allow different users to retrieve different 
table structures or table names using pg_catalog.
For example, when SELECT * FROM pg_catalog.pg_tables is executed by 
User1 and User2, it is not possible to get different results.
In PostgreSQL, row-level security can be used to control rows in normal 
tables.
However, row-level security is not possible to set this for pg_catalog, 
and all users can get the all of table name , table structure and other 
information from pg_catalog, which is considered a security problem.
(REVOKE to the system catalog is not restricted, REVOKE can control 
access to system catalogs on a per-table basis)

Has there been any discussion or development on controlling this system 
catalog information on a per-user basis?

Regards,

Shigeo Hirose






^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: How to control pg_catalog results for each users?
  2023-01-30 05:00 How to control pg_catalog results for each users? hirose shigeo(廣瀬 繁雄 □SWC○ACT) <shigeo.hirose@toshiba.co.jp>
@ 2023-01-30 05:23 ` David G. Johnston <david.g.johnston@gmail.com>
  2023-01-30 05:48   ` Re: How to control pg_catalog results for each users? Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 1 reply; 6+ messages in thread

From: David G. Johnston @ 2023-01-30 05:23 UTC (permalink / raw)
  To: hirose shigeo(廣瀬 繁雄 □SWC○ACT) <shigeo.hirose@toshiba.co.jp>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

On Sunday, January 29, 2023, hirose shigeo(廣瀬 繁雄 □SWC○ACT) <
shigeo.hirose@toshiba.co.jp> wrote:

>
> Has there been any discussion or development on controlling this system
> catalog information on a per-user


>
I found this one:


https://www.postgresql.org/message-id/flat/20160107032927.GT3685%40tamriel.snowman.net#6d9e59a0d052e...



David J.

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: How to control pg_catalog results for each users?
  2023-01-30 05:00 How to control pg_catalog results for each users? hirose shigeo(廣瀬 繁雄 □SWC○ACT) <shigeo.hirose@toshiba.co.jp>
  2023-01-30 05:23 ` Re: How to control pg_catalog results for each users? David G. Johnston <david.g.johnston@gmail.com>
@ 2023-01-30 05:48   ` Tom Lane <tgl@sss.pgh.pa.us>
  2023-01-31 09:31     ` Re: How to control pg_catalog results for each users? hirose shigeo(廣瀬 繁雄 □SWC○ACT) <shigeo.hirose@toshiba.co.jp>
  0 siblings, 1 reply; 6+ messages in thread

From: Tom Lane @ 2023-01-30 05:48 UTC (permalink / raw)
  To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: hirose shigeo(廣瀬 繁雄 □SWC○ACT) <shigeo.hirose@toshiba.co.jp>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Sunday, January 29, 2023, hirose shigeo(廣瀬 繁雄 □SWC○ACT) <
> shigeo.hirose@toshiba.co.jp> wrote:
>> Has there been any discussion or development on controlling this system
>> catalog information on a per-user

> I found this one:
> https://www.postgresql.org/message-id/flat/20160107032927.GT3685%40tamriel.snowman.net#6d9e59a0d052e...

There have been a ton of discussions around this area over the years.
The short answer is that if you think you need to prevent people
from seeing the contents of the system catalogs, Postgres is not
the database for you.  I don't really foresee that changing, because
it would break at least as many use-cases as it would enable.  The
thread David referenced only talks about side-effects on pg_dump,
but there are many other applications that would be just as broken
if we restricted this.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: How to control pg_catalog results for each users?
  2023-01-30 05:00 How to control pg_catalog results for each users? hirose shigeo(廣瀬 繁雄 □SWC○ACT) <shigeo.hirose@toshiba.co.jp>
  2023-01-30 05:23 ` Re: How to control pg_catalog results for each users? David G. Johnston <david.g.johnston@gmail.com>
  2023-01-30 05:48   ` Re: How to control pg_catalog results for each users? Tom Lane <tgl@sss.pgh.pa.us>
@ 2023-01-31 09:31     ` hirose shigeo(廣瀬 繁雄 □SWC○ACT) <shigeo.hirose@toshiba.co.jp>
  0 siblings, 0 replies; 6+ messages in thread

From: hirose shigeo(廣瀬 繁雄 □SWC○ACT) @ 2023-01-31 09:31 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: hirose shigeo(廣瀬 繁雄 □SWC○ACT) <shigeo.hirose@toshiba.co.jp>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

> There have been a ton of discussions around this area over the years.
> The short answer is that if you think you need to prevent people
> from seeing the contents of the system catalogs, Postgres is not
> the database for you.  I don't really foresee that changing, because
> it would break at least as many use-cases as it would enable.  The
> thread David referenced only talks about side-effects on pg_dump,
> but there are many other applications that would be just as broken
> if we restricted this.

Thank you for information.
I understood community's concern and policy.

Regards,
Shigeo Hirose






^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: How to control pg_catalog results for each users?
  2023-01-30 05:00 How to control pg_catalog results for each users? hirose shigeo(廣瀬 繁雄 □SWC○ACT) <shigeo.hirose@toshiba.co.jp>
@ 2023-01-30 08:41 ` Laurenz Albe <laurenz.albe@cybertec.at>
  2023-01-30 13:18   ` Re: How to control pg_catalog results for each users? Ron <ronljohnsonjr@gmail.com>
  1 sibling, 1 reply; 6+ messages in thread

From: Laurenz Albe @ 2023-01-30 08:41 UTC (permalink / raw)
  To: hirose shigeo(廣瀬 繁雄 □SWC○ACT) <shigeo.hirose@toshiba.co.jp>; pgsql-general@lists.postgresql.org

On Mon, 2023-01-30 at 14:00 +0900, hirose shigeo(廣瀬 繁雄 □SWC○ACT) wrote:
> all users can get the all of table name , table structure and other 
> information from pg_catalog, which is considered a security problem.

The belief that restricting that will improve security goes by the name
of "security by obscurity", which is usually not considered robust.

Yours,
Laurenz Albe





^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: How to control pg_catalog results for each users?
  2023-01-30 05:00 How to control pg_catalog results for each users? hirose shigeo(廣瀬 繁雄 □SWC○ACT) <shigeo.hirose@toshiba.co.jp>
  2023-01-30 08:41 ` Re: How to control pg_catalog results for each users? Laurenz Albe <laurenz.albe@cybertec.at>
@ 2023-01-30 13:18   ` Ron <ronljohnsonjr@gmail.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Ron @ 2023-01-30 13:18 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

On 1/30/23 02:41, Laurenz Albe wrote:
> On Mon, 2023-01-30 at 14:00 +0900, hirose shigeo(廣瀬 繁雄 □SWC○ACT) wrote:
>> all users can get the all of table name , table structure and other
>> information from pg_catalog, which is considered a security problem.
> The belief that restricting that will improve security goes by the name
> of "security by obscurity", which is usually not considered robust.

Your description sounds a whole lot like PostgreSQL's row level security.

-- 
Born in Arizona, moved to Babylonia.





^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2023-01-31 09:31 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-01-30 05:00 How to control pg_catalog results for each users? hirose shigeo(廣瀬 繁雄 □SWC○ACT) <shigeo.hirose@toshiba.co.jp>
2023-01-30 05:23 ` David G. Johnston <david.g.johnston@gmail.com>
2023-01-30 05:48   ` Tom Lane <tgl@sss.pgh.pa.us>
2023-01-31 09:31     ` hirose shigeo(廣瀬 繁雄 □SWC○ACT) <shigeo.hirose@toshiba.co.jp>
2023-01-30 08:41 ` Laurenz Albe <laurenz.albe@cybertec.at>
2023-01-30 13:18   ` Ron <ronljohnsonjr@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox