Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Feature Request: SASL OAUTHBEARER support for PostgreSQL 18

Đang mở
#3,687 0 bình luận 1 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
javascript, postgresql
Lĩnh vực
authentication, databases

Hướng nghiên cứu

Không có tệp, bài kiểm thử hoặc điểm vào nào được nêu. Hãy bắt đầu với các tài liệu tham chiếu về RFC 7628, PostgreSQL OAuth authentication, libpq OAuth client và SASL protocol, sau đó kiểm tra triển khai SASL và password-callback hiện có. Được xem là hoàn thành khi OAUTHBEARER được thương lượng chính xác, các tham số kết nối OAuth và một bearer-token hook được định nghĩa, đồng thời PostgreSQL 18 OAuth connections hoạt động.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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
Ngôn ngữ chính
JavaScript
Star
13.2k
Fork
1.4k
Merge trung bình
6 ngày 15 giờ
Pull request đã merge (30 ngày)
6

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của brianc/node-postgres

Tất cả issue của brianc/node-postgres

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.