1
0
mirror of https://github.com/juanfont/headscale.git synced 2025-05-18 01:16:48 +02:00
juanfont.headscale/hscontrol/types
Kristoffer Dalby 87326f5c4f
Experimental implementation of Policy v2 (#2214)
* utility iterator for ipset

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>

* split policy -> policy and v1

This commit split out the common policy logic and policy implementation
into separate packages.

policy contains functions that are independent of the policy implementation,
this typically means logic that works on tailcfg types and generic formats.
In addition, it defines the PolicyManager interface which the v1 implements.

v1 is a subpackage which implements the PolicyManager using the "original"
policy implementation.

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>

* use polivyv1 definitions in integration tests

These can be marshalled back into JSON, which the
new format might not be able to.

Also, just dont change it all to JSON strings for now.

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>

* formatter: breaks lines

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>

* remove compareprefix, use tsaddr version

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>

* remove getacl test, add back autoapprover

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>

* use policy manager tag handling

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>

* rename display helper for user

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>

* introduce policy v2 package

policy v2 is built from the ground up to be stricter
and follow the same pattern for all types of resolvers.

TODO introduce
aliass
resolver

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>

* wire up policyv2 in integration testing

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>

* split policy v2 tests into seperate workflow to work around github limit

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>

* add policy manager output to /debug

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>

* update changelog

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>

---------

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2025-03-10 16:20:29 +01:00
..
testdata Remove use_username_in_magic_dns option 2024-12-11 18:39:35 +01:00
api_key.go Split code into modules 2023-05-26 12:24:50 +02:00
common.go fix double login URL with OIDC (#2445) 2025-02-25 18:16:07 +01:00
config_test.go Add worker reading extra_records_path from file (#2271) 2024-12-13 07:52:40 +00:00
config.go remove oidc migration (#2411) 2025-02-07 13:49:45 +01:00
const.go improve testing of route failover logic 2024-04-15 12:31:53 +02:00
node_test.go #2140 Fixed reflection of hostname change (#2199) 2024-10-17 09:45:33 -06:00
node.go Experimental implementation of Policy v2 (#2214) 2025-03-10 16:20:29 +01:00
policy.go feat: implements apis for managing headscale policy (#1792) 2024-07-18 07:38:25 +02:00
preauth_key.go do not allow preauth keys to be deleted if assigned to node (#2396) 2025-02-01 10:31:13 +01:00
routes.go Redo route code (#2422) 2025-02-26 16:22:55 +01:00
users_test.go relax user validation to allow emails, add tests from various oidc providers (#2364) 2025-01-22 18:10:15 +01:00
users.go Experimental implementation of Policy v2 (#2214) 2025-03-10 16:20:29 +01:00
version.go add git hash to binary, print on startup (#2415) 2025-02-07 13:49:34 +01:00