From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: postgres_fdw: SCRAM authentication pass-through |
Date: | 2025-01-15 17:02:50 |
Message-ID: | E1tY6n4-001l1a-OM@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
postgres_fdw: SCRAM authentication pass-through
This enables SCRAM authentication for postgres_fdw when connecting to
a foreign server without having to store a plain-text password on user
mapping options.
This is done by saving the SCRAM ClientKey and ServeryKey from the
client authentication and using those instead of the plain-text
password for the server-side SCRAM exchange. The new foreign-server
or user-mapping option "use_scram_passthrough" enables this.
Co-authored-by: Matheus Alcantara <mths(dot)dev(at)pm(dot)me>
Co-authored-by: Peter Eisentraut <peter(at)eisentraut(dot)org>
Discussion: https://www.postgresql.org/message-id/flat/27b29a35-9b96-46a9-bc1a-914140869dac(at)gmail(dot)com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/761c79508e7fbc33c1b11754bdde4bd03ce9cbb3
Modified Files
--------------
contrib/postgres_fdw/Makefile | 1 +
contrib/postgres_fdw/connection.c | 69 ++++++++++-
contrib/postgres_fdw/expected/postgres_fdw.out | 4 +-
contrib/postgres_fdw/meson.build | 5 +
contrib/postgres_fdw/option.c | 3 +
contrib/postgres_fdw/t/001_auth_scram.pl | 151 +++++++++++++++++++++++++
doc/src/sgml/libpq.sgml | 28 +++++
doc/src/sgml/postgres-fdw.sgml | 72 ++++++++++++
src/backend/libpq/auth-scram.c | 14 ++-
src/include/libpq/libpq-be.h | 9 ++
src/interfaces/libpq/fe-auth-scram.c | 83 +++++++++-----
src/interfaces/libpq/fe-auth.c | 2 +-
src/interfaces/libpq/fe-connect.c | 47 ++++++++
src/interfaces/libpq/libpq-int.h | 6 +
14 files changed, 451 insertions(+), 43 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2025-01-15 18:37:20 | pgsql: IWYU widely useful pragmas |
Previous Message | Peter Eisentraut | 2025-01-15 16:04:04 | pgsql: Downgrade errors in object_ownercheck() to internal |