Feature Request: SASL OAUTHBEARER support for PostgreSQL 18
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- javascript, postgresql
- Ambito
- authentication, databases
Direzione di ricerca
Non vengono nominati file, test o punti di ingresso. Inizia con i riferimenti a RFC 7628, PostgreSQL OAuth authentication, libpq OAuth client e SASL protocol, quindi esamina l’implementazione esistente di SASL e password-callback. Il lavoro è completato quando OAUTHBEARER viene negoziato correttamente, sono definiti i parametri di connessione OAuth e un bearer-token hook, e le PostgreSQL 18 OAuth connections funzionano.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
PostgreSQL 18 introduced native OAuth 2.0 authentication via the SASL OAUTHBEARER mechanism (RFC 7628). pg currently has no support for this mechanism, which prevents connections to any PostgreSQL 18 instance configured with method=oauth in pg_hba.conf.
Background
PG18 adds OAUTHBEARER as a third SASL mechanism alongside the existing SCRAM-SHA-256 and SCRAM-SHA-256-PLUS. When a client connects to an OAuth-configured server, the server advertises OAUTHBEARER in its AuthenticationSASL message. The client must then conduct a multi-step SASL exchange, either:
- Running a full OAuth flow (e.g. Device Authorization Grant, RFC 8628) and presenting the resulting bearer token, or
- Presenting a pre-fetched bearer token directly in the initial SASL message
Relevant PG18 docs: https://www.postgresql.org/docs/current/auth-oauth.html
Why the existing password callback isn't sufficient
The dynamic password callback added for AWS RDS token auth gets conceptually close, but isn't a workaround here. Even if a valid bearer token were returned from the callback, pg would attempt to use it in a SCRAM exchange. The server expects OAUTHBEARER SASL messages instead and will reject the connection at the protocol level.
What's needed
- Recognition of
OAUTHBEARERin the server's advertised SASL mechanism list - Implementation of the SASL OAUTHBEARER message exchange
- New connection parameters for
oauth_issuerandoauth_client_id(mirroring libpq) - A hook or callback for the caller to supply a bearer token (fetched from user's IdP)
References
- Lingua principale
- JavaScript
- Stelle
- 13.2k
- Fork
- 1.4k
- Merge medio
- 6g 15h
- PR unite (30g)
- 6
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di brianc/node-postgres
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
brianc/node-postgres#3770 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
brianc/node-postgres#3716 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
brianc/node-postgres#3631 · 1 commento ·
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 62/100
brianc/node-postgres#2857 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 68/100
brianc/node-postgres#2433 ·
Tutte le issue di brianc/node-postgres
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
area-deployment area-integrations triage:bot-seen
Difficoltà 2/5 Mezza giornata Idoneità per principianti 86/100
-
Issue-Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
sugarlabs/musicblocks#8924 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
ArduPilot/ardupilot_wiki#8088 ·
-
[BUG] createTool tools cannot be registered with Mastra when exactOptionalPropertyTypes is enabled Apertacustomer-eng status: needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100