Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iB7z6-0001iz-EH for pgsql-general@arkaria.postgresql.org; Fri, 20 Sep 2019 01:45:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iB7z5-0005VD-BB for pgsql-general@arkaria.postgresql.org; Fri, 20 Sep 2019 01:45:19 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iB7z4-0005Ut-Rk for pgsql-general@lists.postgresql.org; Fri, 20 Sep 2019 01:45:19 +0000 Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iB7z2-00043i-KE for pgsql-general@lists.postgresql.org; Fri, 20 Sep 2019 01:45:17 +0000 Received: by mail-pg1-x532.google.com with SMTP id n9so2909516pgc.1 for ; Thu, 19 Sep 2019 18:45:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=qY/r5tg037Iekg2mYGn+iVhcU5Yv+KeF6W38PIx6UQw=; b=sr/+ZlwBXr7d5S0rSrU8qGuYsLPUqEmmsXuhQqw4a50BDkMV+3N01RtG0UrkJbIrxQ eMSkAb/TJ88nuxwR8gdiVRQT+mb/BgKoQfEEIjxv8NXfd5CMsF+p5HLrsVFyFN7Zd2wQ vmbVJwt4C00GDTzwAL/yj/bWb8M2mwmWwd+/4NfkWFz80lNGjvLTlVuBM20ly8TE5wUE +21nsmIK3Ux+FMY+UcXu3VOLwdOA8PZuHUJYsqsa3AyRIMpK2G1MCvafSNsMqPxSxe0p T7Gdm0IyQzFG+PREXcz/yPIfO8PjSiPXC/rTAWKZtOg1ysABOdczKn+PSslwZ+JEQNfD 3OwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=qY/r5tg037Iekg2mYGn+iVhcU5Yv+KeF6W38PIx6UQw=; b=c6N3Ux5Jh1iNCnuNvFCusXOkmkQjis1u2Xg1v6g0OhYaEcHauMpQvj4ZMx1fTl1e3X Xq/M+mGrMjx5Ou+j/hkwf68FT4pOo83VmYKexAhhLfO5jmuYXRpsYaWl57hRPxLOuOd2 vVWPqJY+X+cr8XJD8t8cfEF7jXZk8l8r44AwQ0SrLiMbIWvcRMZyuDqwCgjABeZZu8Hu 3htG5JAmQCAjEERo+wc1FZumyytcPR7gXwH2GMLf2hKK3JTVrmDoc4IYUvEwtIUFo9AS afJ852frKdDzmvyVlWKnjbNV7uxpx8Zu4ymb8zSJBJUycqYUJGUO0JWJAlyOz5W0yaRA bueQ== X-Gm-Message-State: APjAAAVxfCJnB/aFIdrD1PRe3L85x7PvyYHLdEUHjN7uP2VS9iXWnwg/ TDkfUwElz7eehU52J8+S0lSnS3IPQQ0= X-Google-Smtp-Source: APXvYqy+47YBLQyyOM6z1CCkpGo0Vs97AwgVnCDEFbQ9goRRdousqJFMzZIq4dUzpDRAA6x+kGfI2w== X-Received: by 2002:a63:741c:: with SMTP id p28mr12022404pgc.147.1568943915313; Thu, 19 Sep 2019 18:45:15 -0700 (PDT) Received: from 192-168-1-100.tpgi.com.au (59-102-34-177.tpgi.com.au. [59.102.34.177]) by smtp.gmail.com with ESMTPSA id 202sm255931pfu.161.2019.09.19.18.45.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Sep 2019 18:45:14 -0700 (PDT) Message-ID: <61030190ab24e39df8ebfd895b60ef4f90174fc2.camel@gmail.com> Subject: Re: PGPASSWORD in crypted form, for example BlowFish or SHA-256 From: rob stone To: Matthias Apitz , pgsql-general@lists.postgresql.org Date: Fri, 20 Sep 2019 11:45:11 +1000 In-Reply-To: <20190919132321.GA403679@sh4-5.1blu.de> References: <20190919103039.GA2501@c720-r342378> <20190919132321.GA403679@sh4-5.1blu.de> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5-1.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Thu, 2019-09-19 at 15:23 +0200, Matthias Apitz wrote: > El día Thursday, September 19, 2019 a las 10:31:01PM +1000, rob stone > escribió: > > > > > https://www.postgresql.org/docs/11/auth-password.html > > > > Chapters 20.5 and 20.6 may give you more information. > > The form of the password hash store in the PG server or interchange > over > the network is not my question. The question is more: When the Linux > server starts and with this the (ESQL/C written) application servers > are > starting, they need the password to connect and this is not provided > at > this moment from some keyboard or humanbeing. It must be stored on > the > server and available in clear for the server, but not for other eyes > on > the server, i.e. the place of the sorage must be ciphered. > > matthias > Sorry. More caffeine needed. If you use pg_service.conf you could write a little program to encrypt the password and store it in this file in its encrypted form. Then you application obtains the connection credentials from pg_service.conf, de-encrypts the password and is then able to form the connection string to access the required database. HTH, Robert