Kristoffer Dalby
2bf1200483
policy: fix autogroup:self propagation and optimize cache invalidation ( #2807 )
2025-10-23 17:57:41 +02:00
Kristoffer Dalby
233dffc186
lint and leftover
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-09-09 09:40:00 +02:00
Kristoffer Dalby
9b962956b5
integration: Eventually, debug output, lint and format
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-09-09 09:40:00 +02:00
Kristoffer Dalby
8e25f7f9dd
bunch of qol ( #2748 )
2025-08-27 17:09:13 +02:00
Kristoffer Dalby
a52f1df180
policy: remove v1 code ( #2600 )
...
* policy: remove v1 code
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* db: update test with v1 removal
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* integration: start moving to v2 policy
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* policy: add ssh unmarshal tests
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* changelog: add entry
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* policy: remove v1 comment
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* integration: remove comment out case
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* cleanup skipv1
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* policy: remove v1 prefix workaround
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* policy: add all node ips if prefix/host is ts ip
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-05-20 13:57:26 +02:00
Kristoffer Dalby
45e38cb080
policy: reduce routes sent to peers based on packetfilter ( #2561 )
...
* notifier: use convenience funcs
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* policy: reduce routes based on policy
Fixes #2365
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* hsic: more helper methods
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* policy: more test cases
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* integration: add route with filter acl integration test
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* integration: correct route reduce test, now failing
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* mapper: compare peer routes against node
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* hs: more output to debug strings
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* types/node: slice.ContainsFunc
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* policy: more reduce route test
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* changelog: add entry for route filter
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-05-04 21:52:47 +02:00
Kristoffer Dalby
8f9fbf16f1
types/authkey: include user object in response ( #2542 )
...
* types/authkey: include user object, not string
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* make preauthkeys use id
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* changelog
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* integration: wire up user id for auth keys
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-04-30 11:45:08 +02:00
Kristoffer Dalby
5a18e91317
fix auto approver on register and new policy ( #2506 )
...
* fix issue auto approve route on register bug
This commit fixes an issue where routes where not approved
on a node during registration. This cause the auto approval
to require the node to readvertise the routes.
Fixes #2497
Fixes #2485
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* hsic: only set db policy if exist
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* policy: calculate changed based on policy and filter
v1 is a bit simpler than v2, it does not pre calculate the auto approver map
and we cannot tell if it is changed.
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-03-31 15:55:07 +02:00
Kristoffer Dalby
603f3ad490
Multi network integration tests ( #2464 )
2025-03-21 11:49:32 +01:00
Kristoffer Dalby
7891378f57
Redo route code ( #2422 )
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2025-02-26 16:22:55 +01:00
Kristoffer Dalby
d57a55c024
Rewrite authentication flow ( #2374 )
2025-02-01 09:16:51 +00:00
Kristoffer Dalby
64319f79ff
make stream shutdown if self-node has been removed ( #2125 )
...
* add shutdown that asserts if headscale had panics
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* add test case producing 2118 panic
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
* make stream shutdown if self-node has been removed
Currently we will read the node from database, and since it is
deleted, the id might be set to nil. Keep the node around and
just shutdown, so it is cleanly removed from notifier.
Fixes #2118
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
---------
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2024-09-11 12:00:32 +02:00
greizgh
8571513e3c
reformat code ( #2019 )
...
* reformat code
This is mostly an automated change with `make lint`.
I had to manually please golangci-lint in routes_test because of a short
variable name.
* fix start -> strategy which was wrongly corrected by linter
2024-07-22 08:56:00 +02:00
Pallab Pain
58bd38a609
feat: implements apis for managing headscale policy ( #1792 )
2024-07-18 07:38:25 +02:00
Juan Font
0030af3fa4
Rename Machine to Node ( #1553 )
2023-09-24 06:42:05 -05:00
Kristoffer Dalby
b4a4d0f760
Handle errors in integration test setups
...
Thanks @kev-the-dev
Closes #1460
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-09-05 08:47:43 +02:00
Kristoffer Dalby
56dd734300
Add go profiling flag, and enable on integration tests ( #1382 )
2023-04-27 16:57:11 +02:00
Juan Font
b465592c07
Do not use host networking in embedded DERP tests
...
fixed linting
2023-04-24 12:17:24 +02:00
Kristoffer Dalby
727d95b477
Improve generated integration tests
...
- Save logs from control(headscale) on every run to tmp
- Upgrade nix-actions
- Cancel builds if new commit is pushed
- Fix a sorting bug in user command test
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-01-30 14:43:03 +01:00
Kristoffer Dalby
e3a2593344
Rename [Nn]amespace -> [Uu]ser in go code
...
Use gopls, ag and perl to rename all occurances of Namespace
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-01-18 15:40:04 +01:00
Juan Font
55a3885614
Added integration tests for ephemeral nodes
...
Fetch the machines from headscale
2023-01-05 14:59:02 +01:00
Kristoffer Dalby
93d56362af
Lock and unify headscale start/get method
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-11-14 16:50:28 +01:00
Kristoffer Dalby
2c0488da0b
Add Execute helper for controlserver
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-26 10:23:44 +02:00
Kristoffer Dalby
7155b22043
Factor out some commonly used patterns
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-23 12:41:35 +02:00
Kristoffer Dalby
308b9e78a1
Defince control server interface
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2022-10-18 15:37:11 +02:00