Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dKnOM-0006t2-Co for pgsql-hackers@arkaria.postgresql.org; Tue, 13 Jun 2017 15:06:02 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dKnOL-0006yD-Vm for pgsql-hackers@arkaria.postgresql.org; Tue, 13 Jun 2017 15:06:02 +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 1dKnMn-0002tQ-Vz for pgsql-hackers@postgresql.org; Tue, 13 Jun 2017 15:04:26 +0000 Received: from tamriel.snowman.net ([72.66.115.51]) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dKnMk-00059a-LI for pgsql-hackers@postgresql.org; Tue, 13 Jun 2017 15:04:25 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 9E6155F795; Tue, 13 Jun 2017 11:04:21 -0400 (EDT) Date: Tue, 13 Jun 2017 11:04:21 -0400 From: Stephen Frost To: Peter Eisentraut Cc: Ants Aasma , Robert Haas , PostgreSQL-development Subject: Re: WIP: Data at rest encryption Message-ID: <20170613150421.GE3151@tamriel.snowman.net> References: <06b6db11-3a3f-4d24-6f57-450f96ecda84@2ndquadrant.com> <20170613132416.GD3151@tamriel.snowman.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="rU/2C8Pi2woy9Lyw" 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-117-generic (x86_64) X-Uptime: 10:53:50 up 35 days, 15:26, 15 users, load average: 0.01, 0.08, 0.12 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 --rU/2C8Pi2woy9Lyw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Peter, * Peter Eisentraut (peter.eisentraut@2ndquadrant.com) wrote: > I wonder what the proper extent of "encryption at rest" should be. If > you encrypt just on a file or block level, then someone looking at the > data directory or a backup can still learn a number of things about the > number of tables, transaction rates, various configuration settings, and > so on. In the scenario of a sensitive application hosted on a shared > SAN, I don't think that is good enough. If someone has access to the SAN, it'd be very difficult to avoid revealing some information about transaction rates or I/O throughput. Being able to have the configuration files encrypted would be good (thinking particularly about pg_hba.conf/pg_ident.conf) but I don't know that it's strictly necessary or that it would have to be done in an initial version. Certainly, there is a trade-off here when it comes to the information which someone can learn about the system by looking at the number and sizes of files from using PG-based encryption vs. what information someone can learn from being able to look at only an encrypted filesystem, but that's a trade-off which security experts are good at making a determination on and will be case-by-case, based on how easy setting up filesystem-encryption is in a particular environment and what the use-cases are for the system. > Also, in the use case you describe, if you use pg_basebackup to make a > direct encrypted copy of a data directory, I think that would mean you'd > have to keep using the same key for all copies. That's true, but that might be acceptable and possibly even desirable in certain cases. On the other hand, it would certainly be a useful feature to have a way to migrate from one key to another. Perhaps that would start out as an off-line tool, but maybe we'd be able to work out a way to support having it done on-line in the future (certainly non-trivial, but if we supported multiple keys concurrently with a preference for which key is used to write data back out, and required that checksums be in place to allow us to test if decrypting with a specific key worked ... lots more hand-waving here... ). Thanks! Stephen --rU/2C8Pi2woy9Lyw Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJZP/71AAoJEO1sijiDR2RVhdsQAMfX1cMknc03IeRpte9msSTy k3XbutaFEC3HzfkCXVLQmY661GxAyJEVeCU10l0Nm/btT+GXwIpvohNCKDK/sWGI rs1G4y3ikWf4VIVZgN0G3eO5mwePHdRsyt9h2XQHc3xma0uae8GnI57mmxOeXtlJ msK2VVloMvX5NDsvrB0hVHWrqFL2aDgW0iGsj8kKJkjJd8yqh0KR1S3NjY7hesns 18oJuEXt96nfzzgAHMBH09hzqs0Dd8HHpqaUyE134LMn2YTcfUPWkXsZzB1/mU4e 8OE6Y4e/TY55zdYXCWvP0wknJixP6o42prcVDGLsYR0wmWDwtj2y2ZWOUzHaCYDc fexulu5pBLH0cUhV30iEa298m5LK1Zs+u1vvL3u5T9Jg9GzQ+zbeMYE9VaYllzqN lsvy4EHda7OYGRQHxNoctOqpfXVFlTtle6jjRz+ptF85gjpSkFLkgZ+VbStmVNam 6ArqX2bEg7ah2mdGTs0xweM8d3VJWgO857GurHwVq1+Vr5EDxh2SVU2Uop9rHrLg gtmd5bRmjrYafrEzexPph37OYMLhEjvybB+aR3FRgf71YC8LZBNlWre+DZhcl7tP 60Tzq8EHlHQf64fatQPNnmst8eroLVD+VCVg41sLOlUu9VYkumIfKfEKJXd6KmLp fmhVnRb9zhxhWRBhm1jT =O1WW -----END PGP SIGNATURE----- --rU/2C8Pi2woy9Lyw--