postgres/contrib/postgres_fdw
Jacob Champion d2e7d2a09d oauth: Disallow OAuth connections via postgres_fdw/dblink
A subsequent commit will reclassify oauth_client_secret from dispchar=""
to dispchar="*", so that UIs will treat it like a secret. For our FDWs,
this change will move that option from SERVER to USER MAPPING, which we
need to avoid.

But upon further discussion, we don't really want our FDWs to use our
builtin Device Authorization flow at all, for several reasons:

- the URL and code would be printed to the server logs, not sent over
  the client connection
- tokens are not cached/refreshed, so every single connection has to be
  manually authorized by a user with a browser
- oauth_client_secret needs to belong to the foreign server, but options
  on SERVER are publicly accessible
- all non-superusers would need password_required=false, which is
  dangerous

Future OAuth work can use FDWs as a motivating use case. But for now,
disallow all oauth_* connection options for these two extensions.

Reviewed-by: Noah Misch <noah@leadboat.com>
Discussion: https://postgr.es/m/20250415191435.55.nmisch%40google.com
2025-04-29 13:08:24 -07:00
..
expected oauth: Disallow OAuth connections via postgres_fdw/dblink 2025-04-29 13:08:24 -07:00
sql oauth: Disallow OAuth connections via postgres_fdw/dblink 2025-04-29 13:08:24 -07:00
t Fix typos and grammar in the code 2025-04-19 19:17:42 +09:00
.gitignore
connection.c postgres_fdw: improve security checks 2025-03-24 15:56:53 +01:00
deparse.c Convert PathKey to use CompareType 2025-04-04 11:22:20 +02:00
Makefile postgres_fdw: SCRAM authentication pass-through 2025-01-15 17:58:05 +01:00
meson.build postgres_fdw: SCRAM authentication pass-through 2025-01-15 17:58:05 +01:00
option.c oauth: Disallow OAuth connections via postgres_fdw/dblink 2025-04-29 13:08:24 -07:00
postgres_fdw--1.1--1.2.sql postgres_fdw: Extend postgres_fdw_get_connections to return remote backend PID. 2025-03-03 08:51:30 +09:00
postgres_fdw--1.0--1.1.sql postgres_fdw: Add functions to discard cached connections. 2021-01-26 15:35:54 +09:00
postgres_fdw--1.0.sql
postgres_fdw.c Harmonize function parameter names for Postgres 18. 2025-04-12 12:07:36 -04:00
postgres_fdw.control postgres_fdw: Add "used_in_xact" column to postgres_fdw_get_connections(). 2024-07-26 22:15:51 +09:00
postgres_fdw.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
shippable.c Update copyright for 2025 2025-01-01 11:21:55 -05:00