Node key rotating #630

Closed
opened 2025-12-29 02:21:21 +01:00 by adam · 5 comments
Owner

Originally created by @TotoTheDragon on GitHub (Feb 6, 2024).

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: 5595b61b96/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.

Originally created by @TotoTheDragon on GitHub (Feb 6, 2024). ## 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.
adam added the enhancementstale labels 2025-12-29 02:21:21 +01:00
adam closed this issue 2025-12-29 02:21:21 +01:00
Author
Owner

@TotoTheDragon commented on GitHub (Feb 6, 2024):

5595b61b96/control/controlclient/direct.go (L478-L489)

There seem to be only two cases.

  1. When the old key is expired
  2. When login is interactive, e.g. when using OIDC, we also regenerate the key
@TotoTheDragon commented on GitHub (Feb 6, 2024): https://github.com/tailscale/tailscale/blob/5595b61b96aac4558525d4fc56362dd36cc42616/control/controlclient/direct.go#L478-L489 There seem to be only two cases. 1. When the old key is expired 2. When login is interactive, e.g. when using OIDC, we also regenerate the key
Author
Owner

@github-actions[bot] commented on GitHub (May 7, 2024):

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

@github-actions[bot] commented on GitHub (May 7, 2024): This issue is stale because it has been open for 90 days with no activity.
Author
Owner

@github-actions[bot] commented on GitHub (Aug 7, 2024):

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

@github-actions[bot] commented on GitHub (Aug 7, 2024): This issue is stale because it has been open for 90 days with no activity.
Author
Owner

@github-actions[bot] commented on GitHub (Aug 14, 2024):

This issue was closed because it has been inactive for 14 days since being marked as stale.

@github-actions[bot] commented on GitHub (Aug 14, 2024): This issue was closed because it has been inactive for 14 days since being marked as stale.
Author
Owner

@Hajibey commented on GitHub (Sep 22, 2024):

Sorry for the necrobump, but what's the actual, approved way of dealing with this? Specifically in the case of (former/expired) clients hanging when trying to login and/or reauthenticate

@Hajibey commented on GitHub (Sep 22, 2024): Sorry for the necrobump, but what's the actual, approved way of dealing with this? Specifically in the case of (former/expired) clients hanging when trying to login and/or reauthenticate
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#630