Re: RFC: Non-user-resettable SET SESSION AUTHORISATION - Mailing list pgsql-hackers

From Tom Lane
Subject Re: RFC: Non-user-resettable SET SESSION AUTHORISATION
Date
Msg-id 1833.1431884354@sss.pgh.pa.us
Whole thread Raw
In response to Re: RFC: Non-user-resettable SET SESSION AUTHORISATION  (José Luis Tallón<jltallon@adv-solutions.net>)
Responses Re: RFC: Non-user-resettable SET SESSION AUTHORISATION  (José Luis Tallón <jltallon@adv-solutions.net>)
List pgsql-hackers
José Luis Tallón <jltallon@adv-solutions.net> writes:
> On the other hand, ISTM that what we all intend to achieve is some 
> Postgres equivalent of the SUID bit... so why not just do something 
> equivalent?
> -------
>      LOGIN    -- as user with the appropriate role membership / privilege?
>      ...
>      SET ROLE / SET SESSION AUTHORIZATION WITH COOKIE / IMPERSONATE

>      ... do whatever ...    -- unprivileged user can NOT do the 
> "impersonate" thing

>      DISCARD ALL    -- implicitly restore previous authz
> -------

Oh?  What stops the unprivileged user from doing DISCARD ALL?

I think if we have something like this, it has to be non-resettable
period: you can't get back the old session ID except by reconnecting
and re-authorizing.  Otherwise there's just too much risk of security
holes.
        regards, tom lane



pgsql-hackers by date:

Previous
From: José Luis Tallón
Date:
Subject: Re: RFC: Non-user-resettable SET SESSION AUTHORISATION
Next
From: José Luis Tallón
Date:
Subject: Re: RFC: Non-user-resettable SET SESSION AUTHORISATION