1
0
mirror of https://github.com/juanfont/headscale.git synced 2024-12-20 19:09:07 +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 reformat code (#2019) 2024-07-22 08:56:00 +02:00
policy reformat code (#2019) 2024-07-22 08:56:00 +02:00
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 metrics, tuning in tests, db cleanups, fix concurrency issue (#1895) 2024-04-21 18:28:17 +02:00
auth.go reformat code (#2019) 2024-07-22 08:56:00 +02:00
grpcv1_test.go
grpcv1.go validate policy against nodes, error if not valid (#2089) 2024-08-30 16:58:29 +02:00
handlers.go Make registration screen easier to use (#1975) 2024-06-15 09:40:49 +02:00
metrics.go reformat code (#2019) 2024-07-22 08:56:00 +02:00
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
poll.go reformat code (#2019) 2024-07-22 08:56:00 +02:00
suite_test.go new IP allocator and add postgres to integration tests. (#1756) 2024-02-18 19:31:29 +01:00
tailsql.go Use result of fmt.Errorf call (#1668) 2024-02-15 11:02:54 +01:00