-
Notifications
You must be signed in to change notification settings - Fork 399
Invalidate access tokens that are bound to an SSO session when that session is invalid. #2933
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalidate access tokens that are bound to an SSO session when that session is invalid. #2933
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2933 +/- ##
============================================
+ Coverage 56.08% 57.97% +1.88%
+ Complexity 9354 9042 -312
============================================
Files 669 669
Lines 53762 50342 -3420
Branches 11860 11039 -821
============================================
- Hits 30155 29188 -967
+ Misses 19378 17100 -2278
+ Partials 4229 4054 -175
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds validation logic to invalidate OAuth2 access tokens that are bound to invalid SSO sessions. The implementation introduces a new validation method that can check token bindings directly from access token data without requiring request context.
Key changes:
- Adds token binding validation during access token introspection that marks tokens as inactive if their bound SSO sessions are invalid
- Implements SSO session validation by checking session context existence in the cache
- Introduces a new validation method in the TokenBinder interface for direct access token validation
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| TokenValidationHandler.java | Adds token binding validation during introspection and implements the validation logic |
| SSOSessionBasedTokenBinder.java | Implements SSO session validation and refactors existing validation logic |
| TokenBinder.java | Adds new interface method for direct access token validation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
...y.oauth/src/main/java/org/wso2/carbon/identity/oauth2/validators/TokenValidationHandler.java
Show resolved
Hide resolved
...ain/java/org/wso2/carbon/identity/oauth2/token/bindings/impl/SSOSessionBasedTokenBinder.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR looks good, but this includes a behavioral change in introspection endpoint. So discuss with the leads and confirm the decision.
Let's run integration tests also before merging and consider asgardeo also
...identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/token/bindings/TokenBinder.java
Outdated
Show resolved
Hide resolved
...ain/java/org/wso2/carbon/identity/oauth2/token/bindings/impl/SSOSessionBasedTokenBinder.java
Outdated
Show resolved
Hide resolved
…ession is terminated, such as by an idle timeout.
0f621db to
6ec64ed
Compare
e1b5da6 to
da0d012
Compare
|
PR builder started |
da0d012 to
64ca6cf
Compare
|
PR builder completed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving the pull request based on the successful pr build https://github.com/wso2/product-is/actions/runs/17998449547
Proposed changes in this pull request
This pull request introduces validation logic to ensure that access tokens bound to an SSO session are invalidated when the session expires.
Problem addressed
Solution