Re: Streaming replication as a separate permissions

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: Streaming replication as a separate permissions
Дата
Msg-id 20101223223342.GA4933@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: Streaming replication as a separate permissions  (Josh Berkus <josh@agliodbs.com>)
Ответы Re: Streaming replication as a separate permissions  (Josh Berkus <josh@agliodbs.com>)
Список pgsql-hackers
* Josh Berkus (josh@agliodbs.com) wrote:
> On 12/23/10 2:21 PM, Tom Lane wrote:
> > Well, that's one laudable goal here, but "secure by default" is another
> > one that ought to be taken into consideration.
>
> I don't see how *not* granting the superuser replication permissions
> makes things more secure.  The superuser can grant replication
> permissions to itself, so why is suspending them by default beneficial?
>  I'm not following your logic here.

The point is that the *replication* role can't grant itself superuser
privs.  Having the replication role compromised isn't great, but if that
role is *also* a superuser, then the whole database server could be
compromised.  Encouraging users to continue to configure remote systems
with the ability to connect as a superuser when it's not necessary is a
bad idea.

One compromise would be to:

a) let superusers be granted the replication permission
b) have pg_dump assume that superusers have that permission when dumping  from a version which pre-dates the
replicationgrant 
c) have pg_upgrade assume the superuser has that permission when  upgrading
d) *not* grant replication to the default superuser

A better alternative, imv, would be to just have a & d, and mention in
the release notes that users *should* create a dedicated replication
role which is *not* a superuser but *does* have the replication grant,
but if they don't want to change their existing configurations, they can
just grant the replication privilege to whatever role they're currently
using.
Thanks,
    Stephen

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Streaming replication as a separate permissions
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: Streaming replication as a separate permissions