From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: let's disallow ALTER ROLE bootstrap_superuser NOSUPERUSER |
Date: | 2022-07-21 16:41:04 |
Message-ID: | CAKFQuwaRPMs_5N5OAuwREZv4ozictAaiSZ52zK8pKBOGN1tAWQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Jul 21, 2022 at 9:28 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> > Currently, it's possible to remove the rolissuper bit from the
> > bootstrap superuser, but this leaves that user - and the system in
> > general - in an odd state. The bootstrap user continues to own all of
> > the objects it owned before, e.g. all of the system catalogs. Direct
> > DML on system catalogs is blocked by pg_class_aclmask_ext(), but it's
> > possible to do things like rename a system function out of the way and
> > create a new function with the same signature. Therefore, creating a
> > new superuser and making the original one a non-superuser is probably
> > not viable from a security perspective, because anyone who gained
> > access to that role would likely have little difficulty mounting a
> > Trojan horse attack against the current superusers.
>
> True, but what if the idea is to have *no* superusers? I seem
> to recall people being interested in setups like that.
>
> On the whole I don't have any objection to your proposal, I just
> worry that somebody else will.
>
> Of course there's always "UPDATE pg_authid SET rolsuper = false",
> which makes it absolutely clear that you're breaking the glass cover.
>
>
I would expect an initdb option (once this is possible) to specify this
desire and we just never set one up in the first place. It seems
impractical to remove one after it already exists. Though we could enable
the option (or a function) tied to the specific predefined role that, say,
permits catalog changes, when that day comes.
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2022-07-21 16:46:57 | Re: let's disallow ALTER ROLE bootstrap_superuser NOSUPERUSER |
Previous Message | Tom Lane | 2022-07-21 16:28:07 | Re: let's disallow ALTER ROLE bootstrap_superuser NOSUPERUSER |