Avoid creating user sessions from the token exchange#37875
Merged
mposolda merged 1 commit intokeycloak:mainfrom Mar 11, 2025
Merged
Avoid creating user sessions from the token exchange#37875mposolda merged 1 commit intokeycloak:mainfrom
mposolda merged 1 commit intokeycloak:mainfrom
Conversation
mposolda
previously approved these changes
Mar 6, 2025
Contributor
mposolda
left a comment
There was a problem hiding this comment.
@rmartinc Nice, Thanks!
I hope to merge, but there are UI test failures (which are unrelated to this PR).
I hope to merge once UI errors are fixed and once the #37820 is merged and then this PR is successfully rebased on top of that (Planning to merge that one first just because it was sent first :-)
graziang
approved these changes
Mar 6, 2025
Contributor
|
@rmartinc Is it possible to rebase please? That should fix the UI tests as well. |
Closes keycloak#37832 Signed-off-by: rmartinc <[email protected]>
Contributor
Author
|
@mposolda Rebased! |
Contributor
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.
Closes #37832
Just creating transient sessions for TE if a new session is needed. In any other case the TE request returns an error (invalid_request). As commented the PR also changes the boolean option
standard.token.exchange.enableRefreshRequestedTokenTypeto an enumerated with current values: NO and SAME_SESSION. This way we can improve this to add CREATE_ONLINE and even CREATE_ONLINE_OR_OFFLINE options to allow creating sessions in TE (online or even offline). Tests modified accordingly.