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

Preauth keys for different users #1310

Open
QZAiXH opened this issue Apr 3, 2023 · 13 comments
Open

Preauth keys for different users #1310

QZAiXH opened this issue Apr 3, 2023 · 13 comments
Labels
bug Something isn't working

Comments

@QZAiXH
Copy link
Contributor

QZAiXH commented Apr 3, 2023

Bug description
I have two preauth keys A and B, and a new client. I first use A to join headscale and this client successfully joins user A. After that I use B on the client and the client does not switch to user B, it is still on A. Is this correct?

@QZAiXH QZAiXH added the bug Something isn't working label Apr 3, 2023
@ItsShadowCone
Copy link

Furthermore fast account switching with multiple users on the same headscale instance is currently not working (afaict).

I suspect the same reason under the hood, headscale might be using the machine id/key for a more unique identifier than it should be.

I tested:

  • joining via preauth key, subsequent login via preauth key for second user -> no user switch, no second account, just a renegotiation of node key
  • joining via preauth key, subsequent login via OIDC -> oidc fails, in the log i see could not register machine error="machine was previously registered with a different user"
  • joining via OIDC, subsequent login via preauth key -> same as Bump websocket-extensions from 0.1.3 to 0.1.4 in /frontend #1. preauth key changes nothing, except for the node key.

@pallabpain
Copy link
Contributor

pallabpain commented Apr 16, 2023

You should be able to fast-switch users seamlessly if you do the following after logging in with preauth key A.

tailscale logout
tailscale down

tailscale up --auth-key preauthkey-B ... 

I've written an implementation that does exactly this in one of the projects that I am working on.

@ItsShadowCone
Copy link

I tried it today on headscale 0.21.0 and it does not work. tailscale switch --list only shows a single user.

@Carseason
Copy link

me to

@github-actions
Copy link
Contributor

This issue is stale because it has been open for 180 days with no activity.

@github-actions github-actions bot added the stale label Oct 26, 2023
@ItsShadowCone
Copy link

i believe it is still relevant however

@github-actions github-actions bot removed the stale label Oct 30, 2023
Copy link
Contributor

This issue is stale because it has been open for 90 days with no activity.

@github-actions github-actions bot added the stale label Jan 28, 2024
@ItsShadowCone
Copy link

Did anyone test this for v0.23.0?

@github-actions github-actions bot removed the stale label Feb 2, 2024
Copy link
Contributor

github-actions bot commented May 2, 2024

This issue is stale because it has been open for 90 days with no activity.

@kradalby
Copy link
Collaborator

kradalby commented May 5, 2024

Furthermore fast account switching with multiple users on the same headscale instance is currently not working (afaict).

I suspect the same reason under the hood, headscale might be using the machine id/key for a more unique identifier than it should be.

Are you trying to login to the same headscale with the same node twice?

So [node a, login 1] and [node a, login 2] is both in your fast user switching menu and as two nodes in headscale?

Does Tailscale SaaS support this?

@ItsShadowCone
Copy link

See my response in #1920

I think the whole point in fast user switching @ tailscale SaaS is same node multiple logins.

@github-actions github-actions bot removed the stale label May 6, 2024
Copy link
Contributor

github-actions bot commented Aug 4, 2024

This issue is stale because it has been open for 90 days with no activity.

@github-actions github-actions bot added the stale label Aug 4, 2024
@ItsShadowCone
Copy link

Can we confirm that this bug is either still existing or fixed in the latest beta?

@github-actions github-actions bot removed the stale label Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants
@kradalby @pallabpain @ItsShadowCone @QZAiXH @Carseason and others