1
0
mirror of https://github.com/juanfont/headscale.git synced 2025-12-24 20:04:53 +01:00
juanfont.headscale/.github/workflows
Kristoffer Dalby 22ee2bfc9c
tags: process tags on registration, simplify policy (#2931)
This PR investigates, adds tests and aims to correctly implement Tailscale's model for how Tags should be accepted, assigned and used to identify nodes in the Tailscale access and ownership model.

When evaluating in Headscale's policy, Tags are now only checked against a nodes "tags" list, which defines the source of truth for all tags for a given node. This simplifies the code for dealing with tags greatly, and should help us have less access bugs related to nodes belonging to tags or users.

A node can either be owned by a user, or a tag.

Next, to ensure the tags list on the node is correctly implemented, we first add tests for every registration scenario and combination of user, pre auth key and pre auth key with tags with the same registration expectation as observed by trying them all with the Tailscale control server. This should ensure that we implement the correct behaviour and that it does not change or break over time.

Lastly, the missing parts of the auth has been added, or changed in the cases where it was wrong. This has in large parts allowed us to delete and simplify a lot of code.
Now, tags can only be changed when a node authenticates or if set via the CLI/API. Tags can only be fully overwritten/replaced and any use of either auth or CLI will replace the current set if different.

A user owned device can be converted to a tagged device, but it cannot be changed back. A tagged device can never remove the last tag either, it has to have a minimum of one.
2025-12-08 18:51:07 +01:00
..
build.yml auth: ensure machines are allowed in when pak change (#2917) 2025-12-02 12:01:02 +01:00
check-generated.yml mapper: produce map before poll (#2628) 2025-07-28 11:15:53 +02:00
check-tests.yaml .github/workflows: prettier 2025-07-07 15:48:38 +01:00
docs-deploy.yml integration: replace time.Sleep with assert.EventuallyWithT (#2680) 2025-07-10 23:38:55 +02:00
docs-test.yml cmd/hi: fixes and qol (#2649) 2025-06-23 13:43:14 +02:00
gh-action-integration-generator.go .github/workflow: only run a few selected postgres tests 2025-07-07 15:48:38 +01:00
gh-actions-updater.yaml cmd/hi: fixes and qol (#2649) 2025-06-23 13:43:14 +02:00
integration-test-template.yml gen: test-integration (#2814) 2025-10-24 17:22:53 +02:00
lint.yml Fix invocation of golangci-lint (#2703) 2025-07-24 08:41:20 +02:00
nix-module-test.yml nix: add NixOS module and tests (#2857) 2025-11-12 13:11:38 +00:00
release.yml .github/workflows: prettier 2025-07-07 15:48:38 +01:00
stale.yml .github/workflows: prettier 2025-07-07 15:48:38 +01:00
test-integration.yaml tags: process tags on registration, simplify policy (#2931) 2025-12-08 18:51:07 +01:00
test.yml .github/workflows: prettier 2025-07-07 15:48:38 +01:00
update-flake.yml cmd/hi: fixes and qol (#2649) 2025-06-23 13:43:14 +02:00