-
released this
2025-05-04 22:06:44 +02:00 | 269 commits to main since this release📅 Originally published on GitHub: Sun, 04 May 2025 20:35:17 GMT
🏷️ Git tag created: Sun, 04 May 2025 20:06:44 GMTBREAKING
Routes
Route internals have been rewritten, removing the dedicated route table in the
database. This was done to simplify the codebase, which had grown unnecessarily
complex after the routes were split into separate tables. The overhead of having
to go via the database and keeping the state in sync made the code very hard to
reason about and prone to errors. The majority of the route state is only
relevant when headscale is running, and is now only kept in memory. As part of
this, the CLI and API has been simplified to reflect the changes;$ headscale nodes list-routes ID | Hostname | Approved | Available | Serving (Primary) 1 | ts-head-ruqsg8 | | 0.0.0.0/0, ::/0 | 2 | ts-unstable-fq7ob4 | | 0.0.0.0/0, ::/0 | $ headscale nodes approve-routes --identifier 1 --routes 0.0.0.0/0,::/0 Node updated $ headscale nodes list-routes ID | Hostname | Approved | Available | Serving (Primary) 1 | ts-head-ruqsg8 | 0.0.0.0/0, ::/0 | 0.0.0.0/0, ::/0 | 0.0.0.0/0, ::/0 2 | ts-unstable-fq7ob4 | | 0.0.0.0/0, ::/0 |Note that if an exit route is approved (0.0.0.0/0 or ::/0), both IPv4 and IPv6
will be approved.- Route API and CLI has been removed
#2422 - Routes are now managed via the Node API
#2422 - Only routes accessible to the node will be sent to the node
#2561
Policy v2
This release introduces a new policy implementation. The new policy is a
complete rewrite, and it introduces some significant quality and consistency
improvements. In principle, there are not really any new features, but some long
standing bugs should have been resolved, or be easier to fix in the future. The
new policy code passes all of our tests.Changes
- The policy is validated and "resolved" when loading, providing errors for
invalid rules and conditions.- Previously this was done as a mix between load and runtime (when it was
applied to a node). - This means that when you convert the first time, what was previously a
policy that loaded, but failed at runtime, will now fail at load time.
- Previously this was done as a mix between load and runtime (when it was
- Error messages should be more descriptive and informative.
- There is still work to be here, but it is already improved with "typing"
(e.g. only Users can be put in Groups)
- There is still work to be here, but it is already improved with "typing"
- All users must contain an
@character.- If your user naturally contains and
@, like an email, this will just work. - If its based on usernames, or other identifiers not containing an
@, an
@should be appended at the end. For example, if your user isjohn, it
must be written asjohn@in the policy.
- If your user naturally contains and
SSH
The SSH policy has been reworked to be more consistent with the rest of the
policy. In addition, several inconsistencies between our implementation and
Tailscale's upstream has been closed and this might be a breaking change for
some users. Please refer to the
upstream documentation
for more information on which types are allowed insrc,dstandusers.There is one large inconsistency left, we allow
*as a destination as we
currently do not supportautogroup:self,autogroup:memberand
autogroup:tagged. The support for*will be removed when we have support for
the autogroups.Current state
The new policy is passing all tests, both integration and unit tests. This does
not mean it is perfect, but it is a good start. Corner cases that is currently
working in v1 and not tested might be broken in v2 (and vice versa).We do need help testing this code
Other breaking changes
- Disallow
server_urlandbase_domainto be equal
#2544 - Return full user in API for pre auth keys instead of string
#2542 - Pre auth key API/CLI now uses ID over username
#2542
Changes
- Use Go 1.24 #2427
- Add
headscale policy checkcommand to check policy
#2553 oidc.map_legacy_usersandoidc.strip_email_domainhas been removed
#2411- Add more information to
/debugendpoint
#2420- It is now possible to inspect running goroutines and take profiles
- View of config, policy, filter, ssh policy per node, connected nodes and
DERPmap
- OIDC: Fetch UserInfo to get EmailVerified if necessary
#2493- If a OIDC provider doesn't include the
email_verifiedclaim in its ID
tokens, Headscale will attempt to get it from the UserInfo endpoint.
- If a OIDC provider doesn't include the
- OIDC: Try to populate name, email and username from UserInfo
#2545 - Improve performance by only querying relevant nodes from the database for node
updates #2509 - node FQDNs in the netmap will now contain a dot (".") at the end. This aligns
with behaviour of tailscale.com
#2503 - Restore support for "Override local DNS"
#2438 - Add documentation for routes
#2496
Changelog
586a20fbffAdd a FAQ entry about two nodes seeing each other18d21d3585Add documentation for routes (#2496)d2a6356d89Add unraid-headscale-admin web UI to docs (#2515)29ba29478bAdd usage example to routes flagfe06a00d45Container images are also available on GHCR (#2470)e52f1e87ceDrop routes table87326f5c4fExperimental implementation of Policy v2 (#2214)24ad235917Explicitly handle /headscale/{config,lib,run} in container docscb7c0173ecFix deprecation warnings (#2558)92e587a82cFix goroutine leak in EphemeralGC on node cancel (#2538)56d085bd08Fix panic on fast reconnection of node (#2536)4651d06fa8Make matchers part of the Policy interface (#2514)b9868f6516Make more granular SSH tests for both Policies (#2555)f3a1e693f2Mention "Network flow logs" as a missing feature707438f25eMention that private keys generated if needed9a86ffc102Misc doc fixes (#2562)603f3ad490Multi network integration tests (#2464)b5953d689cOIDC: Fetch UserInfo to get EmailVerified if necessary (#2493)0d3134720bOnly read relevant nodes from database in PeerChangedResponse (#2509)7891378f57Redo route code (#2422)cbce8f6011Remove coderabbit0a243b4162Remove leftover printf1e0516b99dRestore support for "Override local DNS" (#2438)05202099f7Set content-type to JSON for some debug endpoints53d9c95160Update container.md3287aa8bbaUpdate oidc.md7dc86366b4Update source.mdc61fbe9c5factivate json logs (#2424)098ab0357cadd casbin user test (#2474)818046f240add faq section on scaling/performance (#2476)3bf7d5a9c9add git hash to binary, print on startup (#2415)00d5d647edadd third-party tool headscale-pfe3521be705allow users to be defined with @ in v1 (#2495)1dddd3e93bapp: throw away not found body (#2566)eb1ecefd9eauth: ensure that routes are autoapproved when the node is stored (#2550)a4a203b9a3cli/nodes: filter nodes without any routes (#2551)93afb03f67cmd: add policy check command (#2553)30539b2e26config: disallow same server url and base_domain (#2544)109989005densure final dot on node name (#2503)c923f461aberror on undefined host in policy (#2490)03a91693acfeat: Create headscale user and group as system user/groups (#2322)5a18e91317fix auto approver on register and new policy (#2506)16868190c8fix double login URL with OIDC (#2445)da2ca054b1fix routes not being saved when new nodes registers (#2444)f1206328dcfix webauth + autoapprove routes (#2528)b3fa16fbdaflake.lock: Update (#2419)2cce3a99ebflake.lock: Update (#2430)b220fb7d51flake.lock: Update (#2440)b6fbd37539flake.lock: Update (#2454)badbb68217flake.lock: Update (#2468)f52f15ff08flake.lock: Update (#2510)9a4d0e1a99flake.lock: Update (#2518)c30e3a4762flake: add golang-lint lsp (#2507)f317a85ab4go.mod: update rest of deps (#2559)bcff0eaae7handle register auth errors (#2435)f783555469integration: clean up unreferenced hs- networks (#2534)57861507abintegration: remove failing resolvconf tests (#2549)1d65865425make version info in bug template more explicit (#2413)0fbe392499more wait, more retry (#2532)6b6509eeebnotify nodes after owner change (#2543)cfe9bbf829oidc: try to get username from userinfo (#2545)d810597414policy/matcher: fix bug using contains instead of overlap (#2556)710d75367epolicy/v2: fix host validation, consistent pattern (#2533)2b38f7bef7policy/v2: make default (#2546)e4d10ad964policy/v2: validate autogroup:interet only in dst (#2552)45e38cb080policy: reduce routes sent to peers based on packetfilter (#2561)cbc99010f0populate serving from primary routes (#2489)b92bd3d27eremove oidc migration (#2411)0b5c29e875remove policy handling for old capver (#2429)b943cce868set 0.25.0 changelog date (#2423)8e7e52cf3asome clarifications for tags (#2531)8f9fbf16f1types/authkey: include user object in response (#2542)800456018aupdate bug template with debug (#2481)e7d2d79134update capmap and deps for release (#2522)604f7f6282update to go 1.24 (#2427)1f0110fe06use helper function for constructing state updates (#2410)bbe57f6cd4use tailscale version in all unsupported errs (#2426)6403c8d5d2use tsweb debugger (#2420)
Downloads
- Route API and CLI has been removed
mirror of
https://github.com/juanfont/headscale.git
synced 2026-01-11 11:50:30 +01:00