pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Allow root-owned SSL private keys in libpq, not only the backend
8+ messages / 2 participants
[nested] [flat]

Commits from this thread:
  2022-03-31 878e64d0f8 fcaf7d725d 143043191b a6bd1f0eef fb1d7f4519 402279afe4  Add missing newline in one libpq error message.
* pgsql: Allow root-owned SSL private keys in libpq, not only the backend
@ 2022-02-28 19:12  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 8+ messages in thread

From: Tom Lane @ 2022-02-28 19:12 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Allow root-owned SSL private keys in libpq, not only the backend.

This change makes libpq apply the same private-key-file ownership
and permissions checks that we have used in the backend since commit
9a83564c5.  Namely, that the private key can be owned by either the
current user or root (with different file permissions allowed in the
two cases).  This allows system-wide management of key files, which
is just as sensible on the client side as the server, particularly
when the client is itself some application daemon.

Sync the comments about this between libpq and the backend, too.

David Steele

Discussion: https://postgr.es/m/f4b7bc55-97ac-9e69-7398-335e212f7743@pgmasters.net

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/a59c79564bdc209a5bc7b02d706f0d7352eb82fa

Modified Files
--------------
src/backend/libpq/be-secure-common.c     | 28 +++++++++++-----------
src/interfaces/libpq/fe-secure-openssl.c | 40 +++++++++++++++++++++++++++++---
2 files changed, 50 insertions(+), 18 deletions(-)



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* pgsql: Allow root-owned SSL private keys in libpq, not only the backend
@ 2022-03-02 16:57  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 8+ messages in thread

From: Tom Lane @ 2022-03-02 16:57 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Allow root-owned SSL private keys in libpq, not only the backend.

This change makes libpq apply the same private-key-file ownership
and permissions checks that we have used in the backend since commit
9a83564c5.  Namely, that the private key can be owned by either the
current user or root (with different file permissions allowed in the
two cases).  This allows system-wide management of key files, which
is just as sensible on the client side as the server, particularly
when the client is itself some application daemon.

Sync the comments about this between libpq and the backend, too.

Back-patch of a59c79564 and 50f03473e into all supported branches.

David Steele

Discussion: https://postgr.es/m/f4b7bc55-97ac-9e69-7398-335e212f7743@pgmasters.net

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/72918ea86cb9308dd4748b4e269e3a53917cbdca

Modified Files
--------------
doc/src/sgml/libpq.sgml                  | 26 +++++++++++++++------
src/backend/libpq/be-secure-common.c     | 28 +++++++++++-----------
src/interfaces/libpq/fe-secure-openssl.c | 40 +++++++++++++++++++++++++++++---
3 files changed, 69 insertions(+), 25 deletions(-)



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* pgsql: Allow root-owned SSL private keys in libpq, not only the backend
@ 2022-03-02 16:57  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 8+ messages in thread

From: Tom Lane @ 2022-03-02 16:57 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Allow root-owned SSL private keys in libpq, not only the backend.

This change makes libpq apply the same private-key-file ownership
and permissions checks that we have used in the backend since commit
9a83564c5.  Namely, that the private key can be owned by either the
current user or root (with different file permissions allowed in the
two cases).  This allows system-wide management of key files, which
is just as sensible on the client side as the server, particularly
when the client is itself some application daemon.

Sync the comments about this between libpq and the backend, too.

Back-patch of a59c79564 and 50f03473e into all supported branches.

David Steele

Discussion: https://postgr.es/m/f4b7bc55-97ac-9e69-7398-335e212f7743@pgmasters.net

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/9050999efea72eb763fd9349d295761f4ff4da4d

Modified Files
--------------
doc/src/sgml/libpq.sgml                  | 32 +++++++++++++++++--------
src/backend/libpq/be-secure-openssl.c    | 28 +++++++++++-----------
src/interfaces/libpq/fe-secure-openssl.c | 40 +++++++++++++++++++++++++++++---
3 files changed, 72 insertions(+), 28 deletions(-)



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* pgsql: Allow root-owned SSL private keys in libpq, not only the backend
@ 2022-03-02 16:57  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 8+ messages in thread

From: Tom Lane @ 2022-03-02 16:57 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Allow root-owned SSL private keys in libpq, not only the backend.

This change makes libpq apply the same private-key-file ownership
and permissions checks that we have used in the backend since commit
9a83564c5.  Namely, that the private key can be owned by either the
current user or root (with different file permissions allowed in the
two cases).  This allows system-wide management of key files, which
is just as sensible on the client side as the server, particularly
when the client is itself some application daemon.

Sync the comments about this between libpq and the backend, too.

Back-patch of a59c79564 and 50f03473e into all supported branches.

David Steele

Discussion: https://postgr.es/m/f4b7bc55-97ac-9e69-7398-335e212f7743@pgmasters.net

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/6599d8f1264299ee595f2eaf4dc6a9aa2d7940d2

Modified Files
--------------
doc/src/sgml/libpq.sgml                  | 26 +++++++++++++++------
src/backend/libpq/be-secure-common.c     | 28 +++++++++++-----------
src/interfaces/libpq/fe-secure-openssl.c | 40 +++++++++++++++++++++++++++++---
3 files changed, 69 insertions(+), 25 deletions(-)



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* pgsql: Allow root-owned SSL private keys in libpq, not only the backend
@ 2022-03-02 16:57  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 8+ messages in thread

From: Tom Lane @ 2022-03-02 16:57 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Allow root-owned SSL private keys in libpq, not only the backend.

This change makes libpq apply the same private-key-file ownership
and permissions checks that we have used in the backend since commit
9a83564c5.  Namely, that the private key can be owned by either the
current user or root (with different file permissions allowed in the
two cases).  This allows system-wide management of key files, which
is just as sensible on the client side as the server, particularly
when the client is itself some application daemon.

Sync the comments about this between libpq and the backend, too.

Back-patch of a59c79564 and 50f03473e into all supported branches.

David Steele

Discussion: https://postgr.es/m/f4b7bc55-97ac-9e69-7398-335e212f7743@pgmasters.net

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/2a1f84636dc335a3edf53a8361ae44bb2ae00093

Modified Files
--------------
doc/src/sgml/libpq.sgml                  | 26 +++++++++++++++------
src/backend/libpq/be-secure-common.c     | 28 +++++++++++-----------
src/interfaces/libpq/fe-secure-openssl.c | 40 +++++++++++++++++++++++++++++---
3 files changed, 69 insertions(+), 25 deletions(-)



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* pgsql: Allow root-owned SSL private keys in libpq, not only the backend
@ 2022-03-02 16:57  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 8+ messages in thread

From: Tom Lane @ 2022-03-02 16:57 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Allow root-owned SSL private keys in libpq, not only the backend.

This change makes libpq apply the same private-key-file ownership
and permissions checks that we have used in the backend since commit
9a83564c5.  Namely, that the private key can be owned by either the
current user or root (with different file permissions allowed in the
two cases).  This allows system-wide management of key files, which
is just as sensible on the client side as the server, particularly
when the client is itself some application daemon.

Sync the comments about this between libpq and the backend, too.

Back-patch of a59c79564 and 50f03473e into all supported branches.

David Steele

Discussion: https://postgr.es/m/f4b7bc55-97ac-9e69-7398-335e212f7743@pgmasters.net

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/5bb3d91ea9269dfe8a7f429fe68e1148384f1cbf

Modified Files
--------------
doc/src/sgml/libpq.sgml                  | 26 +++++++++++++++------
src/backend/libpq/be-secure-common.c     | 28 +++++++++++-----------
src/interfaces/libpq/fe-secure-openssl.c | 40 +++++++++++++++++++++++++++++---
3 files changed, 69 insertions(+), 25 deletions(-)



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: pgsql: Allow root-owned SSL private keys in libpq, not only the backend
@ 2022-03-31 07:34  Peter Eisentraut <peter.eisentraut@enterprisedb.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 8+ messages in thread

From: Peter Eisentraut @ 2022-03-31 07:34 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-committers@lists.postgresql.org

On 02.03.22 17:57, Tom Lane wrote:
> Allow root-owned SSL private keys in libpq, not only the backend.
> 
> This change makes libpq apply the same private-key-file ownership
> and permissions checks that we have used in the backend since commit
> 9a83564c5.  Namely, that the private key can be owned by either the
> current user or root (with different file permissions allowed in the
> two cases).  This allows system-wide management of key files, which
> is just as sensible on the client side as the server, particularly
> when the client is itself some application daemon.
> 
> Sync the comments about this between libpq and the backend, too.
> 
> Back-patch of a59c79564 and 50f03473e into all supported branches.

I think this

     libpq_gettext("private key file \"%s\" is not a regular file"),

should have a trailing newline in the string.





^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: pgsql: Allow root-owned SSL private keys in libpq, not only the backend
@ 2022-03-31 13:53  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
  0 siblings, 0 replies; 8+ messages in thread

From: Tom Lane @ 2022-03-31 13:53 UTC (permalink / raw)
  To: Peter Eisentraut <peter.eisentraut@enterprisedb.com>; +Cc: pgsql-committers@lists.postgresql.org

Peter Eisentraut <peter.eisentraut@enterprisedb.com> writes:
> I think this
>      libpq_gettext("private key file \"%s\" is not a regular file"),
> should have a trailing newline in the string.

Thanks, will fix.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 8+ messages in thread


end of thread, other threads:[~2022-03-31 13:53 UTC | newest]

Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-02-28 19:12 pgsql: Allow root-owned SSL private keys in libpq, not only the backend Tom Lane <tgl@sss.pgh.pa.us>
2022-03-02 16:57 pgsql: Allow root-owned SSL private keys in libpq, not only the backend Tom Lane <tgl@sss.pgh.pa.us>
2022-03-02 16:57 pgsql: Allow root-owned SSL private keys in libpq, not only the backend Tom Lane <tgl@sss.pgh.pa.us>
2022-03-31 07:34 ` Peter Eisentraut <peter.eisentraut@enterprisedb.com>
2022-03-31 13:53   ` Tom Lane <tgl@sss.pgh.pa.us>
2022-03-02 16:57 pgsql: Allow root-owned SSL private keys in libpq, not only the backend Tom Lane <tgl@sss.pgh.pa.us>
2022-03-02 16:57 pgsql: Allow root-owned SSL private keys in libpq, not only the backend Tom Lane <tgl@sss.pgh.pa.us>
2022-03-02 16:57 pgsql: Allow root-owned SSL private keys in libpq, not only the backend Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox