pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
dropped users appear as numbers in ACL
5+ messages / 3 participants
[nested] [flat]

* dropped users appear as numbers in ACL
@ 2003-11-13 20:36 DHS Webmaster <webmaster@dhs-club.com>
  2003-11-13 20:54 ` Re: dropped users appear as numbers in ACL Peter Eisentraut <peter_e@gmx.net>
  0 siblings, 1 reply; 5+ messages in thread

From: DHS Webmaster @ 2003-11-13 20:36 UTC (permalink / raw)
  To: pgsql-admin

I have experienced this in the past with members of groups, but now with
relation ACLs. It goes like this:
Certain users are given specific permissions of different tables and
such.
The users are later dropped but reference to them remains in the ACL as
their former ID number.
When trying to revoke permissions on the number, it fails.
I noticed this with groups in the past and have become accustomed to
deleting these users from the groups before dropping them. Otherwise I
had to create dummy users with those IDs, go about cleaning things out
and then drop the dummy user.
Will I have to perform this same procedure for ACLs?
Are there any plans to handle these issues transparently when a user is
dropped?
-- 
Bill MacArthur
Webmaster
DHS Club



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

* Re: dropped users appear as numbers in ACL
  2003-11-13 20:36 dropped users appear as numbers in ACL DHS Webmaster <webmaster@dhs-club.com>
@ 2003-11-13 20:54 ` Peter Eisentraut <peter_e@gmx.net>
  2003-11-13 23:57   ` Re: dropped users appear as numbers in ACL Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 5+ messages in thread

From: Peter Eisentraut @ 2003-11-13 20:54 UTC (permalink / raw)
  To: DHS Webmaster <webmaster@dhs-club.com>; +Cc: pgsql-admin

DHS Webmaster writes:

> I noticed this with groups in the past and have become accustomed to
> deleting these users from the groups before dropping them. Otherwise I
> had to create dummy users with those IDs, go about cleaning things out
> and then drop the dummy user.
> Will I have to perform this same procedure for ACLs?

Yes.

> Are there any plans to handle these issues transparently when a user is
> dropped?

"Wishlist" maybe, but no concrete plans.

-- 
Peter Eisentraut   peter_e@gmx.net




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

* Re: dropped users appear as numbers in ACL
  2003-11-13 20:36 dropped users appear as numbers in ACL DHS Webmaster <webmaster@dhs-club.com>
  2003-11-13 20:54 ` Re: dropped users appear as numbers in ACL Peter Eisentraut <peter_e@gmx.net>
@ 2003-11-13 23:57   ` Tom Lane <tgl@sss.pgh.pa.us>
  2003-11-14 00:10     ` Re: dropped users appear as numbers in ACL Peter Eisentraut <peter_e@gmx.net>
  0 siblings, 1 reply; 5+ messages in thread

From: Tom Lane @ 2003-11-13 23:57 UTC (permalink / raw)
  To: Peter Eisentraut <peter_e@gmx.net>; +Cc: DHS Webmaster <webmaster@dhs-club.com>; pgsql-admin

Peter Eisentraut <peter_e@gmx.net> writes:
> DHS Webmaster writes:
>> Are there any plans to handle these issues transparently when a user is
>> dropped?

> "Wishlist" maybe, but no concrete plans.

The reason it's difficult is that users span databases; when you drop a
user in database A, you have no way of seeing/removing references to him
that exist in databases B, C, ...

I'm not sure there's any really good answer to this short of changing
the way that users and databases work, which so far no one has wanted
to do.

			regards, tom lane



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

* Re: dropped users appear as numbers in ACL
  2003-11-13 20:36 dropped users appear as numbers in ACL DHS Webmaster <webmaster@dhs-club.com>
  2003-11-13 20:54 ` Re: dropped users appear as numbers in ACL Peter Eisentraut <peter_e@gmx.net>
  2003-11-13 23:57   ` Re: dropped users appear as numbers in ACL Tom Lane <tgl@sss.pgh.pa.us>
@ 2003-11-14 00:10     ` Peter Eisentraut <peter_e@gmx.net>
  2003-11-14 00:18       ` Re: dropped users appear as numbers in ACL Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 5+ messages in thread

From: Peter Eisentraut @ 2003-11-14 00:10 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: DHS Webmaster <webmaster@dhs-club.com>; pgsql-admin

Tom Lane writes:

> The reason it's difficult is that users span databases; when you drop a
> user in database A, you have no way of seeing/removing references to him
> that exist in databases B, C, ...
>
> I'm not sure there's any really good answer to this short of changing
> the way that users and databases work, which so far no one has wanted
> to do.

One possibility would be to have an explicit "flush privileges" command
that you can run over a database to clean up after this.  That might also
help to support grant options on groups, which suffer from a similar
can't-look-into-other-databases problem.

-- 
Peter Eisentraut   peter_e@gmx.net




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

* Re: dropped users appear as numbers in ACL
  2003-11-13 20:36 dropped users appear as numbers in ACL DHS Webmaster <webmaster@dhs-club.com>
  2003-11-13 20:54 ` Re: dropped users appear as numbers in ACL Peter Eisentraut <peter_e@gmx.net>
  2003-11-13 23:57   ` Re: dropped users appear as numbers in ACL Tom Lane <tgl@sss.pgh.pa.us>
  2003-11-14 00:10     ` Re: dropped users appear as numbers in ACL Peter Eisentraut <peter_e@gmx.net>
@ 2003-11-14 00:18       ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2003-11-14 00:18 UTC (permalink / raw)
  To: Peter Eisentraut <peter_e@gmx.net>; +Cc: DHS Webmaster <webmaster@dhs-club.com>; pgsql-admin

Peter Eisentraut <peter_e@gmx.net> writes:
> Tom Lane writes:
>> I'm not sure there's any really good answer to this short of changing
>> the way that users and databases work, which so far no one has wanted
>> to do.

> One possibility would be to have an explicit "flush privileges" command
> that you can run over a database to clean up after this.  That might also
> help to support grant options on groups, which suffer from a similar
> can't-look-into-other-databases problem.

One thing that would go a long way towards alleviating the problem is to
get rid of user-selectable sysids for users and groups, and instead assign
the sysids from a cluster-wide sequence (or equivalently, revert to
using OIDs as user/group identifiers).  Then dead privileges wouldn't
come back to life as belonging to some newly-created user.  You could
imagine making vacuum delete ACL entries for no-longer-known users,
or put it into a separate cleanup operation as Peter suggests.

However, that has its own downside.  IIRC, the reason we haven't done
this already is that if you unintentionally drop a user who still owns
objects, it's nice to be able to resurrect him with the same sysid.
The cross-database problem makes it hard to prevent such mistakes with
dependencies.

Maybe rather than a flat prohibition of WITH SYSID, just change the
default assignment to be from a sequence rather than the error-prone
MAX()+1 behavior?

			regards, tom lane



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


end of thread, other threads:[~2003-11-14 00:18 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-11-13 20:36 dropped users appear as numbers in ACL DHS Webmaster <webmaster@dhs-club.com>
2003-11-13 20:54 ` Peter Eisentraut <peter_e@gmx.net>
2003-11-13 23:57   ` Tom Lane <tgl@sss.pgh.pa.us>
2003-11-14 00:10     ` Peter Eisentraut <peter_e@gmx.net>
2003-11-14 00:18       ` Tom Lane <tgl@sss.pgh.pa.us>

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