Skip to content

Add configurable OIDC scope for resource-audienced access tokens - #187

Open
gianlucam76 wants to merge 1 commit into
projectsveltos:mainfrom
gianlucam76:186
Open

Add configurable OIDC scope for resource-audienced access tokens#187
gianlucam76 wants to merge 1 commit into
projectsveltos:mainfrom
gianlucam76:186

Conversation

@gianlucam76

Copy link
Copy Markdown
Member

The dashboard's OIDC login hardcodes scope to "openid profile email offline_access", which requests no specific resource. Providers that issue single-resource access tokens (e.g. Entra ID) then audience the token to the dashboard's own app registration, not the target API server, so a Kubernetes API server that authorizes by audience (e.g. AKS with Microsoft Entra ID authorization) rejects it with "failed to validate token".

Add an optional VITE_OIDC_SCOPE (build-time) / OIDC_SCOPE (runtime, container) setting so a deployer can request a resource-specific scope instead. Unset, behavior is unchanged.

Fixes #186

The dashboard's OIDC login hardcodes scope to "openid profile email
offline_access", which requests no specific resource. Providers that
issue single-resource access tokens (e.g. Entra ID) then audience the
token to the dashboard's own app registration, not the target API
server, so a Kubernetes API server that authorizes by audience (e.g.
AKS with Microsoft Entra ID authorization) rejects it with "failed to
validate token".

Add an optional VITE_OIDC_SCOPE (build-time) / OIDC_SCOPE (runtime,
container) setting so a deployer can request a resource-specific scope
instead. Unset, behavior is unchanged.

Fixes projectsveltos#186
@gianlucam76
gianlucam76 requested a review from dragosdinu August 25, 2026 15:09
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.

🐛 [BUG] - <title>OIDC login cannot authenticate against AKS with Microsoft Entra ID authorization (audience/scope mismatch)

1 participant