-
Notifications
You must be signed in to change notification settings - Fork 887
chore: add claims to oauth link in db for debug #10827
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
Conversation
@coadler what do you think about this? Feels a bit half baked, but should give a route to provide more context on the claims for any given user. We have had a lot of group/role sync debug sessions that were difficult. |
From my perspective, this is great for debugging group sync. I know within a workspace you can sometimes debug the token but I found, even with OIDC, sometimes its not a JWT and you can't hit the userinfo endpoint post-login. Idk if this is because some providers have a weird exchange going on but this is a reliable and quick solution to understand what is being passed from the provider |
Currently only owners can hit this, it only works if the user does authenticate. I am storing the original claims used for the group/user sync. |
Is there anything this stores that we don't output in the logs? Or does it just make the claims easier to access |
Yes we only log the claim fields. This outputs the claim values. I assumed we only logged the claim fieldnames and not the values for some secret reasons or something? |
We don't output the claim values through the logs, just the names. We output the specific values for the This is the current issue we're running into |
I originally had it log fields but I think it was removed later on https://github.com/coder/coder/pull/6922/files#diff-0bdad5dd6f860b794a5f97ea3f7be5a74a7ad2a5aadcfcf02e67a63efd4222fdL591 If we're going to make this info exposed to owners either way I think it would be easiest if we just logged them since the security implications seem similar, unless accessing them this way unblocks any customers. |
This was the note. Logs are more easily "dumped" somewhere imo. I figured a route that requires a human to hit won't accidentally be dumped anywhere. |
What this does
Only usable by owners, allows seeing oidc claims for any given oidc authenticated user. No signatures are attached so the token is not usable back to OIDC.
Route:
http://localhost:3000/api/v2/debug/{username}/debug-link
Output
Affects #10819