pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedsystem catalog permissions
6+ messages / 6 participants
[nested] [flat]
* system catalog permissions
@ 2018-02-26 23:11 PropAAS DBA <dba@propaas.com>
2018-02-26 23:43 ` Re: system catalog permissions Joshua D. Drake <jd@commandprompt.com>
2018-02-26 23:47 ` Re: system catalog permissions Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 2 replies; 6+ messages in thread
From: PropAAS DBA @ 2018-02-26 23:11 UTC (permalink / raw)
To: pgsql-general
All;
We have a client which is segmenting their multi-tenant cluster
(PostgreSQL 9.6) by schema, however if one of their clients connects via
pgadmin they see ALL schemas, even the ones they don't have access to
read. I assume pgadmin is pulling the list from the system catalogs.
What's the right/best practice approach? revoke all from public on
specific system catalog tables? Which tables?
Thanks in advance
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: system catalog permissions
2018-02-26 23:11 system catalog permissions PropAAS DBA <dba@propaas.com>
@ 2018-02-26 23:43 ` Joshua D. Drake <jd@commandprompt.com>
1 sibling, 0 replies; 6+ messages in thread
From: Joshua D. Drake @ 2018-02-26 23:43 UTC (permalink / raw)
To: PropAAS DBA <dba@propaas.com>; pgsql-general
On 02/26/2018 03:11 PM, PropAAS DBA wrote:
> All;
>
>
> We have a client which is segmenting their multi-tenant cluster
> (PostgreSQL 9.6) by schema, however if one of their clients connects
> via pgadmin they see ALL schemas, even the ones they don't have access
> to read. I assume pgadmin is pulling the list from the system catalogs.
>
>
> What's the right/best practice approach? revoke all from public on
> specific system catalog tables? Which tables?
AFAIK, you can not hide the list of schemas but you can prevent people
from entering them.
JD
>
>
> Thanks in advance
>
>
--
Command Prompt, Inc. || http://the.postgres.company/ || @cmdpromptinc
PostgreSQL centered full stack support, consulting and development.
Advocate: @amplifypostgres || Learn: https://postgresconf.org
***** Unless otherwise stated, opinions are my own. *****
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: system catalog permissions
2018-02-26 23:11 system catalog permissions PropAAS DBA <dba@propaas.com>
@ 2018-02-26 23:47 ` Tom Lane <tgl@sss.pgh.pa.us>
2018-02-26 23:55 ` Re: system catalog permissions Paul Jungwirth <pj@illuminatedcomputing.com>
1 sibling, 1 reply; 6+ messages in thread
From: Tom Lane @ 2018-02-26 23:47 UTC (permalink / raw)
To: PropAAS DBA <dba@propaas.com>; +Cc: pgsql-general
PropAAS DBA <dba@propaas.com> writes:
> We have a client which is segmenting their multi-tenant cluster
> (PostgreSQL 9.6) by schema, however if one of their clients connects via
> pgadmin they see ALL schemas, even the ones they don't have access to
> read. I assume pgadmin is pulling the list from the system catalogs.
> What's the right/best practice approach? revoke all from public on
> specific system catalog tables? Which tables?
Messing with the system catalog permissions is likely to break stuff
you'd rather not break.
PG generally doesn't assume that anything in the system catalogs is
sensitive. If you don't want user A looking at user B's catalog
entries, give them separate databases, not just separate schemas.
regards, tom lane
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: system catalog permissions
2018-02-26 23:11 system catalog permissions PropAAS DBA <dba@propaas.com>
2018-02-26 23:47 ` Re: system catalog permissions Tom Lane <tgl@sss.pgh.pa.us>
@ 2018-02-26 23:55 ` Paul Jungwirth <pj@illuminatedcomputing.com>
2018-02-27 00:50 ` Re: system catalog permissions David G. Johnston <david.g.johnston@gmail.com>
0 siblings, 1 reply; 6+ messages in thread
From: Paul Jungwirth @ 2018-02-26 23:55 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
On 02/26/2018 03:47 PM, Tom Lane wrote:
> PropAAS DBA <dba@propaas.com> writes:
>> We have a client which is segmenting their multi-tenant cluster
>> (PostgreSQL 9.6) by schema, however if one of their clients connects via
>> pgadmin they see ALL schemas, even the ones they don't have access to
>> read.
> PG generally doesn't assume that anything in the system catalogs is
> sensitive. If you don't want user A looking at user B's catalog
> entries, give them separate databases, not just separate schemas.
I'm sure this is what you meant, but you need to give them separate
*clusters*, right? Even with separate databases you can still get a list
of the other databases and other roles in the cluster. I would actually
love to be mistaken but when I looked at it a year or two ago I couldn't
find a way to lock that down (without breaking a lot of tools anyway).
Thanks!
--
Paul ~{:-)
pj@illuminatedcomputing.com
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: system catalog permissions
2018-02-26 23:11 system catalog permissions PropAAS DBA <dba@propaas.com>
2018-02-26 23:47 ` Re: system catalog permissions Tom Lane <tgl@sss.pgh.pa.us>
2018-02-26 23:55 ` Re: system catalog permissions Paul Jungwirth <pj@illuminatedcomputing.com>
@ 2018-02-27 00:50 ` David G. Johnston <david.g.johnston@gmail.com>
2018-02-27 02:24 ` Re: system catalog permissions Melvin Davidson <melvin6925@gmail.com>
0 siblings, 1 reply; 6+ messages in thread
From: David G. Johnston @ 2018-02-27 00:50 UTC (permalink / raw)
To: Paul Jungwirth <pj@illuminatedcomputing.com>; +Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
On Mon, Feb 26, 2018 at 4:55 PM, Paul Jungwirth <pj@illuminatedcomputing.com
> wrote:
> On 02/26/2018 03:47 PM, Tom Lane wrote:
>
>> PropAAS DBA <dba@propaas.com> writes:
>>
>>> We have a client which is segmenting their multi-tenant cluster
>>> (PostgreSQL 9.6) by schema, however if one of their clients connects via
>>> pgadmin they see ALL schemas, even the ones they don't have access to
>>> read.
>>>
>> PG generally doesn't assume that anything in the system catalogs is
>> sensitive. If you don't want user A looking at user B's catalog
>> entries, give them separate databases, not just separate schemas.
>>
>
> I'm sure this is what you meant, but you need to give them separate
> *clusters*, right? Even with separate databases you can still get a list of
> the other databases and other roles in the cluster. I would actually love
> to be mistaken but when I looked at it a year or two ago I couldn't find a
> way to lock that down (without breaking a lot of tools anyway).
>
Yes, both the database and role namespace is global to an individual
cluster. Its another level of trade-off; database and role names could
realistically and easily be done UUID-style so knowing the labels doesn't
really tell anything except a vague impression of host size.
Assuming clients don't want to see their log files...
David J.
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: system catalog permissions
2018-02-26 23:11 system catalog permissions PropAAS DBA <dba@propaas.com>
2018-02-26 23:47 ` Re: system catalog permissions Tom Lane <tgl@sss.pgh.pa.us>
2018-02-26 23:55 ` Re: system catalog permissions Paul Jungwirth <pj@illuminatedcomputing.com>
2018-02-27 00:50 ` Re: system catalog permissions David G. Johnston <david.g.johnston@gmail.com>
@ 2018-02-27 02:24 ` Melvin Davidson <melvin6925@gmail.com>
0 siblings, 0 replies; 6+ messages in thread
From: Melvin Davidson @ 2018-02-27 02:24 UTC (permalink / raw)
To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: Paul Jungwirth <pj@illuminatedcomputing.com>; pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
On Mon, Feb 26, 2018 at 7:50 PM, David G. Johnston <
david.g.johnston@gmail.com> wrote:
> On Mon, Feb 26, 2018 at 4:55 PM, Paul Jungwirth <
> pj@illuminatedcomputing.com> wrote:
>
>> On 02/26/2018 03:47 PM, Tom Lane wrote:
>>
>>> PropAAS DBA <dba@propaas.com> writes:
>>>
>>>> We have a client which is segmenting their multi-tenant cluster
>>>> (PostgreSQL 9.6) by schema, however if one of their clients connects via
>>>> pgadmin they see ALL schemas, even the ones they don't have access to
>>>> read.
>>>>
>>> PG generally doesn't assume that anything in the system catalogs is
>>> sensitive. If you don't want user A looking at user B's catalog
>>> entries, give them separate databases, not just separate schemas.
>>>
>>
>> I'm sure this is what you meant, but you need to give them separate
>> *clusters*, right? Even with separate databases you can still get a list of
>> the other databases and other roles in the cluster. I would actually love
>> to be mistaken but when I looked at it a year or two ago I couldn't find a
>> way to lock that down (without breaking a lot of tools anyway).
>>
>
> Yes, both the database and role namespace is global to an individual
> cluster. Its another level of trade-off; database and role names could
> realistically and easily be done UUID-style so knowing the labels doesn't
> really tell anything except a vague impression of host size.
>
> Assuming clients don't want to see their log files...
>
> David J.
>
>
>... both the database and role namespace is global to an individual
cluster
*Slight correction to that.*
*https://www.postgresql.org/docs/10/static/runtime-config-connection.html
<https://www.postgresql.org/docs/10/static/runtime-config-connection.html>by
defaultdb_user_namespace = off *
*However, if set = on, then " you should create users as username@dbname "
which makes role names specific to each database.*
--
*Melvin Davidson*
*Maj. Database & Exploration Specialist*
*Universe Exploration Command – UXC*
Employment by invitation only!
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2018-02-27 02:24 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-02-26 23:11 system catalog permissions PropAAS DBA <dba@propaas.com>
2018-02-26 23:43 ` Joshua D. Drake <jd@commandprompt.com>
2018-02-26 23:47 ` Tom Lane <tgl@sss.pgh.pa.us>
2018-02-26 23:55 ` Paul Jungwirth <pj@illuminatedcomputing.com>
2018-02-27 00:50 ` David G. Johnston <david.g.johnston@gmail.com>
2018-02-27 02:24 ` Melvin Davidson <melvin6925@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