Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fq1TJ-0001Q3-Qx for pgsql-admin@arkaria.postgresql.org; Wed, 15 Aug 2018 19:28:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fq1TI-00019R-6K for pgsql-admin@arkaria.postgresql.org; Wed, 15 Aug 2018 19:28:44 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fq1TH-00019K-Qs for pgsql-admin@lists.postgresql.org; Wed, 15 Aug 2018 19:28:43 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fq1TE-0000hM-Vv for pgsql-admin@lists.postgresql.org; Wed, 15 Aug 2018 19:28:42 +0000 Received: from bruce by momjian.us with local (Exim 4.84_2) (envelope-from ) id 1fq1TC-0000aD-NM; Wed, 15 Aug 2018 15:28:38 -0400 Date: Wed, 15 Aug 2018 15:28:38 -0400 From: Bruce Momjian To: Evan Rempel Cc: pgsql-admin@lists.postgresql.org Subject: Re: How to revoke privileged from PostgreSQL's superuser Message-ID: <20180815192838.GA5005@momjian.us> References: <913907.28546.qm@web103014.mail.kks.yahoo.co.jp> <20180810194105.GD7840@momjian.us> <20180814195919.GA29140@momjian.us> <20180815145912.GA11573@momjian.us> <10cde505-db4b-bbeb-7d8a-7c4e145c6042@uvic.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <10cde505-db4b-bbeb-7d8a-7c4e145c6042@uvic.ca> User-Agent: Mutt/1.5.23 (2014-03-12) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Wed, Aug 15, 2018 at 09:05:51AM -0700, Evan Rempel wrote: > At the end of the day someone has full access and control and can do anything without auditing database statements. > > For instance, as the root user on the server, I can do: > > - shutdown the server database > - copy the entire DB filespace to my workstation > - change the workstation config for no logging/auditing > - start the workstation Database > - make all the changes I want at the workstation. > - stop the workstation database > - copy all of the files back to the server > - start the server Database. > > no logging of any kind and all of the data would be suspect. Well, that is an intersting attack, and I don't think it requires root --- all it requires is access to the Postgres data directory. Frankly, I don't know if there is a way to prevent the Postgres superuser from silently disabling logging because the _data_ is fully under the control of the Postgres superuser. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Ancient Roman grave inscription +