Re: set role command

From: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
To: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: set role command
Date: 2025-11-24 20:25:53
Message-ID: CANzqJaB424ydLyw3VNPD=Yrvcvb2MmksczH9VY967EA3E=5v4w@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Nov 24, 2025 at 2:46 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> =?utf-8?Q?=C3=81lvaro?= Herrera <alvherre(at)kurilemu(dot)de> writes:
> > On 2025-Nov-24, Tom Lane wrote:
> >> I don't think so. They are just shorthand for issuing a SET to the
> >> original value, so how do they break the model in a way that that
> >> doesn't?
>
> > No, because the new user doesn't have privs to become the previous one.
>
> Don't think you can make that argument from the standard, since
> it explicitly disclaims saying what privs are required.
>
> > It would be more
> > secure to have a mechanism where the connection is initially
> > unauthenticated altogether (which means: it's not a valid SQL session),
> > becomes authenticated at the pooler's will, and returns to
> > unauthenticated state as the pooler decides. Critically, from
> > unauthenticated state you shouldn't be able to become superuser.
>
> I don't like the idea that a pooler or pretend-to-be pooler
> can eat up a backend session without having authenticated at all.
> Also, exactly what does "becomes authenticated at the pooler's will"
> mean? There had better be some actual authentication happening
> somewhere.
>

A restriction that it can only happen when TLS authentication is used, and
the pooler is using its service account?

--
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!

In response to

Browse pgsql-general by date

  From Date Subject
Next Message pg254kl 2025-11-24 21:51:35 Re: Schema design: user account deletion vs. keeping family tree data
Previous Message Tom Lane 2025-11-24 19:46:20 Re: set role command