From: Tom Lane <tgl@sss.pgh.pa.us>
To: Natalie Wenz <nataliewenz@ebureau.com>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: postgres_fdw user mapping and role inheritance
Date: Fri, 17 Jul 2015 13:59:05 -0400
Message-ID: <28968.1437155945@sss.pgh.pa.us> (raw)
In-Reply-To: <457CD1FA-008B-4E6D-8E80-FB7DBB35E215@ebureau.com>
References: <2EBBB4BA-B1C9-4978-8182-F35F8831FD0E@ebureau.com>
<4969.1437070567@sss.pgh.pa.us>
<32B4D87F-0466-467A-9F2B-00F696E9E056@ebureau.com>
<7673.1437077526@sss.pgh.pa.us>
<457CD1FA-008B-4E6D-8E80-FB7DBB35E215@ebureau.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>
Natalie Wenz <nataliewenz@ebureau.com> writes:
> Oh! Of course! The local database doesn't know anything about the role privileges on the remote database, so the information isn't even available on the local database to somehow take the union of all the privileges of foo and bar because they are defined on the remote database. Thanks for responding. I got so wrapped up in our simple use case (where any individual_user in the local_group would connect to foreign_server as the same foreign_user) and couldn't come up with a counter example.
> For our use case, can you think of any other way to do it besides creating a user mapping for every member of local_group? Gilberto's suggestion of setting the session authorization (I think?) won't work because the individual_users don't have privileges to set that. ("ERROR: permission denied to set session authorization")
Would it work for them to do SET ROLE to the group whose mapping they want
to use? IIRC that's allowed for any member of the group. The problem
with this is that their privileges for local operations are also affected,
so maybe that doesn't help you.
regards, tom lane
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
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 using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, nataliewenz@ebureau.com
Subject: Re: postgres_fdw user mapping and role inheritance
In-Reply-To: <28968.1437155945@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