Skip to content

feat(auth/generic): support custom introspection endpoints#3068

Open
duwenxin99 wants to merge 4 commits intomainfrom
feat-google-auth
Open

feat(auth/generic): support custom introspection endpoints#3068
duwenxin99 wants to merge 4 commits intomainfrom
feat-google-auth

Conversation

@duwenxin99
Copy link
Copy Markdown
Contributor

@duwenxin99 duwenxin99 commented Apr 15, 2026

This PR extends the generic authentication service to support custom introspection formats, specifically enabling integration with Google's tokeninfo endpoint for validating opaque access tokens. Added e2e integration test with Google OAuth.

@duwenxin99 duwenxin99 requested a review from a team as a code owner April 15, 2026 21:31
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces support for Google's tokeninfo endpoint within the generic authentication service, allowing for the validation of opaque access tokens. Key changes include new configuration options for introspection methods and parameter names, as well as logic to handle Google-specific audience fields and GET-based introspection requests. A security issue was identified regarding the removal of the 'active' status check, which is mandatory for standard OIDC providers to prevent the use of revoked tokens. Additionally, there are feedback items concerning Go naming conventions for initialisms and missing error handling in the new integration tests.

Comment thread internal/auth/generic/generic.go
Comment thread internal/auth/generic/generic.go Outdated
Comment thread tests/auth/auth_integration_test.go
Comment on lines +136 to +138
introspectionEndpoint: https://www.googleapis.com/oauth2/v1/tokeninfo
introspectionMethod: GET
introspectionParamName: access_token
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we not get these from the initial request?

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.

3 participants