Add OAuth2 SSO support for veadk web with Agent Identity#477
Merged
yaozheng-fang merged 1 commit intovolcengine:mainfrom Jan 29, 2026
Merged
Add OAuth2 SSO support for veadk web with Agent Identity#477yaozheng-fang merged 1 commit intovolcengine:mainfrom
yaozheng-fang merged 1 commit intovolcengine:mainfrom
Conversation
This update introduces OAuth2/OIDC SSO authentication via Agent Identity User Pool to the `veadk web` command. Documentation is updated to describe new CLI options (`--oauth2-user-pool`, `--oauth2-user-pool-client`, `--oauth2-redirect-uri`). The CLI and middleware are extended to support access token validation (JWKS/introspection), user info extraction, and secure session handling for both API and browser requests. Reformat long lines for readability in oauth2_auth.py Refactored several long lines and conditional statements to improve code readability and maintain PEP8 compliance. No functional changes were made.
6dac0b1 to
7c8141e
Compare
yaozheng-fang
approved these changes
Jan 29, 2026
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.
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