v0.26.0-beta.1
Pre-releaseBREAKING
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 in src
, dst
and users
.
There is one large inconsistency left, we allow *
as a destination as we
currently do not support autogroup:self
, autogroup:member
and
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_url
andbase_domain
to 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 check
command to check policy
#2553 oidc.map_legacy_users
andoidc.strip_email_domain
has been removed
#2411- Add more information to
/debug
endpoint
#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_verified
claim 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
- 586a20f Add a FAQ entry about two nodes seeing each other
- 18d21d3 Add documentation for routes (#2496)
- d2a6356 Add unraid-headscale-admin web UI to docs (#2515)
- 29ba294 Add usage example to routes flag
- fe06a00 Container images are also available on GHCR (#2470)
- e52f1e8 Drop routes table
- 87326f5 Experimental implementation of Policy v2 (#2214)
- 24ad235 Explicitly handle /headscale/{config,lib,run} in container docs
- cb7c017 Fix deprecation warnings (#2558)
- 92e587a Fix goroutine leak in EphemeralGC on node cancel (#2538)
- 56d085b Fix panic on fast reconnection of node (#2536)
- 4651d06 Make matchers part of the Policy interface (#2514)
- b9868f6 Make more granular SSH tests for both Policies (#2555)
- f3a1e69 Mention "Network flow logs" as a missing feature
- 707438f Mention that private keys generated if needed
- 9a86ffc Misc doc fixes (#2562)
- 603f3ad Multi network integration tests (#2464)
- b5953d6 OIDC: Fetch UserInfo to get EmailVerified if necessary (#2493)
- 0d31347 Only read relevant nodes from database in PeerChangedResponse (#2509)
- 7891378 Redo route code (#2422)
- cbce8f6 Remove coderabbit
- 0a243b4 Remove leftover printf
- 1e0516b Restore support for "Override local DNS" (#2438)
- 0520209 Set content-type to JSON for some debug endpoints
- 53d9c95 Update container.md
- 3287aa8 Update oidc.md
- 7dc8636 Update source.md
- c61fbe9 activate json logs (#2424)
- 098ab03 add casbin user test (#2474)
- 818046f add faq section on scaling/performance (#2476)
- 3bf7d5a add git hash to binary, print on startup (#2415)
- 00d5d64 add third-party tool headscale-pf
- e3521be allow users to be defined with @ in v1 (#2495)
- 1dddd3e app: throw away not found body (#2566)
- eb1ecef auth: ensure that routes are autoapproved when the node is stored (#2550)
- a4a203b cli/nodes: filter nodes without any routes (#2551)
- 93afb03 cmd: add policy check command (#2553)
- 30539b2 config: disallow same server url and base_domain (#2544)
- 1099890 ensure final dot on node name (#2503)
- c923f46 error on undefined host in policy (#2490)
- 03a9169 feat: Create headscale user and group as system user/groups (#2322)
- 5a18e91 fix auto approver on register and new policy (#2506)
- 1686819 fix double login URL with OIDC (#2445)
- da2ca05 fix routes not being saved when new nodes registers (#2444)
- f120632 fix webauth + autoapprove routes (#2528)
- b3fa16f flake.lock: Update (#2419)
- 2cce3a9 flake.lock: Update (#2430)
- b220fb7 flake.lock: Update (#2440)
- b6fbd37 flake.lock: Update (#2454)
- badbb68 flake.lock: Update (#2468)
- f52f15f flake.lock: Update (#2510)
- 9a4d0e1 flake.lock: Update (#2518)
- c30e3a4 flake: add golang-lint lsp (#2507)
- f317a85 go.mod: update rest of deps (#2559)
- bcff0ea handle register auth errors (#2435)
- f783555 integration: clean up unreferenced hs- networks (#2534)
- 5786150 integration: remove failing resolvconf tests (#2549)
- 1d65865 make version info in bug template more explicit (#2413)
- 0fbe392 more wait, more retry (#2532)
- 6b6509e notify nodes after owner change (#2543)
- cfe9bbf oidc: try to get username from userinfo (#2545)
- d810597 policy/matcher: fix bug using contains instead of overlap (#2556)
- 710d753 policy/v2: fix host validation, consistent pattern (#2533)
- 2b38f7b policy/v2: make default (#2546)
- e4d10ad policy/v2: validate autogroup:interet only in dst (#2552)
- 45e38cb policy: reduce routes sent to peers based on packetfilter (#2561)
- cbc9901 populate serving from primary routes (#2489)
- b92bd3d remove oidc migration (#2411)
- 0b5c29e remove policy handling for old capver (#2429)
- b943cce set 0.25.0 changelog date (#2423)
- 8e7e52c some clarifications for tags (#2531)
- 8f9fbf1 types/authkey: include user object in response (#2542)
- 8004560 update bug template with debug (#2481)
- e7d2d79 update capmap and deps for release (#2522)
- 604f7f6 update to go 1.24 (#2427)
- 1f0110f use helper function for constructing state updates (#2410)
- bbe57f6 use tailscale version in all unsupported errs (#2426)
- 6403c8d use tsweb debugger (#2420)