headscale/hscontrol/policy/v2
Kristoffer Dalby 687cf0882f policy/v2: implement autogroup:danger-all support
Add autogroup:danger-all as a valid source alias that matches ALL IP
addresses including non-Tailscale addresses. When used as a source,
it resolves to 0.0.0.0/0 + ::/0 internally but produces SrcIPs: ["*"]
in filter rules. When used as a destination, it is rejected with an
error matching Tailscale SaaS behavior.

Key changes:
- Add AutoGroupDangerAll constant and validation
- Add sourcesHaveDangerAll() helper and hasDangerAll parameter to
  srcIPsWithRoutes() across all compilation paths
- Add ErrAutogroupDangerAllDst for destination rejection
- Remove 3 AUTOGROUP_DANGER_ALL skip entries (K6, K7, K8)

Updates #2180
2026-04-01 14:10:42 +01:00
..
testdata policy/v2: add advertised routes to compat test topologies 2026-04-01 14:10:42 +01:00
filter.go policy/v2: implement autogroup:danger-all support 2026-04-01 14:10:42 +01:00
filter_test.go policy/v2: use bare IPs in autogroup:self DstPorts 2026-04-01 14:10:42 +01:00
main_test.go all: fix test flakiness and improve test infrastructure 2026-03-14 02:52:28 -07:00
policy.go policy/v2: refactor alias resolution to use ResolvedAddresses 2026-04-01 14:10:42 +01:00
policy_test.go all: upgrade to Go 1.26rc2 and modernize codebase 2026-02-08 12:35:23 +01:00
tailscale_acl_data_compat_test.go policy/v2: implement CapGrant compilation with companion capabilities 2026-04-01 14:10:42 +01:00
tailscale_grants_compat_test.go policy/v2: implement autogroup:danger-all support 2026-04-01 14:10:42 +01:00
tailscale_routes_data_compat_test.go policy/v2: convert routes compat tests to data-driven format with Tailscale SaaS captures 2026-04-01 14:10:42 +01:00
tailscale_ssh_data_compat_test.go policy/v2: add SSH compatibility testdata from Tailscale SaaS 2026-02-28 05:14:11 -08:00
types.go policy/v2: implement autogroup:danger-all support 2026-04-01 14:10:42 +01:00
types_test.go policy/v2: implement autogroup:danger-all support 2026-04-01 14:10:42 +01:00
utils.go policy/v2: exclude exit routes from ReduceFilterRules 2026-04-01 14:10:42 +01:00
utils_test.go policy/v2: exclude exit routes from ReduceFilterRules 2026-04-01 14:10:42 +01:00