Feat: add per-issuer OIDC configuration with static key file support#876
Merged
mattisonchao merged 4 commits intomainfrom Jan 29, 2026
Merged
Feat: add per-issuer OIDC configuration with static key file support#876mattisonchao merged 4 commits intomainfrom
mattisonchao merged 4 commits intomainfrom
Conversation
10e3b82 to
c3b5a4d
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the OIDC authentication provider to support per-issuer configuration (including static key files) while maintaining backward compatibility with the legacy single-config format, and documents the new options on the server CLI.
Changes:
- Introduces
IssuerConfigand extendsOIDCOptionsto support per-issuer OIDC configuration, includingstaticKeyFile, and wires this intoNewOIDCProviderandAuthenticate. - Adds helper
loadPublicKeysFromFileto load public keys/certificates from PEM files and uses it to build a static key-based verifier viaoidc.StaticKeySetwhenstaticKeyFileis provided. - Adds comprehensive unit tests for the new configuration paths and behaviors, and updates the
--auth-provider-paramsflag help text to describe both legacy and new formats.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
oxiad/common/rpc/auth/oidc.go |
Adds per-issuer OIDC configuration (IssuerConfig, Issuers map), static key file support via loadPublicKeysFromFile and oidc.StaticKeySet, and updates audience/username-claim selection logic to work with both legacy and per-issuer settings. |
oxiad/common/rpc/auth/oidc_test.go |
Introduces tests covering validation and defaulting of OIDCOptions, legacy and per-issuer provider construction, authentication flows, static key file wiring, and public-key loading edge cases. |
cmd/server/cmd.go |
Updates the --auth-provider-params flag help string to clearly document the deprecated legacy OIDC configuration format and the new per-issuer JSON format including staticKeyFile. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
This implementation adds support for per-issuer OIDC configuration while maintaining full backward compatibility.
Configuration format:
{ "issuers": { "https://issuer1.com": { "allowedAudiences": "aud1,aud2", "userNameClaim": "sub", "staticKeyFile": "/path/to/key.pem" }, "https://issuer2.com": { "allowedAudiences": "aud3", "userNameClaim": "email" } } }