From: Gilberto Castillo <gilberto.castillo@etecsa.cu>
To: Natalie Wenz <nataliewenz@ebureau.com>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: [E-MASIVO][E-MASIVO]postgres_fdw user mapping and role inheritance
Date: Thu, 16 Jul 2015 14:22:32 -0500 (GMT+5)
Message-ID: <61431.192.168.141.68.1437074552.squirrel@webmail.etecsa.cu> (raw)
In-Reply-To: <2EBBB4BA-B1C9-4978-8182-F35F8831FD0E@ebureau.com>
References: <2EBBB4BA-B1C9-4978-8182-F35F8831FD0E@ebureau.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>
> Hi all,
>
> We're looking at using postgres_fdw, and while setting it up for a test
> using postgres 9.4.4, I noticed that it doesn't seem to honor role
> inheritance.
>
> For example, having created foreign_server:
>
> create role local_group with nologin;
> create role individual_user;
> grant local_group to individual_user;
>
> create user mapping for local_group
> server foreign_server
> options (user 'foreign_user', password '');
>
> create foreign table foreign_table (id serial, data text)
> server foreign_server
> options (schema_name 'some_schema', table_name 'some_table');
>
> When I tried this, individual_user could not select from foreign_table,
> even though I expected individual_user to inherit from local_group:
Please,
Select current_user;
???
Session authorization local_group;
psql> select * from foreign_table;
;-)
> ERROR: user mapping not found for "individual_user"
>
> It did work when I created a user mapping for individual_user (to verify
> that I had the other parts set up correctly):
>
> create user mapping for individual_user
> server foreign_server
> options (user 'foreign_user', password '');
>
>
> Am I missing something? Is there a way to tell postgres_fdw to allow
> individual_user to inherit user mappings from groups of which it is a
> part? Is there a reason that it doesn't allow it, or is it a bug or
> something that hasn't been implemented yet? (Will it be fixed or
> implemented in postgres 9.5?)
>
> Many thanks,
> Natalie
>
> --
> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin
>
Saludos,
Gilberto Castillo
ETECSA, La Habana, Cuba
--
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: gilberto.castillo@etecsa.cu, nataliewenz@ebureau.com
Subject: Re: [E-MASIVO][E-MASIVO]postgres_fdw user mapping and role inheritance
In-Reply-To: <61431.192.168.141.68.1437074552.squirrel@webmail.etecsa.cu>
* 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