Re: Remove default privilege from DB

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Durumdara <durumdara(at)gmail(dot)com>, Charles Clavadetscher <clavadetscher(at)swisspug(dot)org>, Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Remove default privilege from DB
Date: 2018-02-16 15:59:24
Message-ID: 20180216155924.GJ2416@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom,

* Tom Lane (tgl(at)sss(dot)pgh(dot)pa(dot)us) wrote:
> Stephen Frost <sfrost(at)snowman(dot)net> writes:
> > * David G. Johnston (david(dot)g(dot)johnston(at)gmail(dot)com) wrote:
> >> ​Not sure if this is what you mean but there is no concept of "negative
> >> state" in the permissions system. Everything starts out with no
> >> permissions. Grant adds permissions and revoke un-adds granted
> >> permissions.​ Revoking something that doesn't exist is either a no-op or a
> >> warning depending on the context - either way its doesn't setup a
> >> "forbidden" state for the permission.
>
> > This isn't entirely correct. Functions are the classic example where
> > EXECUTE to PUBLIC is part of the default and the "negative" state of
> > having a function where EXECUTE is REVOKE'd from PUBLIC is entirely
> > reasonable and even common.
>
> FWIW, I thought David's description was fine. The fact that the initial
> state of an object typically includes some positive grants doesn't change
> the fact that there's no such thing as a negative grant. In particular,
> if there is a GRANT TO PUBLIC, no amount of revoking that privilege from
> individual users will have any effect, because the public grant is still
> there.

What I was particularly picking up on was the comment that "Everything
starts out with no permissions" which implied, at least to me, the idea
that no one has any rights on an object until those rights are GRANT'd,
which isn't correct, as I described.

Thanks!

Stephen

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Melvin Davidson 2018-02-16 16:06:29 Re: Database health check/auditing
Previous Message Tom Lane 2018-02-16 15:47:51 Re: Remove default privilege from DB