Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dLXIH-00011y-8J for pgsql-hackers@arkaria.postgresql.org; Thu, 15 Jun 2017 16:06:49 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dLXIG-0008JP-Mp for pgsql-hackers@arkaria.postgresql.org; Thu, 15 Jun 2017 16:06:48 +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 1dLXIF-0008IA-Dp for pgsql-hackers@postgresql.org; Thu, 15 Jun 2017 16:06:47 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dLXIC-0002AY-Mo for pgsql-hackers@postgresql.org; Thu, 15 Jun 2017 16:06:46 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id E113C209AE; Thu, 15 Jun 2017 12:06:43 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute7.internal (MEProxy); Thu, 15 Jun 2017 12:06:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=aOaIv+7xXG8KWjVMaBeJMFMxPwq1V3wfwPZBdqm/Vu0=; b=NHs+KXbF rFyXrNT1los+CVXWbNxJK1HdDxAxoKD+sEofiJ8Nh7y3Pf4DFitQPzeF4SrxbTiy HRsBmJbYSxzP0Y422Mx+KbZe/vpmQQKlUkv7qeGiCZ8RNjsfsgjk0cYvYRX0vD73 HBKeCuzW7R1e1NDgIydJ/gLynWKjwmYKhOzsg6dzHUmes5ahiJNrIsH/ZQnUl2j8 zk9e2C5cuMrlPuP9sgSiXqJ1iFeFp7y+Xqlqmdn70wqM18EU+UPeV3Km8teO3rMD k0g+8Jh6D3MoHSTgySIvICdz63+yfYoV5lG9tOzjXfx87FVtjkMGb5+Z09GyY3Mf mrnNezQ+T/1zIw== X-ME-Sender: X-Sasl-enc: RM9xgp357as2d+GCXb6xj6odRsPBFTqMpvvJYK3YqcnH 1497542803 Received: from april.local (c-73-13-66-39.hsd1.pa.comcast.net [73.13.66.39]) by mail.messagingengine.com (Postfix) with ESMTPA id 613D22492D; Thu, 15 Jun 2017 12:06:43 -0400 (EDT) Subject: Re: WIP: Data at rest encryption To: Stephen Frost References: <20170613172459.GL3151@tamriel.snowman.net> <20170613174329.GK13873@momjian.us> <20170613182339.GP3151@tamriel.snowman.net> <20170613182910.GN13873@momjian.us> <20170613183858.GR3151@tamriel.snowman.net> <20170613185622.GO13873@momjian.us> <20170613192011.GS3151@tamriel.snowman.net> <20170613221104.GT3151@tamriel.snowman.net> <9cea5160-c64b-0b9e-d4b7-c57db2a696be@2ndquadrant.com> <20170614214119.GL1769@tamriel.snowman.net> Cc: Bruce Momjian , Ants Aasma , Robert Haas , PostgreSQL-development From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: <0b5611b8-af0f-152d-9c38-222b081c71ac@2ndquadrant.com> Date: Thu, 15 Jun 2017 12:06:49 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <20170614214119.GL1769@tamriel.snowman.net> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 8bit 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 On 6/14/17 17:41, Stephen Frost wrote: >> Relying on environment variables is clearly pretty crappy. So if that's >> the proposal, then I think it needs to be better. > I don't believe that was ever intended to be the final solution, I was > just pointing out that it's what the WIP patch did. > > The discussion had moved into having a command called which provided the > key on stdout, as I recall, allowing it to be whatever the user wished, > including binary of any kind. > > If you have other suggestions, I'm sure they would be well received. As > to the question of complexity, it certainly looks like it'll probably be > quite straight-forward for users to use. I think the passphrase entry part of the problem is actually a bit harder than it appears. Making this work well would be a major part of the usability story that this is being sold on. If the proposed solution is that you can cobble together a few bits of shell, then not only is that not very user-friendly, it also won't work consistently across platforms, won't work under systemd (launchd? Windows service?), and might behave awkwardly under restricted environments where there is no terminal or only a limited OS environment. Moreover, it leaves the security aspects of that part of the solution (keys lingering in memory or in swap) up to the user. There was a discussion a while ago about how to handle passphrase entry for SSL keys. The conclusion was that it works pretty crappily right now, and several suggestions for improvement were discussed. I suggest that fixing that properly and with flexibility could also yield a solution for encryption key entry. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers