Skip to content

Keycloak 12624 nullpointer during OIDC logout client disabled#13424

Merged
mposolda merged 5 commits into
keycloak:mainfrom
marcelomrwin:KEYCLOAK-12624-nullpointer-during-oidc-logout-client-disabled
Aug 8, 2022
Merged

Keycloak 12624 nullpointer during OIDC logout client disabled#13424
mposolda merged 5 commits into
keycloak:mainfrom
marcelomrwin:KEYCLOAK-12624-nullpointer-during-oidc-logout-client-disabled

Conversation

@marcelomrwin

Copy link
Copy Markdown
Contributor

Fixes #12624

@marcelomrwin
marcelomrwin requested a review from mposolda July 29, 2022 13:59
@marcelomrwin

Copy link
Copy Markdown
Contributor Author

My apologies, I only realized it after I invoked the Intellij formatter and that's why some more changes are showing. These are formatting changes.

@mposolda mposolda self-assigned this Jul 29, 2022

@mposolda mposolda left a comment

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.

@marcelomrwin Thanks for the PR!

I've added one inline comment (Sorry if I was unclear when we had a chat about this today morning. Hope it is clearer from the comment)

Besides that, is it possible to write automted test also for the scenario when the account client is disabled? I am thinking about the scenario like:

  • User login
  • Client account will be disabled
  • Logout is triggered by going to the LogoutEndpoint without any parameters (In case that none of id_token_hint and client_id parameters is used, then the "System client" is used as the client during logout. And this system client is the account client). See calls to SystemClientUtil.getSystemClient for more details

Comment thread services/src/main/java/org/keycloak/services/resources/SessionCodeChecks.java Outdated
@marcelomrwin

Copy link
Copy Markdown
Contributor Author

@marcelomrwin Thanks for the PR!

I've added one inline comment (Sorry if I was unclear when we had a chat about this today morning. Hope it is clearer from the comment)

Besides that, is it possible to write automted test also for the scenario when the account client is disabled? I am thinking about the scenario like:

  • User login
  • Client account will be disabled
  • Logout is triggered by going to the LogoutEndpoint without any parameters (In case that none of id_token_hint and client_id parameters is used, then the "System client" is used as the client during logout. And this system client is the account client). See calls to SystemClientUtil.getSystemClient for more details

Test scenario created and tested. Working as expected. I await your appreciation to ensure that the understanding was correct.

@marcelomrwin
marcelomrwin requested a review from mposolda August 3, 2022 09:22

@mposolda mposolda left a comment

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.

@marcelomrwin Thanks Marcelo for the updates and for the automated test!

@mposolda
mposolda merged commit e44cea5 into keycloak:main Aug 8, 2022
@marcelomrwin
marcelomrwin deleted the KEYCLOAK-12624-nullpointer-during-oidc-logout-client-disabled branch September 30, 2022 20:55
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.

Possible NullPointerException during OpenID Connect logout with disabled client

2 participants