Add OAuth2 SSO support for veadk web with Agent Identity #477
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.
Overview
This PR adds comprehensive OAuth2/OIDC Single Sign-On (SSO) support for VeADK Web and implements Access Token validation based on JWKS with optional Introspection.
Key Changes
1. OAuth2 Middleware Enhancements
AuthorizationHeader and Session Cookie tokens2.
/oauth2/userinfoEndpoint Token Validation/oauth2/userinfoendpoint now validates the Access Token in the Session before returning user info3. VeADK Web CLI Integration
veadk webcommand supports--oauth2-user-pooland--oauth2-user-pool-clientparametersTechnical Implementation
Access Token Validation Flow
New Configuration Parameters
issuerstrNoneissclaimjwks_uristrNoneaudiencestr | list[str]Noneallowed_algorithmslist[str]["RS256"]jwks_cache_ttl_secondsint300jwks_kid_miss_cooldown_secondsint30use_introspectionboolFalseintrospection_urlstrNoneintrospection_client_idstrNoneintrospection_client_secretstrNoneintrospection_cache_ttl_secondsint300Security Features
alg=noneattacks