-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[Bug] OIDC users don't always get a username #2333
Comments
which OIDC provider do you use? I noticed that Google for example does not provide a username. If the provider does not provide one, it will not be set. |
Can you provide a the claim json as an example? |
It is in the original post under |
I think I found the line here @kradalby headscale/hscontrol/types/users.go Line 178 in ede4f97
The err that is checked does not seem to ever get printed. |
I suppose there should be a logging of that message, but it needs to pass that regex. |
What is the username not passing the regex, out of curiosity? |
Updates juanfont#2333 Signed-off-by: Kristoffer Dalby <[email protected]>
I'm curious where the regex comes from tho, what purpose does it serve ? |
historically it comes from when our magicdns implementation used the username, so it validates that it is DNS safe. Since this has been removed, it can be removed, I am just a bit cautious opening it completely yet, so keeping it strict initially and being conservative atm feels the best. Allowing @ would be sensible tho, so I'll update the PR to allow that. |
ooh then it makes sense yeah :) |
Is this a support request?
Is there an existing issue for this?
Current Behavior
When logging in for the first time with oidc I only got a display_name and no username/name set in headscale.
This can be worked around currently by
docker exec headscale headscale users rename --identifier 1 -r merlijn
But that'd be inconvenient for future users so it should probably get resolved.
Expected Behavior
All the required user fields get set when logging in with oidc,
Steps To Reproduce
Environment
Runtime environment
Anything else?
root@zungenbrecher:/opt/vpn_exit_node# docker exec headscale headscale users list -o json
oidc claims for my user with "profile", "email", "groups" scopes
config.yaml
The text was updated successfully, but these errors were encountered: