Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dLdRy-00072J-93 for pgsql-hackers@arkaria.postgresql.org; Thu, 15 Jun 2017 22:41:14 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dLdRx-0001Nr-MA for pgsql-hackers@arkaria.postgresql.org; Thu, 15 Jun 2017 22:41:13 +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.84_2) (envelope-from ) id 1dLdRw-0001MH-1k for pgsql-hackers@postgresql.org; Thu, 15 Jun 2017 22:41:12 +0000 Received: from tamriel.snowman.net ([72.66.115.51]) by makus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dLdRt-0001Mx-EX for pgsql-hackers@postgresql.org; Thu, 15 Jun 2017 22:41:10 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id D700D5F795; Thu, 15 Jun 2017 18:41:08 -0400 (EDT) Date: Thu, 15 Jun 2017 18:41:08 -0400 From: Stephen Frost To: Bruce Momjian Cc: Robert Haas , Peter Eisentraut , Ants Aasma , PostgreSQL-development Subject: Re: WIP: Data at rest encryption Message-ID: <20170615224108.GC1769@tamriel.snowman.net> References: <20170613192011.GS3151@tamriel.snowman.net> <20170613221104.GT3151@tamriel.snowman.net> <9cea5160-c64b-0b9e-d4b7-c57db2a696be@2ndquadrant.com> <20170614214119.GL1769@tamriel.snowman.net> <0b5611b8-af0f-152d-9c38-222b081c71ac@2ndquadrant.com> <20170615202942.GA20904@momjian.us> <20170615211201.GC8443@momjian.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="PtV1LuJoEDsm7sfb" Content-Disposition: inline In-Reply-To: <20170615211201.GC8443@momjian.us> User-Agent: Mutt/1.5.21 (2010-09-15) 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 --PtV1LuJoEDsm7sfb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Bruce, * Bruce Momjian (bruce@momjian.us) wrote: > On Thu, Jun 15, 2017 at 05:04:17PM -0400, Robert Haas wrote: > > > Also, there is the sense that security requires > > > trust of the root user, while using Postgres doesn't require the root > > > user to also use Postgres. > >=20 > > I don't understand this. It is certainly true that you're running > > binaries owned by root, the root user could Trojan the binaries and > > break any security you think you have. But that problem is no better > > or worse for PostgreSQL than anything else. >=20 > I couldn't find a cleaner way to see it --- it is that database use > doesn't involve the root user using it, while database security requires > the root user to also be security-conscious. I tend to agree with Robert here (in general). Further, there are certainly environments where the administrator with root access is absolutely security conscious, but that doesn't mean that the DBA has easy access to the root account or to folks who have that level of access and it's much easier for the DBA if they're able to address all of their requirements by building PG themselves, installing it, and, ideally, encrypting the DB. > > > One serious difference between in-database-encryption and SSH keys is > > > that the use of passwords for SSH is well understood and reasonable to > > > use, while I think we all admit that use of passwords for database > > > objects like SSL keys is murky. Use of keys for OS-level encryption = is > > > a little better handled, but not as clean as SSH keys. > >=20 > > Peter pointed out upthread that our handling of SSL passphrases leaves > > a lot to be desired, and that maybe we should fix that problem first; > > I agree. But I don't think this is any kind of intrinsic limitation > > of PostgreSQL vs. encrypted filesystems vs. SSH; it's just a > > quality-of-implementation issue. I'm not thrilled with asking Ants to implement a solution to SSL passphrases, and generalizing it to work for this, to get this feature accepted. I assume that the reason for asking for that work to be done now is because we decided that the current approach for SSL sucks but we couldn't actually drop support for it, but we don't want to add other features which work in a similar way because, well, it sucks. I get that. I'm not thrilled with it, but I get it. I'm hopeful it ends up not being too bad, but if it ends up meaning we don't get this feature, then I'll reconsider my position about agreeing that it's an acceptable requirement. > I think there are environmental issues that make password use on SSH > easier than the other cases --- it isn't just code quality. However, it > would be good to research how SSH handles it to see if we can get any > ideas. Actually, the approach SSH uses is a really good one, imv, and one which we might be able to leverage.. I'm not sure though. I will say that, in general, I like the idea of leveraging the external libraries which handle keys and deal with encryption to make this happen as those allow things like hardware devices to hold the key and possibly perform the encryption/decryption, etc. Thanks! Stephen --PtV1LuJoEDsm7sfb Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJZQw0EAAoJEO1sijiDR2RVIecP/3vuNTzhQtBB2/+QS0p0WqNF uKZnUY58qZK1NbQw7BfCPvyjxxDoZcPp6U8woFet/1NAOioJCTTktyTGjCmT52mg aaAO24DxAjfsu8GFeSaILCWTIYOb1zJxQUmUk/gGu5U9XWqoMOBKkdKdAq/u+YM2 5wLwDKio7qQMBKO592RwBKbbpXXulB3vdY9seFDJntb601ysz1jSOBHIIKn/gV+g VYbKGi6FpODDBfT9bsKbV8OhHv6Og4UE1to7Hp1ugWjEeGVE6NXQCf1MhgsJ9E2k 5JfUSNr/XzTaIsB4Najnn4TlXftgdWnIaSx8cqx/XDpHKC9z5XsVMPIAoA/9xvA/ p/vV2/GVXTOe9IO6jE9HnaJTFdSoMB28GDf7Qc7pV6tILC1YFjL7mwxZ204QVxeH eYD4D4y6YgPBbmSp7pT0LT44pIz2ncvtJ0/axX5cIbYSPZRxiXwqLqx6Jqo+uIAY oyFtBo2xJI/JL+SdSHA1FV2fVYr5DHGeaa94KBB8KbpSGGay6s6Y38Q0Y44hVX3S w3O281hR/iqxUgVUQTLiiXo5SGYq1GLEo0Tg6jS+2oq6tZC44J/ue5SUpIdLzkZp QpW9d1qGBn3aYOGeMw1gpcdTR5jvzwo8gjMkh2Z219/Ci2orAh76kw6SfJElLzsW ONAIH11GgPl7NAMK5Fy9 =JGgl -----END PGP SIGNATURE----- --PtV1LuJoEDsm7sfb--