pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Allow 'sslkey' and 'sslcert' in postgres_fdw user mappings
5+ messages / 5 participants
[nested] [flat]
* pgsql: Allow 'sslkey' and 'sslcert' in postgres_fdw user mappings
@ 2020-01-09 08:11 Andrew Dunstan <andrew@dunslane.net>
2020-01-09 14:18 ` Re: pgsql: Allow 'sslkey' and 'sslcert' in postgres_fdw user mappings Robert Haas <robertmhaas@gmail.com>
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Dunstan @ 2020-01-09 08:11 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Allow 'sslkey' and 'sslcert' in postgres_fdw user mappings
This allows different users to authenticate with different certificates.
Author: Craig Ringer
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/f5fd995a1a24e6571d26b1e29c4dc179112b1003
Modified Files
--------------
contrib/postgres_fdw/expected/postgres_fdw.out | 12 ++++++++++++
contrib/postgres_fdw/option.c | 9 +++++++++
contrib/postgres_fdw/sql/postgres_fdw.sql | 13 +++++++++++++
doc/src/sgml/postgres-fdw.sgml | 12 ++++++++++--
4 files changed, 44 insertions(+), 2 deletions(-)
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: pgsql: Allow 'sslkey' and 'sslcert' in postgres_fdw user mappings
2020-01-09 08:11 pgsql: Allow 'sslkey' and 'sslcert' in postgres_fdw user mappings Andrew Dunstan <andrew@dunslane.net>
@ 2020-01-09 14:18 ` Robert Haas <robertmhaas@gmail.com>
2020-01-09 14:38 ` Re: pgsql: Allow 'sslkey' and 'sslcert' in postgres_fdw user mappings Christoph Berg <myon@debian.org>
0 siblings, 1 reply; 5+ messages in thread
From: Robert Haas @ 2020-01-09 14:18 UTC (permalink / raw)
To: Andrew Dunstan <andrew@dunslane.net>; +Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
On Thu, Jan 9, 2020 at 3:11 AM Andrew Dunstan <andrew@dunslane.net> wrote:
> Allow 'sslkey' and 'sslcert' in postgres_fdw user mappings
>
> This allows different users to authenticate with different certificates.
>
> Author: Craig Ringer
>
> https://git.postgresql.org/pg/commitdiff/f5fd995a1a24e6571d26b1e29c4dc179112b1003
Does this mean that a non-superuser can induce postgres_fdw to read an
arbitrary file from the local filesystem?
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: pgsql: Allow 'sslkey' and 'sslcert' in postgres_fdw user mappings
2020-01-09 08:11 pgsql: Allow 'sslkey' and 'sslcert' in postgres_fdw user mappings Andrew Dunstan <andrew@dunslane.net>
2020-01-09 14:18 ` Re: pgsql: Allow 'sslkey' and 'sslcert' in postgres_fdw user mappings Robert Haas <robertmhaas@gmail.com>
@ 2020-01-09 14:38 ` Christoph Berg <myon@debian.org>
2020-01-20 07:48 ` Re: pgsql: Allow 'sslkey' and 'sslcert' in postgres_fdw user mappings Craig Ringer <craig@2ndquadrant.com>
0 siblings, 1 reply; 5+ messages in thread
From: Christoph Berg @ 2020-01-09 14:38 UTC (permalink / raw)
To: Robert Haas <robertmhaas@gmail.com>; +Cc: Andrew Dunstan <andrew@dunslane.net>; pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Re: Robert Haas 2020-01-09 <CA+TgmoZEjyv_PD=2cinkbDA_chyLNAcBPL_9bKJQ6bc=nw+FHA@mail.gmail.com>
> Does this mean that a non-superuser can induce postgres_fdw to read an
> arbitrary file from the local filesystem?
Yes, see my comments in the "Allow 'sslkey' and 'sslcert' in
postgres_fdw user mappings" thread.
Christoph
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: pgsql: Allow 'sslkey' and 'sslcert' in postgres_fdw user mappings
2020-01-09 08:11 pgsql: Allow 'sslkey' and 'sslcert' in postgres_fdw user mappings Andrew Dunstan <andrew@dunslane.net>
2020-01-09 14:18 ` Re: pgsql: Allow 'sslkey' and 'sslcert' in postgres_fdw user mappings Robert Haas <robertmhaas@gmail.com>
2020-01-09 14:38 ` Re: pgsql: Allow 'sslkey' and 'sslcert' in postgres_fdw user mappings Christoph Berg <myon@debian.org>
@ 2020-01-20 07:48 ` Craig Ringer <craig@2ndquadrant.com>
2020-01-20 09:00 ` Re: pgsql: Allow 'sslkey' and 'sslcert' in postgres_fdw user mappings Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
0 siblings, 1 reply; 5+ messages in thread
From: Craig Ringer @ 2020-01-20 07:48 UTC (permalink / raw)
To: Christoph Berg <myon@debian.org>; Robert Haas <robertmhaas@gmail.com>; Andrew Dunstan <andrew@dunslane.net>; pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
On Thu, 9 Jan 2020 at 22:38, Christoph Berg <myon@debian.org> wrote:
> Re: Robert Haas 2020-01-09 <CA+TgmoZEjyv_PD=2cinkbDA_chyLNAcBPL_9bKJQ6bc=
> nw+FHA@mail.gmail.com>
> > Does this mean that a non-superuser can induce postgres_fdw to read an
> > arbitrary file from the local filesystem?
>
> Yes, see my comments in the "Allow 'sslkey' and 'sslcert' in
> postgres_fdw user mappings" thread.
Ugh, I misread your comment.
You raise a sensible concern.
These options should be treated the same as the proposed option to allow
passwordless connections: disallow creation or alteration of FDW connection
strings that use them by non-superusers. So a superuser can define a user
mapping that uses these options, but normal users may not.
--
Craig Ringer http://www.2ndQuadrant.com/
2ndQuadrant - PostgreSQL Solutions for the Enterprise
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: pgsql: Allow 'sslkey' and 'sslcert' in postgres_fdw user mappings
2020-01-09 08:11 pgsql: Allow 'sslkey' and 'sslcert' in postgres_fdw user mappings Andrew Dunstan <andrew@dunslane.net>
2020-01-09 14:18 ` Re: pgsql: Allow 'sslkey' and 'sslcert' in postgres_fdw user mappings Robert Haas <robertmhaas@gmail.com>
2020-01-09 14:38 ` Re: pgsql: Allow 'sslkey' and 'sslcert' in postgres_fdw user mappings Christoph Berg <myon@debian.org>
2020-01-20 07:48 ` Re: pgsql: Allow 'sslkey' and 'sslcert' in postgres_fdw user mappings Craig Ringer <craig@2ndquadrant.com>
@ 2020-01-20 09:00 ` Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
0 siblings, 0 replies; 5+ messages in thread
From: Andrew Dunstan @ 2020-01-20 09:00 UTC (permalink / raw)
To: Craig Ringer <craig@2ndquadrant.com>; Christoph Berg <myon@debian.org>; Robert Haas <robertmhaas@gmail.com>; pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
On 1/20/20 2:48 AM, Craig Ringer wrote:
> On Thu, 9 Jan 2020 at 22:38, Christoph Berg <myon@debian.org
> <mailto:myon@debian.org>> wrote:
>
> Re: Robert Haas 2020-01-09
> <CA+TgmoZEjyv_PD=2cinkbDA_chyLNAcBPL_9bKJQ6bc=nw+FHA@mail.gmail.com
> <mailto:nw%2BFHA@mail.gmail.com>>
> > Does this mean that a non-superuser can induce postgres_fdw to
> read an
> > arbitrary file from the local filesystem?
>
> Yes, see my comments in the "Allow 'sslkey' and 'sslcert' in
> postgres_fdw user mappings" thread.
>
>
> Ugh, I misread your comment.
>
> You raise a sensible concern.
>
> These options should be treated the same as the proposed option to
> allow passwordless connections: disallow creation or alteration of FDW
> connection strings that use them by non-superusers. So a superuser can
> define a user mapping that uses these options, but normal users may not.
>
>
Already done.
cheers
andrew
--
Andrew Dunstan https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2020-01-20 09:00 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-01-09 08:11 pgsql: Allow 'sslkey' and 'sslcert' in postgres_fdw user mappings Andrew Dunstan <andrew@dunslane.net>
2020-01-09 14:18 ` Robert Haas <robertmhaas@gmail.com>
2020-01-09 14:38 ` Christoph Berg <myon@debian.org>
2020-01-20 07:48 ` Craig Ringer <craig@2ndquadrant.com>
2020-01-20 09:00 ` Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
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