1
0
mirror of https://github.com/juanfont/headscale.git synced 2025-01-08 00:11:42 +01:00
juanfont.headscale/hscontrol
Kristoffer Dalby 2b5e52b08b
validate policy against nodes, error if not valid (#2089)
* validate policy against nodes, error if not valid

this commit aims to improve the feedback of "runtime" policy
errors which would only manifest when the rules are compiled to
filter rules with nodes.

this change will in;

file-based mode load the nodes from the db and try to compile the rules on
start up and return an error if they would not work as intended.

database-based mode prevent a new ACL being written to the database if
it does not compile with the current set of node.

Fixes #2073
Fixes #2044

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

* ensure stderr can be used in err checks

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

* test policy set validation

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

* add new integration test to ghaction

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

* add back defer for cli tst

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

---------

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2024-08-30 16:58:29 +02:00
..
assets
db Fix FKs on sqlite migrations (#2083) 2024-08-30 08:08:54 +02:00
derp test embedded derp with derp updater, check client health (#2030) 2024-08-11 07:44:59 +02:00
mapper Redo DNS configuration (#2034) 2024-08-19 11:41:05 +02:00
notifier
policy
templates
types fix warning errs from beta2 (#2075) 2024-08-23 17:17:37 +02:00
util fix route table migration wiping routes 0.22 -> 0.23 (#2076) 2024-08-27 18:54:28 +02:00
app.go validate policy against nodes, error if not valid (#2089) 2024-08-30 16:58:29 +02:00
auth_noise.go
auth.go
grpcv1_test.go
grpcv1.go validate policy against nodes, error if not valid (#2089) 2024-08-30 16:58:29 +02:00
handlers.go
metrics.go
noise.go Redo DNS configuration (#2034) 2024-08-19 11:41:05 +02:00
oidc.go Fix self notification on expiry update via oidc relogin (#2080) 2024-08-30 08:20:29 +02:00
platform_config.go rename package name to hscontrol 2023-05-10 20:47:51 +02:00
poll.go reformat code (#2019) 2024-07-22 08:56:00 +02:00
suite_test.go
tailsql.go