Re: Allow 'sslkey' and 'sslcert' in postgres_fdw user mappings - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Allow 'sslkey' and 'sslcert' in postgres_fdw user mappings
Date
Msg-id CA+Tgmob9kmZt7RU+hd5AXWSphO1F9tFa2RNOiBiXSh-5VqP+-w@mail.gmail.com
Whole thread Raw
In response to Re: Allow 'sslkey' and 'sslcert' in postgres_fdw user mappings  (Christoph Berg <myon@debian.org>)
Responses Re: Allow 'sslkey' and 'sslcert' in postgres_fdw user mappings  (Andrew Dunstan <andrew.dunstan@2ndquadrant.com>)
List pgsql-hackers
On Thu, Jan 9, 2020 at 5:30 AM Christoph Berg <myon@debian.org> wrote:
> I have some concerns about security, though. It's true that the
> sslcert/sslkey options can only be set/modified by superusers when
> "password_required" is set. But when password_required is not set, any
> user and create user mappings that reference arbitrary files on the
> server filesystem. I believe the options are still used in that case
> for creating connections, even when that means the remote server isn't
> set up for cert auth, which needs password_required=false to succeed.
>
> In short, I believe these options need explicit superuser checks.

I share the concern about the security issue here. I can't testify to
whether Christoph's whole analysis is here, but as a general point,
non-superusers can't be allowed to do things that cause the server to
access arbitrary local files.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: pgsql: Add basic TAP tests for psql's tab-completion logic.
Next
From: Christoph Berg
Date:
Subject: Re: pgsql: Add basic TAP tests for psql's tab-completion logic.