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

use dedicated registration ID for auth flow #2337

Merged
merged 20 commits into from
Jan 26, 2025

Conversation

kradalby
Copy link
Collaborator

@kradalby kradalby commented Jan 10, 2025

This PR moves the authentication flow away from using MachineKeys (previously also NodeKey). These are not suitable as the machine might be registered multiple times (multiple users, same machine).

We probably should have done this from the beginning, all register IDs are now short live, and only used for the registration purpose.

This also implements the missing followup part of registration which holds the connection open until a node has been registered.

This is step 1 to fix #2327 where user login does not work as expected, potentially logging in the wrong user.

@kradalby kradalby force-pushed the kradalby/relogin-oidc branch 2 times, most recently from 6525e49 to ff572f1 Compare January 13, 2025 10:45
@kradalby kradalby force-pushed the kradalby/relogin-oidc branch 3 times, most recently from 5cb57ad to 3f56787 Compare January 17, 2025 11:46
@kradalby kradalby changed the title fix logging in with the same node with a new user use dedicated registration ID for auth flow Jan 17, 2025
@kradalby kradalby force-pushed the kradalby/relogin-oidc branch 2 times, most recently from ed2183b to 1031c2a Compare January 17, 2025 16:32
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
@kradalby kradalby force-pushed the kradalby/relogin-oidc branch from 688c031 to 64022fa Compare January 23, 2025 16:00
@kradalby kradalby marked this pull request as ready for review January 23, 2025 16:54
@kradalby kradalby requested a review from juanfont as a code owner January 23, 2025 16:54
@kradalby kradalby merged commit 4c8e847 into juanfont:main Jan 26, 2025
136 of 137 checks passed
@kradalby kradalby deleted the kradalby/relogin-oidc branch January 26, 2025 21:20
@nblock nblock added this to the v0.25.0 milestone Jan 27, 2025
socoldkiller pushed a commit to socoldkiller/headscale that referenced this pull request Jan 30, 2025
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.

[Bug] Change Account
3 participants