Skip to content

feat: add enable-jwt config for JWT bearer token auth - #240

Open
alishalbaf wants to merge 1 commit into
canonical:mainfrom
alishalbaf:feat/enable-jwt-auth
Open

alishalbaf wants to merge 1 commit into
canonical:mainfrom
alishalbaf:feat/enable-jwt-auth

Conversation

@alishalbaf

Copy link
Copy Markdown

Summary

  • Adds an enable-jwt charm config option (default: false) to enable JWT bearer token authentication alongside cookie-based sessions
  • When enabled, configures the upstream oidc-authservice with ACCESS_TOKEN_AUTHN=jwt, IDTOKEN_AUTHN_ENABLED=true, and token caching
  • Updates ingress-auth relation to forward the Authorization header and kubeflow-userid-token response header when JWT is enabled

Motivation

The upstream oidc-authservice binary already supports JWT bearer token authentication, but this charm didn't expose the configuration. This is useful for programmatic/API access to Kubeflow services without requiring browser-based login.

Test plan

  • Unit tests added for both enabled and disabled states
  • Verify default behavior unchanged (cookie auth works as before)
  • Deploy with juju config oidc-gatekeeper enable-jwt=true and verify bearer tokens are accepted

The upstream oidc-authservice already supports JWT bearer token authentication
but this charm didn't expose the configuration. This adds an `enable-jwt` config
option that, when enabled, configures the authservice to accept Authorization
header bearer tokens and ID tokens alongside session cookies.
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.

1 participant