From: | Eric Hanson <eric(at)aquameta(dot)com> |
---|---|
To: | walther(at)technowledgy(dot)de |
Cc: | Dominique Devienne <ddevienne(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Vijaykumar Jain <vijaykumarjain(dot)github(at)gmail(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>, "kaare(at)jasonic(dot)dk" <kaare(at)jasonic(dot)dk> |
Subject: | Re: Fwd: A million users |
Date: | 2024-11-22 23:23:19 |
Message-ID: | CACA6kxiRjFCwq6toyY4iXAcQuQsgnobdcmXgdJTZ82fp4idpZg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, Nov 22, 2024 at 6:57 AM <walther(at)technowledgy(dot)de> wrote:
> Yeah, this is still on my list of things to research more about
> eventually - currently still unsolved.
>
> For my use-case the NO RESET would need to apply until the end of the
> transaction, not end of the session.
>
> I imagine something like an extension, that would:
> - block any SET SESSION ROLE
> - block any RESET ROLE
> - only allow SET LOCAL ROLE when CURRENT_USER has the right to do so
>
> Then the effect of SET LOCAL ROLE would still be reversed at the end of
> the transaction, but you could never "escape" a SET LOCAL ROLE that was
> set earlier.
As things are now, would someone be able to do a RESET ROLE if *any*
code/function had a SQL injection vulnerability, or only if there was one
in the pooler? Or (ideally) neither. That's what a NO RESET option (or
some similar functionality) would provide with certainty.
I found this extension:
https://github.com/pgaudit/set_user
but haven't used it. Seems to address this though, they introduce a
set_session_auth(token) function and then reset_role requires the token if
session_auth has been set.
Thanks,
Eric
From | Date | Subject | |
---|---|---|---|
Next Message | David Mullineux | 2024-11-22 23:55:30 | Re: Wired behaviour from SELECT |
Previous Message | Koen De Groote | 2024-11-22 20:59:46 | Re: Memory settings when running postgres in a docker container |