Re: BUG #2516: group privs do not seem to be honored - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #2516: group privs do not seem to be honored
Date
Msg-id 24247.1152839299@sss.pgh.pa.us
Whole thread Raw
In response to BUG #2516: group privs do not seem to be honored  ("Sam Howard" <sam.howard@gmxtechnologies.com>)
List pgsql-bugs
"Sam Howard" <sam.howard@gmxtechnologies.com> writes:
> Trying to implement user level access and security, and am finding
> unexpected behavior with respect to group roles.

I believe the problem is here:

> CREATE ROLE appuser LOGIN
>   ENCRYPTED PASSWORD 'mdblahblahblah'
>   NOSUPERUSER NOINHERIT NOCREATEDB NOCREATEROLE;
                ^^^^^^^^^
> GRANT db_group TO appuser;

The behavior you're expecting requires appuser to be marked INHERIT.
As the CREATE ROLE man page explains:

    A role with the INHERIT attribute can automatically use whatever
    database privileges have been granted to all roles it is
    directly or indirectly a member of. Without INHERIT, membership
    in another role only grants the ability to SET ROLE to that
    other role; the privileges of the other role are only available
    after having done so. If not specified, INHERIT is the default.

            regards, tom lane

PS: Sorry for belated response, but I and most of the other developers
have been off at a conference ...

pgsql-bugs by date:

Previous
From: "Gosia"
Date:
Subject: BUG #2529: it doesn't start- the log files are not found
Next
From: "Alexander Dupuy"
Date:
Subject: BUG #2531: missing header dependency in src/port/Makefile