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 1gwjSD-0005Jw-3X for pgsql-hackers@arkaria.postgresql.org; Thu, 21 Feb 2019 08:11:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gwjS9-0008L8-TC for pgsql-hackers@arkaria.postgresql.org; Thu, 21 Feb 2019 08:11:33 +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 1gwjS9-0008L1-Jq for pgsql-hackers@lists.postgresql.org; Thu, 21 Feb 2019 08:11:33 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gwjS6-0008Jy-U3 for pgsql-hackers@postgresql.org; Thu, 21 Feb 2019 08:11:32 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 481A7223DC; Thu, 21 Feb 2019 03:11:29 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 21 Feb 2019 03:11:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=bL8Y228Ear/zDwdb8Zd0pEObbZ8 pQIZzbjCieUKUB0o=; b=rSMmgx6zASU1w7I0uSfK0OuKyscGEcBDS296wLAQiUh 9Igxot4XHwhLoXXEqoiiMk2DUVN1hhpujtxi+DUzx4FCcdH5h/QA0JF2tXhvrAtn N4Bc3QjZlgj4ybRsRYtfcssYnt9AF3mlgG68SudOiFt1Hc+WycEqX0byAxZrfBVl 2YVkkML7FC99CsEFeG+bQPNxv7e8DGkJb5dUBhxI6z1Cml+uQec3aGVPFhUU7SKz OWpYtT1p7nc+VoZnd5mSuMlWqRJRiGJdrtU9MLvHwxEnnLdoL0WXblqQIkIxXIc/ 6BnvwBCO7J9fvxDKPx/5sZCDTFmnxzlHkvSd8+vJodA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=bL8Y22 8Ear/zDwdb8Zd0pEObbZ8pQIZzbjCieUKUB0o=; b=EqgnfOKlhfKef1G8M+UIow k7tyMp8sCeVxHYu7NyugyuFcywwlswPlFaI0GB9LDkljBWb07vf4PtHDAsUExTmN XBVqrNEBeHOybGIQ6sIH+YG+4x7eHxJrMtfv5zDSh4hGuOl5Uh4lfLjd8Wo9qdF+ J/Pb1OCPJe+NKAHhsHptZf+C8AwVi7FmIgyYfETveNlthPACGMmkXNz8SVxjktqy kX1f1KjDAIbxGHMKOGuJJEAWZLOo+u+rUO/QTUs58KAERWRneNxksx88Z6QaRhyA Nf997QfDfL5ZW8/Fvv9sqh3FRR78eLCxzZeQPCxosYjFqk6LGpwP0a7AgQ2pOKsA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrtdejgdduudeiucdltddurdegtdelrddttd dmucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfquhht necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enfghrlhcuvffnffculdejtddmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredt tddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesph grqhhuihgvrhdrgiihiieqnecukfhppeeiuddrvdduhedrudefjedrudeivdenucfrrghr rghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihiienucevlh hushhtvghrufhiiigvpedt X-ME-Proxy: Received: from paquier.xyz (c137162.net61215.cablenet.ne.jp [61.215.137.162]) by mail.messagingengine.com (Postfix) with ESMTPA id 3C0FE1030F; Thu, 21 Feb 2019 03:11:27 -0500 (EST) Date: Thu, 21 Feb 2019 17:11:24 +0900 From: Michael Paquier To: Peter Eisentraut Cc: pgsql-hackers Subject: Re: restrict pg_stat_ssl to superuser? Message-ID: <20190221081124.GS15532@paquier.xyz> References: <63117976-d02c-c8e2-3aef-caa31a5ab8d3@2ndquadrant.com> <20190212064007.GN1475@paquier.xyz> <71319f2d-a073-0499-4562-6003e026307e@2ndquadrant.com> <20190218035813.GH15532@paquier.xyz> <1d1bf3a7-955e-ce6b-de99-b900136ca789@2ndquadrant.com> <3018acd9-e5d8-1e85-5ed7-47276cd77569@2ndquadrant.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="KISHs/FnjYvFOG5B" Content-Disposition: inline In-Reply-To: <3018acd9-e5d8-1e85-5ed7-47276cd77569@2ndquadrant.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --KISHs/FnjYvFOG5B Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Feb 20, 2019 at 11:51:08AM +0100, Peter Eisentraut wrote: > So here is a patch doing it the "normal" way of nulling out all the rows > the user shouldn't see. That looks fine to me. > I haven't found any documentation of these access restrictions in the > context of pg_stat_activity. Is there something that I'm not seeing or > something that should be added? Yes, there is nothing. I agree that it would be good to mention that some fields are set to NULL and only visible to superusers or members of pg_read_all_stats with a note for pg_stat_activity and pg_stat_get_activity(). Here is an idea: "Backend and SSL information are restricted to superusers and members of the pg_read_all_stats role. Access may be granted to others using GRANT. Getting that back-patched would be nice where pg_read_all_stats was introduced. -- Michael --KISHs/FnjYvFOG5B Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlxuXSsACgkQnvQgOdby QH2KaA/+OkIW60ZNPIhc0G6PV0UEKUR7ijsTdKuGjo/FuD0VUFQqKR5mXkphx2LS nScY1/0FtnPyfzd2bfYR0JFJKSiu6CDM3IAVrJSXDxidMxvDXGq76VYEoURaa5VY auDWRg02NezCuH06vsfeJpmmxDxo67ESjWdfXIY4SuWQmosdcjIlMgy7UCosFdmC HEsHIrNCwicR8OYQIbSMzJCa07oSi71RRNWCWxzGOFyH6cwB1nuX0R8Ey2hOvFKf g6DRYuuaYmsupMGlGtXAVZTQYNm6PWtsYJRoqtqL+/JHHRexZHpmYi12DzloKUt3 GA6qhTEdcb6+txP+5zJDa9Iu10yas99e46FN2BDlEUjX/B2QpudQvUmP742xrDvo cPl++T+SAZrVknqNnSDxpLrFIY/8ue0geKiuIy8v7nW5lAGsaVWagHIys8ae2K7n c7jl2S6mLXKvbGz7DVTBo2BsYpYb0lGq2PQYKMZeAG3+QVDdcMzMYdEJvv8H9RZK gPpakf3sNLBH6c3OHF+bsCU1jbpRjQHSbRZEyu5l7YY0UG9QntPecVAXJXi3Asjy HDcIhszorLxsJH6pg5dq93xYlm6qN/Fld55nIh7fVcDT2JkTn5gQfToxm+jFSzAx 0SDNTuQUmLVs7Kj+dnKEZ3DW/j8rY9MQhQopondvaXgNiU/c5g8= =YW/a -----END PGP SIGNATURE----- --KISHs/FnjYvFOG5B--