Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Avoid creating user sessions from the token exchange#37875

Merged
mposolda merged 1 commit intokeycloak:mainfrom
rmartinc:issue-37832
Mar 11, 2025
Merged

Avoid creating user sessions from the token exchange#37875
mposolda merged 1 commit intokeycloak:mainfrom
rmartinc:issue-37832

Conversation

@rmartinc
Copy link
Contributor

@rmartinc rmartinc commented Mar 6, 2025

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.enableRefreshRequestedTokenType to 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.

mposolda
mposolda previously approved these changes Mar 6, 2025
Copy link
Contributor

@mposolda mposolda left a comment

Choose a reason for hiding this comment

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

@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 :-)

Copy link
Contributor

@graziang graziang left a comment

Choose a reason for hiding this comment

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

@rmartinc thanks!

@mposolda
Copy link
Contributor

@rmartinc Is it possible to rebase please? That should fix the UI tests as well.

Copy link
Contributor

@mposolda mposolda left a comment

Choose a reason for hiding this comment

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

@rmartinc Thanks for the updates!

@rmartinc
Copy link
Contributor Author

@mposolda Rebased!

Copy link
Contributor

@edewit edewit left a comment

Choose a reason for hiding this comment

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

LGTM

@mposolda
Copy link
Contributor

@rmartinc @graziang @edewit Thanks for the updates and reviews!

@mposolda mposolda merged commit 378d217 into keycloak:main Mar 11, 2025
77 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Avoid creating user sessions from the token exchange

4 participants