Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ktKau-0003sI-UB for pgsql-committers@arkaria.postgresql.org; Sun, 27 Dec 2020 01:11:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ktKar-0005Ut-K3 for pgsql-committers@arkaria.postgresql.org; Sun, 27 Dec 2020 01:11:33 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ktKaq-0005Ul-5l for pgsql-committers@lists.postgresql.org; Sun, 27 Dec 2020 01:11:33 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ktKal-0002Q0-21 for pgsql-committers@lists.postgresql.org; Sun, 27 Dec 2020 01:11:31 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id ACDF3AD8; Sat, 26 Dec 2020 20:11:23 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sat, 26 Dec 2020 20:11:23 -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=fm3; bh=wJf/lSQ/Hox+TZO4n71cq2gnx2v 6cstoafYQf41kZdA=; b=VZp8jhIXaP3hmlvCLPvRCE9glGYaaQvKSCroZtJ3trL eWfs7X3VUwhLF07nMfHb9v2TocAYEB/HEMMayh1PJooXoNj4jEI7mb2T+6a1HU/i nych2l+MstyMGNSoWrvq2zL+djO4MaKqwGK1ZQBhWHckUvld3PC6a9IST8jvAocW V+5FkzBmCrGk3Yinxt7CsKsEaAz4kvDxIY6mF0ynOqYsPH5ry90t1lkePRcyhQQC vit/tmXsQ7yDvWxHg66rCZpHNnFk9R834Iatty3AivTBBmVM018d/Y9hsOWpH3Wb GqhFV5n6PzPn+DkhIBnWKVz0EGpTMfpLmU8h8xR0hHw== 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=fm1; bh=wJf/lS Q/Hox+TZO4n71cq2gnx2v6cstoafYQf41kZdA=; b=G9HYDVnsx9Ionl00I2V4M7 oLkMBaXgn3NpqeoYgxmrrhK8f7dZw3DABuQ9bwcTSElthZVQHyLfq/cV/exoB9N2 F1RQdigX7D/3FNXGjlS2QO8PtwjakeloF78PJzJDQGdFYS3kOsw9TMRi+0ep0X3r SqP6kLwnrl+uGv6R6Pws+7KkXYrD+oNCeGv7vPeFltUFyM4ynFVuDN0BkUFKo2NR AdE7ojQHiWxwqr6e61bwK3aLo2MLL/Ol2QAhtWH7Lqz/QtoFUt5Q6fsINVSweyTY InwIC6Bs7i4aLUuXSuibE0EwGWCxFsnsNQV08q6fkrybYhMk4daywqSP/rZhTqGw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvdduiedgfedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpedvgeduuefhtdeuleettdevjeeh heeiveeuieegleetgeeljeelieeuieehgeevhfenucfkphepudduuddruddtvddrudektd drudekheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhm pehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id 66967240057; Sat, 26 Dec 2020 20:11:21 -0500 (EST) Date: Sun, 27 Dec 2020 10:11:17 +0900 From: Michael Paquier To: Fabien COELHO Cc: Bruce Momjian , Tom Lane , pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Add pg_alterckey utility to change the cluster key Message-ID: References: <1252111.1608953815@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="+qeIPzsurKs3SSZY" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --+qeIPzsurKs3SSZY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Dec 26, 2020 at 06:03:00AM -0400, Fabien COELHO wrote: > The feeling I expressed early in the thread is that the design should be > extendable, so that it does not fit only one particular use-case but fail at > any other that were not the author's, and a large reimplementation would be > needed to get them in. I was thinking of having a closer look with that in > mind. In particular and IMHO, the "master key" should not (necessarily) be > hold by a postgres process, not sure what the current status is, but that is > an example. Hmm. That sounds like a fair concern to me. Based on the information given by the docs, three keys are actually created/used at initdb time: - One for the relation files, that does not have to be shared across the nodes in the cluster. - One for the WAL files, that has to be shared across the nodes of the cluster or no physical replication could happen. - One to encrypt the first two ones. The first two keys are stored in pg_cryptokeys/ in the data directory, while the third one is retrieved using a GUC for validation at server startup for the other two. Do we necessarily have to store the first level keys within the data directory? I guess that this choice has been made for performance, but is that really something that a user would want all the time? AES256 is the only option available for the data keys. What if somebody wants to roll in their own encryption? Companies can have many requirements in terms of accepting the use of one option or another. -- Michael --+qeIPzsurKs3SSZY Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl/n3zUACgkQnvQgOdby QH0WZA//Yx44VhY6e5k0ZnDSAG+HhTtrdouck8lMLO2whEsqUwSLZD5LQr5oaM7K Jd3Nc7HO5S3rTSkhpfblSediKzJK9G0xevwCpkksktvxmjSXvQLNWiJ7a4/+IJBM tgVLVT2ylfGUe7774h2ZB/g/VkZMB3jHzKf+a7IS71edMmHkhdVPVA1KykVN4+Tw ejV8NzMRXslxQJypEydsXih6rbWPJd5d0n8d3iOATBbkSkqq28Eyo97XVCq477dM sOQ+zHfhVKQg4sTY7RmryNbMHIoO5s2wRQ6sbuP09N/lf7vE2FWlj4Mhm83v+XZW WqgyqNXUtNxG3OPwgbd3FZ23zHPzGrrazfGIJGHdoLGQoHMY2golMt5hBdcxuO4d CK1XO9k7P/BHZIxFKU9hfSu9Ti4E2RTse+rHbGzT9zWH8wT8zJYT1lIZKWJlKr1a 6qPA35L2xjYCXVCZwS6dHe95FZZYLekVwhtqw8S2NYRNerDotwUw98Zwm4eR9djS PR+1A0TKjO6v5y6LOK2sdghzCjVMh/ynK/boYPkJSAQ6JqHKIimWGPIIh4kmg3bx P8R6uVsVdQ/22RqMoSRVUXkT6xmZMZMphHWmcuhW9Nj4bHrHYgjHNMzzeaBT/CYw 8uY2ofmzv9FC0n0cAAMV41Fq3L/hEqGxrJd56heboqxJjrfEljU= =HWDa -----END PGP SIGNATURE----- --+qeIPzsurKs3SSZY--