headscale
headscale copied to clipboard
Preauth keys for different users
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?
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 seecould not register machine error="machine was previously registered with a different user"
- joining via OIDC, subsequent
login
via preauth key -> same as #1. preauth key changes nothing, except for the node key.
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.
I tried it today on headscale 0.21.0 and it does not work. tailscale switch --list
only shows a single user.
me to
This issue is stale because it has been open for 180 days with no activity.
i believe it is still relevant however
This issue is stale because it has been open for 90 days with no activity.
Did anyone test this for v0.23.0?
This issue is stale because it has been open for 90 days with no activity.
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?
See my response in #1920
I think the whole point in fast user switching @ tailscale SaaS is same node multiple logins.
This issue is stale because it has been open for 90 days with no activity.
Can we confirm that this bug is either still existing or fixed in the latest beta?