Feature Request: SASL OAUTHBEARER support for PostgreSQL 18
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- javascript, postgresql
- Área
- authentication, databases
Línea de trabajo
No se nombran archivos, pruebas ni puntos de entrada. Comienza con las referencias a RFC 7628, PostgreSQL OAuth authentication, libpq OAuth client y SASL protocol, y después inspecciona la implementación existente de SASL y password-callback. Se considera terminado cuando OAUTHBEARER se negocia correctamente, se definen los parámetros de conexión de OAuth y un bearer-token hook, y funcionan las PostgreSQL 18 OAuth connections.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- JavaScript
- Estrellas
- 13.2k
- Forks
- 1.4k
- Merge medio
- 6 d 15 h
- PR fusionados (30 d)
- 6
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de brianc/node-postgres
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
brianc/node-postgres#3770 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
brianc/node-postgres#3716 · 1 comentario ·
-
# remove bring your own promise Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
brianc/node-postgres#3631 · 1 comentario ·
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 62/100
brianc/node-postgres#2857 ·
-
can't view docs for old versions Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 68/100
brianc/node-postgres#2433 ·
Todos los issues de brianc/node-postgres
Issues similares
-
Update HugeIcons library Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
antfu-collective/icones#398 ·
-
ECmail.com Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
wesbos/burner-email-providers#554 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
radiantearth/stac-browser#1023 ·
-
HMR stops working Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
components-web-app/docs#92 ·