Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cqgAr-0000BS-Kg for pgsql-hackers@arkaria.postgresql.org; Wed, 22 Mar 2017 13:19:37 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cqgAr-0005q3-7C for pgsql-hackers@arkaria.postgresql.org; Wed, 22 Mar 2017 13:19:37 +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_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cqg9M-0002td-SW for pgsql-hackers@postgresql.org; Wed, 22 Mar 2017 13:18:04 +0000 Received: from tamriel.snowman.net ([72.66.115.51]) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cqg9J-000516-95 for pgsql-hackers@postgresql.org; Wed, 22 Mar 2017 13:18:04 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 64EB95F794; Wed, 22 Mar 2017 09:17:30 -0400 (EDT) Date: Wed, 22 Mar 2017 09:17:30 -0400 From: Stephen Frost To: Peter Eisentraut Cc: Dave Page , Robert Haas , PostgreSQL Hackers Subject: Re: Monitoring roles patch Message-ID: <20170322131730.GD9812@tamriel.snowman.net> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="6GWensC3ZIbVPQGH" Content-Disposition: inline In-Reply-To: X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/3.13.0-91-generic (x86_64) X-Uptime: 09:15:20 up 256 days, 14:39, 22 users, load average: 0.11, 0.17, 0.15 User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org --6GWensC3ZIbVPQGH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Peter, * Peter Eisentraut (peter.eisentraut@2ndquadrant.com) wrote: > On 3/22/17 07:48, Dave Page wrote: > > With the patch, complex monitoring systems can easily be setup with > > something like: > >=20 > > CREATE ROLE monitoring_user LOGIN; > > GRANT pg_monitor TO monitoring_role; >=20 > That assumes that we have thought of all the ways in which people might > want to monitor things. I disagree. The entire point of the pg_monitor role is to cover those rights which we feel should be available to monitoring solutions, and that *will* change over time. > If we do it via GRANTs instead, then users can easily extend it. The intent here is that users will *also* be able to do it via GRANTs if they wish to. > If we instead change the hardcoded superuser checks to hardcoded > some-other-role checks, then the whole system instantly becomes unusable > the moment someone wants to monitor something we haven't thought of. Right, that's why we need specific roles for the cases where we have to have a C-level check and the pg_monitor role should only be GRANT'd those other roles or GRANTs on specific functions, all of which a DBA/superuser could do themselves with their own role, if they wished to do so, instead of using pg_monitor. Thanks! Stephen --6GWensC3ZIbVPQGH Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJY0nlqAAoJEO1sijiDR2RVciAQAMM5OtUEOXffyISdQXva6cUg IQJkpfu530rp9jjehqbfF6+ISvPi4dnmpuGC2yf/ms6nHduL18HrZhTg/P0zYxfo g/yLoScKL5tWYhb3rFPXqDBrr909bMjy3i9JTGSvL+B32JOOVRdxyPYeNOz29bRv l9WI0ena90QDtm99TMkrDmOfZ92X9AzHil5Kl4Nmq7ss30HPHEDAcN/qGjfB0/zq mdSskfeEylBtP4E1ayQByz1Ftqi2TQqv7AR3BblRYm4rhxfxtG9nyqMYtM8Oger3 KPohgoNAAycL2q90QsMDBb8IXTzGu9+N4YQ74w3qCg4Qr1k87QJRQKD4ONXdXssf Aya+hsULgC8oJUSgtb9a9k6q6+++W5ocdscGtG1IEoZbYNC9wvK/4uNplbb2wsOr bZj7WHKHkdC6FU6VV5ttQbAOvt1Gr2/QZF4LzPi48WF7H6YsNOJWbUKjK/kgRIUi YQCE6skHlJ6kIwHTco9RG5g8Pu/CsjCMx41b55090+PaQJAyNb1ODo3rAJG2Y5IU voxH1zyeVjyF72xRF3uURXr979ZsaLT4vWQGdRs3sgcvK+S7ypyNF4vJ/e+/w/7+ jsdOA96JAy7ygsIRwHLH2hSpLadeYimQCAOLlJYTut0cAJ2kAPc0EiskPND+2I+0 J4RXFuvbr5yxqk059Wvb =gp68 -----END PGP SIGNATURE----- --6GWensC3ZIbVPQGH--