Skip to content
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

Add details to error messages, especially around refresh tokens #28429

Closed
ahus1 opened this issue Apr 4, 2024 · 2 comments · Fixed by #28430
Closed

Add details to error messages, especially around refresh tokens #28429

ahus1 opened this issue Apr 4, 2024 · 2 comments · Fixed by #28430
Assignees
Labels

Comments

@ahus1
Copy link
Contributor

ahus1 commented Apr 4, 2024

Description

When Keycloak logs errors about refreshing tokens, the logged information misses some details:

  • The error code is set, but the details (as submitted to the client) are missing, which could provide details on what is actually happening. So the caller has more information at hand than the admin looking at the logs.
  • The logs miss the session ID. We have it in multiple other places (actually in every token that we hand out), but not in the logs. This would allow tracking all events that happen for this session.

Discussion

#14040 (comment)

Motivation

Provide means to analyze REFRESH_TOKEN_ERROR causes by looking at the logs.

Details

I'll provide a PR

@ahus1 ahus1 added kind/enhancement Categorizes a PR related to an enhancement status/triage labels Apr 4, 2024
@ahus1 ahus1 self-assigned this Apr 4, 2024
ahus1 added a commit to ahus1/keycloak that referenced this issue Apr 4, 2024
Closes keycloak#28429

Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
ahus1 added a commit to ahus1/keycloak that referenced this issue Apr 4, 2024
Closes keycloak#28429

Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
mposolda pushed a commit that referenced this issue Apr 4, 2024
Closes #28429

Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
ahus1 added a commit to ahus1/keycloak that referenced this issue Apr 4, 2024
Closes keycloak#28429

Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
@ahus1
Copy link
Contributor Author

ahus1 commented Apr 5, 2024

For now decided to not backport it to 22 as the longer event descriptions might not fit the database column for the details json, which has been extended yet in that version.

@daviddelannoy
Copy link
Contributor

thanks for that @ahus1 it will be useful

No worries about backport, upgrades are required anyway ;-)

ahus1 added a commit that referenced this issue Apr 16, 2024
Closes #28429

Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants