Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iSnz9-0006EC-BR for pgsql-hackers@arkaria.postgresql.org; Thu, 07 Nov 2019 20:02:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iSny9-0001a1-Pa for pgsql-hackers@arkaria.postgresql.org; Thu, 07 Nov 2019 20:01:25 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iSny9-0001Zk-H6 for pgsql-hackers@lists.postgresql.org; Thu, 07 Nov 2019 20:01:25 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iSny6-0003kK-N6 for pgsql-hackers@lists.postgresql.org; Thu, 07 Nov 2019 20:01:25 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id xA7K0b2E002586; Thu, 7 Nov 2019 15:00:37 -0500 From: Tom Lane To: Chapman Flack cc: Stephen Frost , Peter Eisentraut , pgsql-hackers@lists.postgresql.org Subject: Re: Removing pg_pltemplate and creating "trustable" extensions In-reply-to: <929c2c97-569b-e626-7289-0bbea4d0012b@anastigmatix.net> References: <5889.1566415762@sss.pgh.pa.us> <27727.1573052802@sss.pgh.pa.us> <20191107183856.GY6962@tamriel.snowman.net> <31658.1573152852@sss.pgh.pa.us> <20191107191320.GZ6962@tamriel.snowman.net> <929c2c97-569b-e626-7289-0bbea4d0012b@anastigmatix.net> Comments: In-reply-to Chapman Flack message dated "Thu, 07 Nov 2019 14:40:57 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2584.1573156837.1@sss.pgh.pa.us> Date: Thu, 07 Nov 2019 15:00:37 -0500 Message-ID: <2585.1573156837@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Chapman Flack writes: > So isn't this more a proposal to add another boolean attribute > to pg_authid, along the lines of rolcreatedb or rolbypassrls? I think we've mostly concluded that default roles are superior to pg_authid attributes. The latter are legacy things rather than a model to keep extending. > On the other hand, maybe thinking of it as a privilege bit could > lead somewhere interesting. A not-yet-installed extension isn't > a real database object, but it does have a synthesized existence > as a row in the pg_available_extensions view. Maybe that could > have an acl column, where a privilege (why not just CREATE?) could > be granted to one or more roles. Synthesizing that could rely on > some directive in the control file, or in some separate > extension_creators.conf file that would associate extensions with > roles. Meh ... that seems like building a whole new set of infrastructure to solve something that we already have a couple of good models for (i.e., default roles and object-based permissions). I really doubt it's worth the trouble to do that. Although upthread I mentioned the possibility of a database admin editing extension control files, I think most people would consider that to be a truly last resort; you generally want those files to remain as-distributed. The alternative of a new config file is slightly less unmaintainable, but only slightly. There'd be no way to update it from inside the database, short of writing a lot of new infrastructure comparable to ALTER SYSTEM, and surely we don't want to do that. > Maybe that's just a more ad-hoc and GUCless way of circling back > to what the original proposal would be doing with GUCs.... Yeah, I think if we really need per-extension configurability of this, we're going to end up with a GUC. It's just not worth the trouble to build another mechanism that would support such a need. But I'm currently taking the position that we don't need to support that. regards, tom lane