pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David G. Johnston <david.g.johnston@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: pgsql: Add new GUC createrole_self_grant.
Date: Fri, 13 Jan 2023 18:29:00 -0700
Message-ID: <CAKFQuwbff63oVtsFMPEnaUMc2=YQ-KWNb7jHUFeQHuenpbJ9Aw@mail.gmail.com> (raw)
In-Reply-To: <20230113234635.kyelgvnnak6jxzlx@awork3.anarazel.de>
References: <CA+TgmoZdOYxkPOWHD+3gG=DDccg9cDVYS8EtpO9EY85NNMaNtg@mail.gmail.com>
	<404209.1673404807@sss.pgh.pa.us>
	<CA+TgmoYzCt16YKRTZPQ-LYdWgkRAC7RuUxOkwBr_rhA3LoXg4g@mail.gmail.com>
	<408089.1673407504@sss.pgh.pa.us>
	<CA+Tgmob=67ghS9SQ8iEV5kMUQn_E4Bdp_=yvkdt8W74eu-v5tQ@mail.gmail.com>
	<668179.1673470826@sss.pgh.pa.us>
	<CA+TgmoYSh1Zi0UH77dre-+PHUyWkYcD2bbGBFcCeAEMsdDjcjw@mail.gmail.com>
	<CAKFQuwY7_W=JwPFb4ODw=9RTU+wbMEZUzKdCRsV28jU73c3LUg@mail.gmail.com>
	<CA+Tgmoauqd1cHQjsNEoxL5O-kEO4iC9dAPyCudSvmNqPJGmy9g@mail.gmail.com>
	<CAKFQuwaMBdUkgMj=5ehyDBLb2UmPGUDmN9r5uY=fROXhkY30kw@mail.gmail.com>
	<20230113234635.kyelgvnnak6jxzlx@awork3.anarazel.de>

On Fri, Jan 13, 2023 at 4:46 PM Andres Freund <andres@anarazel.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.

view thread (20+ messages)  latest in thread

Message-ID: <CAKFQuwbff63oVtsFMPEnaUMc2=YQ-KWNb7jHUFeQHuenpbJ9Aw@mail.gmail.com>
Permalink:  ../CAKFQuwbff63oVtsFMPEnaUMc2=YQ-KWNb7jHUFeQHuenpbJ9Aw@mail.gmail.com/
Also on:    postgresql.org/message-id/CAKFQuwbff63oVtsFMPEnaUMc2=YQ-KWNb7jHUFeQHuenpbJ9Aw@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: david.g.johnston@gmail.com, andres@anarazel.de, robertmhaas@gmail.com, tgl@sss.pgh.pa.us, pgsql-hackers@postgresql.org
  Subject: Re: pgsql: Add new GUC createrole_self_grant.
  In-Reply-To: <CAKFQuwbff63oVtsFMPEnaUMc2=YQ-KWNb7jHUFeQHuenpbJ9Aw@mail.gmail.com>
  References: <CA+TgmoZdOYxkPOWHD+3gG=DDccg9cDVYS8EtpO9EY85NNMaNtg@mail.gmail.com> <404209.1673404807@sss.pgh.pa.us> <CA+TgmoYzCt16YKRTZPQ-LYdWgkRAC7RuUxOkwBr_rhA3LoXg4g@mail.gmail.com> <408089.1673407504@sss.pgh.pa.us> <CA+Tgmob=67ghS9SQ8iEV5kMUQn_E4Bdp_=yvkdt8W74eu-v5tQ@mail.gmail.com> <668179.1673470826@sss.pgh.pa.us> <CA+TgmoYSh1Zi0UH77dre-+PHUyWkYcD2bbGBFcCeAEMsdDjcjw@mail.gmail.com> <CAKFQuwY7_W=JwPFb4ODw=9RTU+wbMEZUzKdCRsV28jU73c3LUg@mail.gmail.com> <CA+Tgmoauqd1cHQjsNEoxL5O-kEO4iC9dAPyCudSvmNqPJGmy9g@mail.gmail.com> <CAKFQuwaMBdUkgMj=5ehyDBLb2UmPGUDmN9r5uY=fROXhkY30kw@mail.gmail.com> <20230113234635.kyelgvnnak6jxzlx@awork3.anarazel.de> <CAKFQuwbff63oVtsFMPEnaUMc2=YQ-KWNb7jHUFeQHuenpbJ9Aw@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox