Re: pgsql: Add new GUC createrole_self_grant.

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgsql: Add new GUC createrole_self_grant.
Date: 2023-01-14 01:29:00
Message-ID: CAKFQuwbff63oVtsFMPEnaUMc2=YQ-KWNb7jHUFeQHuenpbJ9Aw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Fri, Jan 13, 2023 at 4:46 PM Andres Freund <andres(at)anarazel(dot)de> wrote:

>
> I don't really see what that has to do with the topic at hand, unless you
> want
> to suggest removing the entire section about how to write secure security
> definer functions?
>

Not remove, but I'm not seeing why the introduction of this GUC requires
any change to the documentation.

I'll leave discussion of security invoker to the other thread going on
right now.

> The point of the security definer section is to explain how to safely write
> security definer functions that you grant to less privileged users
>

Yeah, we are really good at "how".

+ If the security definer function intends to create roles, and if it
+ is running as a non-superuser, <varname>createrole_self_grant</varname>
+ should also be set to a known value using the <literal>SET</literal>
+ clause.

I'd like to know "why". Without knowing why we are adding this I can't
give it a +1. I want the patch to include the why.

David J.

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Jeff Davis 2023-01-14 08:24:54 pgsql: Fix MAINTAIN privileges for toast tables and partitions.
Previous Message Andres Freund 2023-01-13 23:46:35 Re: pgsql: Add new GUC createrole_self_grant.

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2023-01-14 01:45:06 Re: postgres_fdw uninterruptible during connection establishment / ProcSignalBarrier
Previous Message Amin 2023-01-14 01:28:31 How to find the number of cached pages for a relation?