Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 524EF634784 for ; Tue, 31 Mar 2009 20:39:22 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 52188-03 for ; Tue, 31 Mar 2009 20:39:20 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id EBC05634603 for ; Tue, 31 Mar 2009 20:39:20 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id n2VNdImE020825; Tue, 31 Mar 2009 19:39:18 -0400 (EDT) To: Kasia Tuszynska cc: "pgsql-admin@postgresql.org" Subject: Re: privilege inheritance to a login role through a group role In-reply-to: <232B5217AD58584C87019E8933556D11011F00862C@redmx2.esri.com> References: <232B5217AD58584C87019E8933556D11011F00862C@redmx2.esri.com> Comments: In-reply-to Kasia Tuszynska message dated "Tue, 31 Mar 2009 16:33:53 -0700" Date: Tue, 31 Mar 2009 19:39:18 -0400 Message-ID: <20824.1238542758@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200903/273 X-Sequence-Number: 31773 Kasia Tuszynska writes: > I am having issues with privilege inheritance to a login role through a group role. > These are the steps I am performing: > 1. data: stcities belongs to user gdb, it resides in the gdb schema > 2. map user is a login role: > CREATE ROLE map LOGIN > ENCRYPTED PASSWORD 'md59ec9dda576db2a36c42c1c3af155d07c' > NOSUPERUSER NOINHERIT CREATEDB NOCREATEROLE; > 1. editor role is created, and privileges to the data are granted to it: > CREATE ROLE editor NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE; > GRANT select on gdb.stcities TO editor; > 1. user map is made a member of the editor role: > GRANT editor TO map; > Now, theoretically, I am expecting the map role to be able to inherit the select privileges via the editor group role to the gdb.stcities data. You've got the INHERIT bit backwards: you'd have to apply INHERIT to map, not editor, to have editor's privileges automatically work for map. If there's some identifiable bit of the documentation that confused you about this, please point it out so we can improve it. regards, tom lane