Skip to content

Conversation

@jhrozek
Copy link
Contributor

@jhrozek jhrozek commented Nov 24, 2025

Add AuthConfig and OAuthProviderConfig to support multi-provider OAuth authentication. The configuration supports:

  • Two modes: anonymous (default) and oauth
  • Multiple OAuth providers for K8s service accounts and external IDPs
  • File-based client secrets with secure path validation
  • IssuerURL validation with HTTPS enforcement
  • Required audience claim per RFC 6749

Set THV_REGISTRY_INSECURE_URL=true to allow HTTP issuers for development.

Add AuthConfig and OAuthProviderConfig to support multi-provider OAuth
authentication. The configuration supports:
- Two modes: anonymous (default) and oauth
- Multiple OAuth providers for K8s service accounts and external IDPs
- File-based client secrets with secure path validation
- IssuerURL validation with HTTPS enforcement
- Required audience claim per RFC 6749

Set THV_REGISTRY_INSECURE_URL=true to allow HTTP issuers for development.
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 83.05085% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.69%. Comparing base (5e28c13) to head (5401591).

Files with missing lines Patch % Lines
internal/config/config.go 83.05% 6 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #171      +/-   ##
==========================================
+ Coverage   67.26%   67.69%   +0.43%     
==========================================
  Files          53       53              
  Lines        3009     3068      +59     
==========================================
+ Hits         2024     2077      +53     
- Misses        853      857       +4     
- Partials      132      134       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@rdimitrov rdimitrov left a comment

Choose a reason for hiding this comment

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

LGTM! 🚀

@jhrozek
Copy link
Contributor Author

jhrozek commented Nov 24, 2025

fwiw, this is what my local config looks like:

auth:
  mode: oauth
  oauth:
    resourceUrl: http://localhost:8080
    realm: mcp-registry
    providers:
      - name: okta
        issuerUrl: https://integrator-3683736.okta.com/oauth2/ausw8f1ut6X0WMjZN697
        audience: registry

@jhrozek jhrozek enabled auto-merge (squash) November 24, 2025 12:48
@jhrozek jhrozek merged commit d7ee9fd into main Nov 24, 2025
19 checks passed
@jhrozek jhrozek deleted the auth-config branch November 24, 2025 12:48
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.

4 participants