headscale/hscontrol/policy
Kristoffer Dalby ebdbe03639 policy: validate autogroup:self sources in ACL rules
Tailscale validates that autogroup:self destinations in ACL rules can
only be used when ALL sources are users, groups, autogroup:member, or
wildcard (*). Previously, Headscale only performed this validation for
SSH rules.
Add validateACLSrcDstCombination() to enforce that tags, autogroup:tagged,
hosts, and raw IPs cannot be used as sources with autogroup:self
destinations. Invalid policies like `tag:client → autogroup:self:*` are
now rejected at validation time, matching Tailscale behavior.
Wildcard (*) is allowed because autogroup:self evaluation narrows it
per-node to only the node's own IPs.

Updates #3036
2026-02-05 19:29:16 +01:00
..
matcher matcher: Add func for comparing Dests and TheInternet 2025-11-02 13:19:59 +01:00
policyutil policy: add ICMP protocols to default and export constants 2026-02-05 19:29:16 +01:00
v2 policy: validate autogroup:self sources in ACL rules 2026-02-05 19:29:16 +01:00
pm.go tags: process tags on registration, simplify policy (#2931) 2025-12-08 18:51:07 +01:00
policy.go policy: fix autogroup:self propagation and optimize cache invalidation (#2807) 2025-10-23 17:57:41 +02:00
policy_autoapprove_test.go make tags first class node owner (#2885) 2025-12-02 12:01:25 +01:00
policy_route_approval_test.go make tags first class node owner (#2885) 2025-12-02 12:01:25 +01:00
policy_test.go policy: update tests for SSH validation rules 2026-01-21 17:01:30 +00:00
route_approval_test.go policy: add test to confirm group cant approve tag 2025-12-17 09:32:05 +01:00