Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Feature Request: SASL OAUTHBEARER support for PostgreSQL 18

Abierto
#3,687 0 comentarios 1 reacción 0 asignados Ver en GitHub

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

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

feature request

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 OAUTHBEARER in the server's advertised SASL mechanism list
  • Implementation of the SASL OAUTHBEARER message exchange
  • New connection parameters for oauth_issuer and oauth_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

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de brianc/node-postgres

Todos los issues de brianc/node-postgres

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.