Re: Proposal: Role Sandboxing for Secure Impersonation - Mailing list pgsql-hackers

From Michał Kłeczek
Subject Re: Proposal: Role Sandboxing for Secure Impersonation
Date
Msg-id 89B3C4BA-60F0-4A73-ADAF-D8C89FBD563F@kleczek.org
Whole thread Raw
In response to Re: Proposal: Role Sandboxing for Secure Impersonation  (Eric Hanson <eric@aquameta.com>)
Responses Re: Proposal: Role Sandboxing for Secure Impersonation
List pgsql-hackers


On 4 Dec 2024, at 17:13, Eric Hanson <eric@aquameta.com> wrote:

On Mon, Dec 2, 2024 at 10:31 AM Wolfgang Walther <walther@technowledgy.de> wrote:
Eric Hanson:
> a) Transaction ("local") Sandbox:
> - SET LOCAL ROLE alice NO RESET;
> - SET LOCAL ROLE alice WITHOUT RESET;
[snip]
> c) "Guarded" Transaction/Session
> - SET [LOCAL] ROLE alice GUARDED BY reset_token;
> - RESET ROLE WITH TOKEN reset_token;

These are preferable options for PostgREST (at least as long as JWT based impersonation is implemented in Postgres).

> 
> Guarded sandboxes are nice because the session can also exit the sandbox 
> if it has the token.
d) SET [LOCAL] ROLE alice WITH <password>;


PostgREST does not know alice's password as it performs JWT based authentication.

Regards

Michal

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Cannot find a working 64-bit integer type on Illumos
Next
From: Tom Lane
Date:
Subject: Re: Potential ABI breakage in upcoming minor releases