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 1kqikV-0002ye-4A for pgsql-hackers@arkaria.postgresql.org; Sat, 19 Dec 2020 20:22:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kqikT-0002kP-Sx for pgsql-hackers@arkaria.postgresql.org; Sat, 19 Dec 2020 20:22:41 +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 1kqikT-0002kI-M9 for pgsql-hackers@lists.postgresql.org; Sat, 19 Dec 2020 20:22:41 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kqikR-0004KR-6N for pgsql-hackers@postgresql.org; Sat, 19 Dec 2020 20:22:41 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1kqikM-0007NP-Tl; Sat, 19 Dec 2020 15:22:34 -0500 Date: Sat, 19 Dec 2020 15:22:34 -0500 From: Bruce Momjian To: Alastair Turner Cc: Stephen Frost , Michael Paquier , PostgreSQL-development , Masahiko Sawada Subject: Re: Proposed patch for key managment Message-ID: <20201219202234.GJ28841@momjian.us> References: <20201216001228.GC14807@momjian.us> <20201216213200.GS16415@tamriel.snowman.net> <20201216224331.GV16415@tamriel.snowman.net> <20201218213624.GG16415@tamriel.snowman.net> <20201219023844.GG28841@momjian.us> <20201219165837.GH28841@momjian.us> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="MnLPg7ZWsaic7Fhd" Content-Disposition: inline In-Reply-To: <20201219165837.GH28841@momjian.us> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --MnLPg7ZWsaic7Fhd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Dec 19, 2020 at 11:58:37AM -0500, Bruce Momjian wrote: > My final point is that we can find ways to do what you are suggesting as > an addition to what we are adding now. What we need is clear > justification of why these additional features are needed. Requiring > the use of a true random number generator is a valid argument, but we > need to figure out, once this is implemented, who really wants that, and > how to implement it cleanly. I added a comment to this script to explain how to generate a true random passphrase, attached. -- Bruce Momjian https://momjian.us EnterpriseDB https://enterprisedb.com The usefulness of a cup is in its emptiness, Bruce Lee --MnLPg7ZWsaic7Fhd Content-Type: application/x-sh Content-Disposition: attachment; filename="pass_fd.sh" Content-Transfer-Encoding: quoted-printable #!/bin/sh=0A=0A# This uses a passphrase supplied by the user=0A# If OpenSSL= is installed, you can generate a passphrase by running:=0A# openssl rand = -hex 32=0A# To get a true random passphrase, run:=0A# wget -q -O - 'https:/= /www.random.org/cgi-bin/randbyte?nbytes=3D32&format=3Dh' | tr -d ' \n'; ech= o=0A=0A[ "$#" -ne 2 ] && echo "cluster_passphrase_command usage: $0 %R \"%P= \"" 1>&2 && exit 1=0A=0AFD=3D"$1"=0A[ ! -t "$FD" ] && echo "file descriptor= $FD does not refer to a terminal" 1>&2 && exit 1=0A=0AMSG=3D"$2"=0A=0A=0A#= ----------------------------------------------------------------------=0A= =0A=0Astty -echo <&"$FD"=0A=0Aecho 1>&"$FD"=0Aecho -n "$MSG" 1>&"$FD"=0Area= d PASS <&"$FD"=0A=0Astty echo <&"$FD"=0A=0Aif [ ! "$PASS" ]=0Athen echo 'in= valid: empty passphrase' 1>&2=0A exit 1=0Afi=0A=0Aecho -n "$PASS" |=0A sha= 256sum |=0A cut -d' ' -f1=0A=0Aexit 0=0A --MnLPg7ZWsaic7Fhd--