Commit Graph
313 Commits
Author SHA1 Message Date
Kristoffer Dalby 3a35f74873 nix: build the module on the generated options
settings mirrors headscale's keys one to one, headscale's checks judge the
rest, and the local CLI gets the socket from a variable instead of a file.

headscale always runs as headscale:headscale, which the module creates;
user and group are read-only, so setting either fails evaluation, and stay
only because nixpkgs' headplane module reads them. A settings.cli key
fails evaluation instead of being dropped with a warning, and the unit no
longer gets CAP_CHOWN.
nix/example-configuration.nix goes: the options carry its examples and
defaults.

Updates #1926
2026-11-11 15:02:16 +01:00
Kristoffer Dalby 0844b7649d nix: check the policy at build time and the config before a switch
Store-path policy: check policy -f in system.checks.
Pre-switch: check all as the headscale user.
Adapted: no file: secret warning; groups as after activation; a new primary
group skips; the policy the unit's env selects; docs say which check covers
the policy; VM case for the unit's env.

(cherry picked from commit b6ba6e42ee)

Fixes #2898
Updates #1926
2026-11-11 15:02:16 +01:00
Kristoffer Dalby fe908c2d5a goreleaser: generate shipped config files, remove config-example.yaml
Updates #1926
2026-11-11 15:02:16 +01:00
Kristoffer Dalby 42a74821bc docs: add generated configuration reference and example
Updates #1926
2026-11-11 15:02:16 +01:00
Kristoffer Dalby 8405c248e1 nix: add generated NixOS options
Updates #1926
2026-11-11 15:02:16 +01:00
Kristoffer Dalby 5de40d9528 github: regenerate integration test list
Updates #3355
2026-11-11 12:06:27 +01:00
Martín Gómez 215844e5b7 integration: test nodes update-client 2026-11-05 15:51:04 +01:00
Kristoffer Dalby c7daf6d923 .github: regenerate integration test workflow
Fixes #3027

Claude-Session: https://claude.ai/code/session_01RHEZM1qJ2hgndiXio7P56h
2026-11-03 15:52:52 +01:00
Kristoffer Dalby 7bd88aee79 .github: exempt milestoned issues from stale bot, stale after 45 days (#3652)
Milestone means triaged. Close message said 14 days; config is 7.
2026-11-03 15:52:47 +01:00
Kristoffer Dalby eaeb6b3192 .github: regenerate integration test workflow 2026-11-02 19:15:40 +01:00
Kristoffer Dalby beb1214926 release: reject dirty sources and build artifacts
Fixes #3583
2026-10-29 15:39:30 +01:00
Kristoffer Dalby b23d4dc535 .github: regenerate integration test workflow 2026-10-29 14:00:02 +01:00
github-actions[bot] b715b9041d .github: bump 3 action pins 2026-10-29 13:39:27 +01:00
Kristoffer Dalby 2905dbfe86 ci: run race tests through a flake check 2026-10-23 18:23:53 +02:00
github-actions[bot] 1e3bbae3d1 .github: bump 1 action pins 2026-10-22 14:37:00 +02:00
Kristoffer Dalby d8bcaca066 github: add TestTailscaleCert to integration workflow
Updates #2137
2026-10-18 20:53:18 +02:00
github-actions[bot] cee9066e91 .github: bump 3 action pins 2026-10-13 12:02:59 +02:00
Martin -nexus- Mlynář a8d6f5be81 state: send a relogin as a whole node unless only its keys changed
A PeerChange patch cannot clear a peer's Expired flag or carry the
Hostinfo the relogin stored.

Fixes #3531
2026-10-09 11:44:37 +02:00
Kristoffer Dalby c9852c43da ci: distribute the compiled integration test binary 2026-10-09 11:41:09 +02:00
Kristoffer Dalby 47653f06fb integration: avoid toolchain work and login waits in CI 2026-10-09 11:41:09 +02:00
Kristoffer Dalby 9de8e9103f ci: regenerate integration test list
Updates #3508
2026-10-08 10:29:23 +02:00
Kristoffer Dalby 99cbba7aff .github: run the version bump daily
AGENTS.md says the tool "opens one pull request a day", but the workflow
only had workflow_dispatch, so since it merged it has run zero times.
2026-09-28 11:56:25 +02:00
github-actions[bot] 3603418d70 .github: bump 13 action pins 2026-09-28 07:28:19 +02:00
Kristoffer Dalby c3e48f039c ci: integration-test the tailscale GitHub action against headscale
Stand up a nix-built headscale over self-signed TLS with embedded DERP and a
regular node joined via pre-auth, then drive the official tailscale/github-action
against it: connect over OAuth (tskey-client-) and an auth key with ping as the
success gate, and exercise its hostname, version, tailscaled-args, statedir and
args inputs.
2026-09-25 17:09:19 +02:00
Juan Font c5dc3d4385 .github: gate PRs via mitchellh/vouch
Auto-close PRs from authors not listed in .github/VOUCHED.td. Issues
stay open to everyone; the close message points contributors at
CONTRIBUTING.md. Maintainers manage the list with !vouch, !denounce
and !unvouch comments, and a weekly job resyncs CODEOWNERS.

The workflows use GITHUB_TOKEN with explicit least-privilege
permissions.
2026-09-25 16:43:48 +02:00
Kristoffer Dalby 60c5f8277f .github: fold the action version updater into tools/bump
The standalone workflow has failed weekly since its token secret went
missing. One bot, one credential, one pull request to review.
2026-09-25 15:52:26 +02:00
Kristoffer Dalby 57034c314a .github: run tools/bump on demand
Manual dispatch only until the pull requests have been trusted for a
while; the schedule comes after.
2026-09-25 15:52:26 +02:00
Kristoffer Dalby 0c1c8bdcf4 .github: gate CI on flake.lock and flakehashes.json
Neither file was listed in any paths-filter, so a lockfile-only change
skipped build, check-generated, check-tests and the whole integration
matrix. Also drops integration_test/, which has never existed.
2026-09-25 15:52:26 +02:00
Kristoffer Dalby 6a9f6c3bd7 integration: pin which Hostinfo changes reach peers
Updates #3417
2026-09-10 13:06:13 +02:00
Kristoffer Dalby cea9ebd105 .github/workflows: regenerate the integration test matrix
Updates #3410
2026-09-09 18:18:17 +02:00
Michał Wadas f02a027d91 ci: add source metadata to container images 2026-08-24 13:46:10 +02:00
Kristoffer Dalby 6275e3a356 policy,state: authorize reauth tags against the authenticating user
Re-authenticating a tagged node with --advertise-tags checked the tag-owned
node, not the authenticating user, so every tag was rejected.

Fixes #3374
2026-07-28 11:55:17 +02:00
Kristoffer Dalby fc16cc6905 state: apply a new pre-auth key's tags on re-registration
Re-registering a tagged node with a different key discarded the new key's
tags and left a stale auth-key reference; retag on key change and persist it.

Fixes #3370
2026-07-28 11:55:17 +02:00
Kristoffer Dalby 1ed5693fa4 state: do not expire tagged nodes on logout
Tagged nodes never expire, but handleLogout stamped a past expiry on them,
leaving them stuck expired and unable to re-authenticate.

Fixes #3371
2026-07-28 11:55:17 +02:00
Kristoffer Dalby f20f1f1278 ci: bump Mic92/hestia to v2.0.0
Point the action at the repo root, which is the canonical entry point
in v2; the /action subpath is now a deprecated shim.

Closes #3356
2026-07-21 13:28:35 +02:00
Kristoffer Dalby 01ef350d5f integration: add TS2021 WebSocket tests to CI matrix
Generated by gh-action-integration-generator.

Updates #3357
2026-07-01 15:20:01 +02:00
Kristoffer Dalby 518b497be9 ci: run TestK8sOperator in the shared sqlite matrix
It needs no special runner (every integration container already runs privileged), so it joins the generated matrix; load br_netfilter only for that test.

Updates #1202
2026-06-26 22:06:26 +02:00
Kristoffer Dalby af46fe8867 hscontrol, integration: test OAuth scope enforcement and the oauth-clients CLI
Add scope-enforcement coverage and integration tests for the
oauth-clients CLI across the test matrix.
2026-06-26 09:18:06 +02:00
Kristoffer Dalby 24dfcf178f ci: run build, test, lint and format as nix flake checks
Adopt kradalby/flake-checks: flake.nix exposes build, gotest,
golangci-lint and formatting checks over one shared, fileset-filtered
source set, and nix-checks.yml gates each with
nix build .#checks.<system>.<name>. Drop test.yml and lint.yml —
gotestsum, golangci-lint and prettier are now those checks. golangci-lint
runs full-tree; Go formatting stays in it while formatting adds prettier.

hscontrol/servertest is too slow and timing-sensitive for the sandboxed
gotest check, so servertest.yml runs it in the devShell instead.
2026-06-20 21:08:01 +02:00
Kristoffer Dalby 2632006f5f ci: drop the DeterminateSystems flake.lock update cron
Remove update-flake.yml; flake.lock is no longer auto-bumped by CI.
2026-06-20 21:08:01 +02:00
Kristoffer Dalby 07b3a8ebd3 ci: migrate Nix CI to official installer and hestia cache
Swap nix-quick-install-action -> nix-installer-action and
cache-nix-action -> Mic92/hestia/action across every Nix workflow, drop
the now-unneeded cache keys, and run devShell tooling through a
defaults.run.shell. Add gc.yml to trim the hestia cache daily.
2026-06-20 21:08:01 +02:00
Kristoffer Dalby 560b6d81ad hscontrol: remove the proto, gRPC and grpc-gateway stack
With the v1 API served by Huma and the CLI on the HTTP client, nothing
uses the gRPC service or its generated code. Delete proto/, the generated
gen/go and gen/openapiv2, grpcv1.go, the buf config, the proto .Proto()
helpers and gRPC config, and the proto build tooling from the flake and
CI.
2026-06-19 15:21:00 +02:00
Kristoffer Dalby 8efa5ad1fe cli: migrate the CLI and integration tests to the v1 HTTP API
Replace the gRPC client with the generated HTTP client across every
command: locally over the unix socket without auth (matching the previous
local gRPC socket), remotely over TLS with a Bearer API key. Output
rendering and integration tests move to the HTTP client types; the
transport changes, the assertions do not.
2026-06-19 15:21:00 +02:00
Kristoffer Dalby a00de89c85 ci: run nix jobs with --fallback
cache.nixos.org intermittently serves corrupt NARs; build from source on
substitute failure instead of failing the job.
2026-06-18 21:11:14 +02:00
Kristoffer Dalby f5198841bd ci: drop Docker v28 pin from release workflow
Engine 29 build compat is fixed in the client; the downgrade is no longer
needed.
2026-06-18 21:11:14 +02:00
Kristoffer Dalby 74928c0241 integration: regenerate test matrix for new CLI tests 2026-06-18 15:21:11 +02:00
Kristoffer Dalby 00afce77b1 ci: run nixos module check with --fallback
cache.nixos.org intermittently serves corrupt NARs; build from source
on substitute failure instead of failing the job.
2026-06-18 14:54:44 +02:00
kloba 71a4ce3c9f noise: re-delegate SSH check when the auth session is missing (#3306) 2026-06-10 11:48:02 +02:00
Kristoffer Dalby 4483fd0cad tsic, gh: keep unstable on Docker Hub
ghcr.io/tailscale/tailscale:unstable is stale (last updated 2022,
points to v1.35.25). Only tailscale/tailscale on Docker Hub publishes
current unstable builds, so tsic.go reverts the unstable case and
build-tailscale-released pulls unstable from Docker Hub while keeping
release tags on ghcr.io.

Release tags on ghcr.io match Docker Hub by digest (verified v1.96),
so the rate-limit avoidance for the bulk of pulls is preserved.

Add the conditional docker/login-action step to the new job so the
main repo gets authenticated pulls; fork PRs fall through to anonymous
DH for the single unstable pull per CI run, well under the 100/6h
anonymous limit.
2026-05-22 14:29:24 +02:00
Kristoffer Dalby 66a5f99bfa gh: pre-pull released tailscale images for fork-PR CI
Fork PRs anonymous-pull tailscale/tailscale:vX.Y at test time and hit
Docker Hub rate limits, causing flakes. A new build-tailscale-released
job pulls the MustTestVersions set from ghcr.io once per CI run and
ships them to every test job as a gzipped tarball artifact, matching
the shape of the existing headscale/HEAD/postgres caches.

The version list is driven by 'hi list-versions' so capver is the
single source of truth; adding a version there propagates to CI
without YAML edits.

ghcr.io public reads need no auth, so the new job has no docker login
step.
2026-05-22 14:29:24 +02:00