Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZFnpy-0004sK-Ta for pgsql-admin@arkaria.postgresql.org; Thu, 16 Jul 2015 18:24:51 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZFnpy-00027V-Ev for pgsql-admin@arkaria.postgresql.org; Thu, 16 Jul 2015 18:24:50 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZFnoL-0000G0-TX for pgsql-admin@postgresql.org; Thu, 16 Jul 2015 18:23:10 +0000 Received: from imx6.etecsa.cu ([200.55.152.141]) by makus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1ZFnoJ-0003yL-9J for pgsql-admin@postgresql.org; Thu, 16 Jul 2015 18:23:08 +0000 Received: from imx4.etecsa.cu (unknown [192.168.91.101]) by imx6.etecsa.cu (Postfix) with ESMTP id 3DA4BF2 for ; Thu, 16 Jul 2015 14:23:05 -0400 (CDT) Received: from mn1.etecsa.cu ([192.168.91.41]) by imx4.etecsa.cu with ESMTP id t6GJMWNk028511-t6GJMWNl028511 for ; Thu, 16 Jul 2015 14:22:32 -0500 Received: (qmail 20546 invoked by uid 11187); 16 Jul 2015 19:22:33 -0000 Received: from 192.168.91.6 by mn1.etecsa.cu (envelope-from , uid 502) with qmail-scanner-2.08 (spamassassin: 3.2.5. Clear:RC:1(192.168.91.6):. Processed in 0.063338 secs); 16 Jul 2015 19:22:33 -0000 Received: from unknown (HELO webmail.etecsa.cu) ([192.168.91.6]) (envelope-sender ) by mn2.etecsa.cu (qmail-ldap-1.03) with SMTP for ; 16 Jul 2015 19:22:33 -0000 Received: from 192.168.141.68 (SquirrelMail authenticated user gilberto.castillo) by webmail.etecsa.cu with HTTP; Thu, 16 Jul 2015 14:22:32 -0500 (GMT+5) Message-ID: <61431.192.168.141.68.1437074552.squirrel@webmail.etecsa.cu> In-Reply-To: <2EBBB4BA-B1C9-4978-8182-F35F8831FD0E@ebureau.com> References: <2EBBB4BA-B1C9-4978-8182-F35F8831FD0E@ebureau.com> Date: Thu, 16 Jul 2015 14:22:32 -0500 (GMT+5) Subject: Re: [E-MASIVO][E-MASIVO]postgres_fdw user mapping and role inheritance From: "Gilberto Castillo" To: "Natalie Wenz" Cc: "pgsql-admin@postgresql.org" Reply-To: gilberto.castillo@etecsa.cu User-Agent: SquirrelMail/1.4.8-5.el5_4.10 MIME-Version: 1.0 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-KLMS-Rule-ID: 1 X-KLMS-Message-Action: clean X-KLMS-AntiSpam-Lua-Profiles: 80938 [Jul 16 2015] X-KLMS-AntiSpam-Version: 5.5.6 X-KLMS-AntiSpam-Envelope-From: gilberto.castillo@etecsa.cu X-KLMS-AntiSpam-Rate: 0 X-KLMS-AntiSpam-Status: not_detected X-KLMS-AntiSpam-Method: none X-KLMS-AntiSpam-Moebius-Timestamps: 3653134, 3653335, 3653307 X-KLMS-AntiSpam-Info: LuaCore: 244 2015-07-16_15-48-42 b6fd52acfd90e871c0506937a4c2d0ae162730d3, Auth:dkim=none X-KLMS-AntiSpam-Interceptor-Info: scan successful X-KLMS-AntiPhishing: Clean, 2015/07/16 09:08:45 X-KLMS-AntiVirus: Kaspersky Security 8.0 for Linux Mail Server, version 8.0.1.721, bases: 2015/07/16 09:00:00 #8401019 X-KLMS-AntiVirus-Status: Clean, skipped X-Pg-Spam-Score: -3.2 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org > 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