[Bug] Reauth to untag a device keeps it tagged #1182

Open
opened 2025-12-29 02:28:44 +01:00 by adam · 0 comments
Owner

Originally created by @nblock on GitHub (Dec 21, 2025).

Is this a support request?

  • This is not a support request

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

SaaS allows to untag a node by reauth with an empty list of tags. This removes all tags from a node and assigns ownership back to the user. See Tailscale docs for a description and limitations.

This does not work in Headscale:

# regular
tailscale up --login-server https://headscale.example.com --advertise-tags=

# or forced
tailscale up --login-server https://headscale.example.com --advertise-tags= --force-reauth

After reauth, the node is still assigned to tagged-devices and keeps its previous list of tags:

$ headscale nodes list -t
ID | Hostname | Name | MachineKey | NodeKey | User           | IP addresses                  | Ephemeral | Last seen           | Expiration | Connected | Expired | ForcedTags | InvalidTags | ValidTags
1  | n2       | n2   | [0x2Hd]    | [W2y+g] | tagged-devices | 100.64.0.1, fd7a:115c:a1e0::1 | false     | 2025-12-21 11:54:34 | N/A        | online    | no      | tag:bar    |             |          
   |          |      |            |         |                |                               |           |                     |            |           |         | tag:foo    |             |          

Expected Behavior

After reauth with an empty list of tags, the node should be assigned back to the user that performed the reauth and should have all of its tags removed.

Steps To Reproduce

  1. Start with a tagged node
  2. Reauth: tailscale up --login-server https://headscale.example.com --advertise-tags=
  3. Observe headscale nodes list -t

Environment

- OS: Debian 13
- Headscale version: 0.28.0-beta.1
- Tailscale version: 1.92.3

Runtime environment

  • Headscale is behind a (reverse) proxy
  • Headscale runs in a container

Debug information

none

Originally created by @nblock on GitHub (Dec 21, 2025). ### Is this a support request? - [x] This is not a support request ### Is there an existing issue for this? - [x] I have searched the existing issues ### Current Behavior SaaS allows to untag a node by reauth with an empty list of tags. This removes all tags from a node and assigns ownership back to the user. See [Tailscale docs](https://tailscale.com/kb/1068/tags#apply-a-tag-to-a-device-with-the-cli) for a description and limitations. This does not work in Headscale: ```bash # regular tailscale up --login-server https://headscale.example.com --advertise-tags= # or forced tailscale up --login-server https://headscale.example.com --advertise-tags= --force-reauth ``` After reauth, the node is still assigned to `tagged-devices` and keeps its previous list of tags: ```bash $ headscale nodes list -t ID | Hostname | Name | MachineKey | NodeKey | User | IP addresses | Ephemeral | Last seen | Expiration | Connected | Expired | ForcedTags | InvalidTags | ValidTags 1 | n2 | n2 | [0x2Hd] | [W2y+g] | tagged-devices | 100.64.0.1, fd7a:115c:a1e0::1 | false | 2025-12-21 11:54:34 | N/A | online | no | tag:bar | | | | | | | | | | | | | | tag:foo | | ``` ### Expected Behavior After reauth with an empty list of tags, the node should be assigned back to the user that performed the reauth and should have all of its tags removed. ### Steps To Reproduce 1. Start with a tagged node 2. Reauth: `tailscale up --login-server https://headscale.example.com --advertise-tags=` 3. Observe `headscale nodes list -t` ### Environment ```markdown - OS: Debian 13 - Headscale version: 0.28.0-beta.1 - Tailscale version: 1.92.3 ``` ### Runtime environment - [ ] Headscale is behind a (reverse) proxy - [ ] Headscale runs in a container ### Debug information none
adam added the bugtailscale-feature-gapno-stale-bottags labels 2025-12-29 02:28:44 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#1182