pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Natalie Wenz <nataliewenz@ebureau.com>
To: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re: postgres_fdw user mapping and role inheritance
Date: Thu, 16 Jul 2015 14:10:09 -0500
Message-ID: <32B4D87F-0466-467A-9F2B-00F696E9E056@ebureau.com> (raw)
In-Reply-To: <4969.1437070567@sss.pgh.pa.us>
References: <2EBBB4BA-B1C9-4978-8182-F35F8831FD0E@ebureau.com>
	<4969.1437070567@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

Would it be necessary to disambiguate? Wouldn't individual_user's privileges be a union of all of the privileges of all the groups of which it is a part? That seems to be how it works in the core postgres functionality:

If local_group_1 is a role with privileges on table_a and table_b, and local_group_2 is a role with privileges on table_c, then after
   grant local_group_1 to individual_user;
   grant local_group_2 to individual_user;
individual_user now has privileges on table_a, table_b, and table_c.

But if local_group_2 also has a user mapping on foreign_table_x, individual_user inherits the privileges on table_c, but not foreign_table_x. 

Or am I misunderstanding you? Is there something about foreign tables that precludes the role inheritance from working the same way it does with native tables?

Thanks,
Natalie

> On Jul 16, 2015, at 1:16 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> 
> Natalie Wenz <nataliewenz@ebureau.com> writes:
>> Is there a way to tell postgres_fdw to allow individual_user to inherit
>> user mappings from groups of which it is a part?
> 
> No.  How would you disambiguate if the current role were a member of
> multiple groups?
> 
> 			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



view thread (8+ messages)  latest in thread

Message-ID: <32B4D87F-0466-467A-9F2B-00F696E9E056@ebureau.com>
Permalink:  ../32B4D87F-0466-467A-9F2B-00F696E9E056@ebureau.com/
Also on:    postgresql.org/message-id/32B4D87F-0466-467A-9F2B-00F696E9E056@ebureau.com

 · 

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-admin@postgresql.org
  Cc: nataliewenz@ebureau.com, tgl@sss.pgh.pa.us
  Subject: Re: postgres_fdw user mapping and role inheritance
  In-Reply-To: <32B4D87F-0466-467A-9F2B-00F696E9E056@ebureau.com>
  References: <2EBBB4BA-B1C9-4978-8182-F35F8831FD0E@ebureau.com> <4969.1437070567@sss.pgh.pa.us> <32B4D87F-0466-467A-9F2B-00F696E9E056@ebureau.com>

* 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