Skip to content

Conversation

@SangJunBak
Copy link
Contributor

@SangJunBak SangJunBak commented Jan 22, 2026

see commit messages for details, starting from commit "Add password fallback for OIDC pgwire". Commits before are. being reviewed in #34690.

Will do http pgwire password authentication in a followup PR.

Motivation

Tips for reviewer

Checklist

  • This PR has adequate test coverage / QA involvement has been duly considered. (trigger-ci for additional test/nightly runs)
  • This PR has an associated up-to-date design doc, is a design doc (template), or is sufficiently small to not require a design.
  • If this PR evolves an existing $T ⇔ Proto$T mapping (possibly in a backwards-incompatible way), then it is tagged with a T-proto label.
  • If this PR will require changes to cloud orchestration or tests, there is a companion cloud PR to account for those changes that is tagged with the release-blocker label (example).
  • If this PR includes major user-facing behavior changes, I have pinged the relevant PM to schedule a changelog post.

@SangJunBak SangJunBak force-pushed the jun/add-password-auth-to-oidc branch 7 times, most recently from a8d789b to aed6472 Compare January 27, 2026 19:01
@SangJunBak SangJunBak changed the title Jun/add password auth to OIDC SQL-76 Add pgwire password authentication to OIDC authenticator Jan 28, 2026
@SangJunBak SangJunBak marked this pull request as ready for review January 28, 2026 03:40
@SangJunBak SangJunBak requested review from a team and ggevay as code owners January 28, 2026 03:40
@SangJunBak SangJunBak force-pushed the jun/add-password-auth-to-oidc branch from aed6472 to 1ccd67a Compare January 28, 2026 06:56
@SangJunBak SangJunBak requested review from a team, aljoscha and teskje as code owners January 28, 2026 06:56
@SangJunBak SangJunBak force-pushed the jun/add-password-auth-to-oidc branch from 1ccd67a to 0d5b665 Compare January 28, 2026 07:09
@SangJunBak SangJunBak removed request for a team, aljoscha, ggevay and teskje January 28, 2026 14:33
@SangJunBak SangJunBak force-pushed the jun/add-password-auth-to-oidc branch from 0d5b665 to c04b2aa Compare January 28, 2026 14:53
@SangJunBak SangJunBak requested a review from teskje January 28, 2026 15:43
@SangJunBak SangJunBak force-pushed the jun/add-password-auth-to-oidc branch 2 times, most recently from 047394c to 5de9377 Compare February 9, 2026 18:33
- Add external_metadata_rx() method to OidcAuthSessionHandle trait with default None impl
This allows us to create a helper functions for anything implementing OidcAuthenticator.

- Update Authenticator::Oidc to use named fields: {oidc, password}
@SangJunBak SangJunBak force-pushed the jun/add-password-auth-to-oidc branch from 5de9377 to 31359cd Compare February 9, 2026 20:16
- Add authenticate_with_oidc_token for token-based auth (Frontegg/OIDC JWT)
- Add authenticate_with_password for password-based auth
- Enables tests to pass connection-level options like --oidc_auth_enabled
- Verifies that when oidc_auth_enabled is not set in the connection options, the OIDC authenticator falls back to password authentication.
Call stacks above the critical recursion can grow as we add code elsewhere in the system
@SangJunBak SangJunBak force-pushed the jun/add-password-auth-to-oidc branch from 31359cd to b04753d Compare February 9, 2026 22:09
Copy link
Contributor

@teskje teskje left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me.

I'm a bit unhappy with adding password auth as a special case for OIDC auth, ideally we would leave the concerns separated and leave the password auth to the password authenticator. Would it be difficult to move the dispatching on the auth method one level up and just use the password authenticator when OIDC is disabled via the option?

Oidc(GenericOidcAuthenticator),
Oidc {
oidc: GenericOidcAuthenticator,
password: AdapterClient,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe call this adapter_client? I think you name it password because it's used for password auth, but I was confused initially thinking this field stores a password instead.

# the query planner and optimizer.

# 475 UNIONs
# 418 UNIONs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants