Re: Allow 'sslkey' and 'sslcert' in postgres_fdw user mappings

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: Allow 'sslkey' and 'sslcert' in postgres_fdw user mappings
Дата
Msg-id CAA8=A79goycZqfJVXsuCryFRJSvzx2LQ+C_gqXUty_RBp3VNqg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Allow 'sslkey' and 'sslcert' in postgres_fdw user mappings  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Allow 'sslkey' and 'sslcert' in postgres_fdw user mappings  (Daniel Gustafsson <daniel@yesql.se>)
Re: Allow 'sslkey' and 'sslcert' in postgres_fdw user mappings  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Fri, Jan 10, 2020 at 1:21 AM Robert Haas <robertmhaas@gmail.com> wrote:
>
> 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.


It's probably fairly easy to do (c.f. 6136e94dcb). I'm not (yet)
convinced that there is any significant security threat here. This
doesn't give the user or indeed any postgres code any access to the
contents of these files. But if there is a consensus to restrict this
I'll do it.

cheers

andrew

-- 
Andrew Dunstan                https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Coding in WalSndWaitForWal
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pgsql: Add basic TAP tests for psql's tab-completion logic.