headscale
headscale copied to clipboard
Node key rotating
Why
Tailscale rotates keys in certain cases, we should support this properly
Description
An example of where a node key is rotated within the tailscale client: https://github.com/tailscale/tailscale/blob/5595b61b96aac4558525d4fc56362dd36cc42616/control/controlclient/direct.go#L706-L708
https://github.com/juanfont/headscale/pull/1719 has introduced code to make sure the node key is updated when the keys do not match and no old node key is provided. Some research needs to be done to figure out how to properly detect when a key is being rotated, so we can handle it in a similar way to this.
https://github.com/tailscale/tailscale/blob/5595b61b96aac4558525d4fc56362dd36cc42616/control/controlclient/direct.go#L478-L489
There seem to be only two cases.
- When the old key is expired
- When login is interactive, e.g. when using OIDC, we also regenerate the key
This issue is stale because it has been open for 90 days with no activity.
This issue is stale because it has been open for 90 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.