RE: How to revoke privileged from PostgreSQL's superuser - Mailing list pgsql-admin

From Charles Clavadetscher
Subject RE: How to revoke privileged from PostgreSQL's superuser
Date
Msg-id 04b601d42d70$e1f9ab50$a5ed01f0$@swisspug.org
Whole thread Raw
In response to How to revoke privileged from PostgreSQL's superuser  (bejita0409@yahoo.co.jp)
List pgsql-admin

Hello

 

From: bejita0409@yahoo.co.jp [mailto:bejita0409@yahoo.co.jp]
Sent: Montag, 6. August 2018 11:49
To: pgsql-admin@lists.postgresql.org; pgsql-general@lists.postgresql.org
Subject: How to revoke privileged from PostgreSQL's superuser

 

Hello,

 

I am a newbie DBA.

 

I have a request for revoking the access to user's data from DBA-user.

I think the request is right because users should be the only ones can access their data.

But DBA-user also need full access to the other data? It means that DBA-user also needs to be a superuser.

 

So I conclude the request that how to revoke privileged from superuser in postgres.

 

As my knowledge, the superuser in PostgreSQL bypasses all the permission check.

So that, there is no way to do it in PostgreSQL, is that right?

 

Yes, superuser have access to everything. The main question is why should a superuser be restricted in her access to an object?

I think that this is more a question of designing your user and groups in a clean way.

 

In theory you could restrict access using a before trigger, but this is not a good idea and is quite expensive.

You could also use a policy for the superuser with the clause using(false), but this also is not really a good idea and may become very confusing.

 

In either way, this would not be a good solution.

 

Maybe, if you clarify better what is your purpose, there might be more useful answers and approaches.

 

Regards

Charles

 

Is there some DBAs are faced with this before?

 

 

Thanks,

--

bejita

pgsql-admin by date:

Previous
From: "Jehan-Guillaume (ioguix) de Rorthais"
Date:
Subject: Re: PostgreSQL 11 global index
Next
From: "David G. Johnston"
Date:
Subject: Re: How to revoke privileged from PostgreSQL's superuser