pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Stephen Frost <sfrost@snowman.net>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: Durumdara <durumdara@gmail.com>
Cc: Charles Clavadetscher <clavadetscher@swisspug.org>
Cc: Postgres General <pgsql-general@postgresql.org>
Subject: Re: Remove default privilege from DB
Date: Fri, 16 Feb 2018 10:47:51 -0500
Message-ID: <15452.1518796071@sss.pgh.pa.us> (raw)
In-Reply-To: <20180216153528.GI2416@tamriel.snowman.net>
References: <CAEcMXhn2uWDFyQ=dLzeEhdoyuvqvgYaLnOZbVmY+g3oR_NKr3g@mail.gmail.com>
	<09ca01d3a3e0$685ca460$3915ed20$@swisspug.org>
	<CAEcMXhm5sb-cw1Yek2T7dGnWJRP8-6Vr7kreQAC1Q-CY8VY=pw@mail.gmail.com>
	<0f5a01d3a65f$a0a38010$e1ea8030$@swisspug.org>
	<CAEcMXhk8YVgiQSD4V9mnk6ex1FxSSxK_zx24SmrWR-fvUs3Ckg@mail.gmail.com>
	<CAEcMXhm4=GhR4fe6UDn5jq+mWikJnmAqiztfAwM6i-z5Z3hCLQ@mail.gmail.com>
	<CAEcMXhnh1sOz10U3-bDFMmCYgmfC6sCQiK4zy-z7oBJMQBmmZQ@mail.gmail.com>
	<CAKFQuwZua8+4ww+HJ1kTUw=ZSBxrsFxoKauxVGhwWRKtDgVouA@mail.gmail.com>
	<20180216153528.GI2416@tamriel.snowman.net>

Stephen Frost <sfrost@snowman.net> writes:
> * David G. Johnston (david.g.johnston@gmail.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.

			regards, tom lane




view thread (12+ messages)  latest in thread

Message-ID: <15452.1518796071@sss.pgh.pa.us>
Permalink:  ../15452.1518796071@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/15452.1518796071@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, sfrost@snowman.net, david.g.johnston@gmail.com, durumdara@gmail.com, clavadetscher@swisspug.org
  Subject: Re: Remove default privilege from DB
  In-Reply-To: <15452.1518796071@sss.pgh.pa.us>
  References: <CAEcMXhn2uWDFyQ=dLzeEhdoyuvqvgYaLnOZbVmY+g3oR_NKr3g@mail.gmail.com> <09ca01d3a3e0$685ca460$3915ed20$@swisspug.org> <CAEcMXhm5sb-cw1Yek2T7dGnWJRP8-6Vr7kreQAC1Q-CY8VY=pw@mail.gmail.com> <0f5a01d3a65f$a0a38010$e1ea8030$@swisspug.org> <CAEcMXhk8YVgiQSD4V9mnk6ex1FxSSxK_zx24SmrWR-fvUs3Ckg@mail.gmail.com> <CAEcMXhm4=GhR4fe6UDn5jq+mWikJnmAqiztfAwM6i-z5Z3hCLQ@mail.gmail.com> <CAEcMXhnh1sOz10U3-bDFMmCYgmfC6sCQiK4zy-z7oBJMQBmmZQ@mail.gmail.com> <CAKFQuwZua8+4ww+HJ1kTUw=ZSBxrsFxoKauxVGhwWRKtDgVouA@mail.gmail.com> <20180216153528.GI2416@tamriel.snowman.net> <15452.1518796071@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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