Commit Graph
5276 Commits
Author SHA1 Message Date
Kristoffer Dalby fe98ddab90 integration: define the tag TestOAuthClientCommand uses
v2 refuses tags no policy defines, as Tailscale does.
2026-11-20 23:02:54 +01:00
Kristoffer Dalby 27d4c9f7fb api/v2: move key listing out of registerKeys
Keeps registerKeys under the gocyclo limit.
2026-11-20 23:02:54 +01:00
Kristoffer Dalby 11bbb0992c api/v2: answer as Tailscale where Headscale can
Tag, scope and token refusals, publicAddress, client listing as captured.
If-Match is checked under the policy lock; kept differences documented.
2026-11-20 23:02:54 +01:00
Kristoffer Dalby 0afe30f524 all: regenerate config docs 2026-11-20 23:02:54 +01:00
Kristoffer Dalby c4b36103a0 db, state: soft-revoke OAuth clients on DELETE
As Tailscale: the client stays readable as revoked; its tokens go.
The revoked-key collector reaps it after revoked_retention.
2026-11-20 23:02:54 +01:00
Kristoffer Dalby 167b7e6589 hscontrol/testdata: add raw Tailscale API recordings
Cited by the /api/v2 tests that copy or keep apart from Tailscale.
2026-11-20 23:02:54 +01:00
Kristoffer Dalby 5676e91629 api/v1: return 409 when a unique index refuses a write
Rename to a taken user name always returned 500, and so did every
concurrent create that passed the pre-check and lost the insert.
2026-11-20 21:22:18 +01:00
Kristoffer Dalby 1cf3b4796d db: translate driver errors to gorm sentinels
Unique and foreign-key violations reached callers as raw SQLite or
Postgres text, so no layer could tell a taken name from a server fault.
2026-11-20 21:22:18 +01:00
Kristoffer Dalby 6c89a68ec8 nix: document the module's checks and their escape hatches
Updates #2898
2026-11-20 20:29:58 +01:00
Kristoffer Dalby afd2e1b827 .github: bring the Android workflows through zizmor
Read-only token, no persisted checkout credentials, inputs.version
through env, template called with $/.
2026-11-20 19:47:15 +01:00
Kristoffer Dalby 7d07d53837 nix, .github: gate workflows on zizmor
Flake check, nix-checks job and prek hook; offline, starting at zero findings.
2026-11-20 19:47:15 +01:00
Kristoffer Dalby e52ba94b0c .github: add zizmor config for the findings that do not apply 2026-11-20 19:47:15 +01:00
Kristoffer Dalby f21f507de2 .github: run vouch only on vouch commands
Every issue comment minted the App token, which bypasses the ruleset.
2026-11-20 19:47:15 +01:00
Kristoffer Dalby 712bd74017 .github: stop persisting checkout credentials
Only mike and vouch push; their checkouts keep the token, explicitly.
2026-11-20 19:47:15 +01:00
Kristoffer Dalby bd930e6b07 .github: drop the docs deploy cache
Tag deploys restored main's cache into published docs; zizmor cache-poisoning.
2026-11-20 19:47:15 +01:00
Kristoffer Dalby 1c3ee1b07b .github: pass integration tests only the secrets they read
Call the template with $/, the same-commit reference zizmor asks for.
2026-11-20 19:47:15 +01:00
Kristoffer Dalby 1dcb57cb8c .github: grant workflows only the permissions they use
The repository default token can write; set read and widen per job.
2026-11-20 19:47:15 +01:00
Kristoffer Dalby b01e8e0980 .github: pass expressions to scripts through env
Expressions expanded inside run and script bodies become code.
2026-11-20 19:47:15 +01:00
Kristoffer Dalby 51fd8dd1b6 .github: write the gc dry-run step as a block scalar
zizmor cannot locate expressions in a single-quoted scalar with '' escapes.
2026-11-20 19:47:15 +01:00
Kristoffer Dalby ace89a0e23 types: regenerate config docs for tailsql 2026-11-20 19:36:34 +01:00
Kristoffer Dalby 02a52c9fe1 hscontrol: run tailsql as a node on headscale's own tailnet
Joins over memnet with a self-minted tagged key; re-joins after
deletion. tailsql.* config replaces the TS_AUTHKEY debug knobs.
2026-11-20 19:36:34 +01:00
Kristoffer Dalby 0278d459da CHANGELOG: note tailsql on own tailnet 2026-11-20 19:36:34 +01:00
Kristoffer Dalby 06253bcc1a go.mod: bump tailscale.com for tsnet.Server.SystemDial
Updates tailscale/tailscale#22299
2026-11-20 19:36:34 +01:00
Kristoffer Dalby 9910b6bd4d all: build with Go 1.27.4
tailscale.com requires it.
2026-11-20 19:36:34 +01:00
Kristoffer Dalby 9a9d566f57 flake: take Go from nixos-26.05
Go 1.27.4 reached the release branch before unstable. Revert once
unstable's go_latest has it.
2026-11-20 19:36:34 +01:00
Kristoffer Dalby 489526dfcf policy: allow granting tailscale.com/cap/tailsql
tailsql checks this cap; headscale embeds tailsql.
2026-11-20 19:36:34 +01:00
Kristoffer Dalby dc0edca887 db/sqliteconfig: add query_only to read-only connections
mode=ro still allows temp-table writes. ATTACH and VACUUM INTO
still write other files; callers running untrusted SQL must reject them.
2026-11-20 19:36:34 +01:00
Kristoffer Dalby 27e90f8692 db: accept a credential only when it starts with its prefix
strings.Cut matched the prefix anywhere, so "x<key>" and "Bearer  <key>" passed.
2026-11-20 18:56:59 +01:00
Kristoffer Dalby c7e9041cec all: drop CLAUDE.md
AGENTS.md is the single guide for every agent.
2026-11-20 18:35:07 +01:00
Kristoffer Dalby 10b3e9707a AGENTS.md: trim to what the code cannot show
Layout and architecture tours removed; directory rules moved to nested files.
2026-11-20 18:35:07 +01:00
Kristoffer Dalby 4608e29a02 all: add nested AGENTS.md for db, integration, bump and .github
Agents load them only when working in that directory.
2026-11-20 18:35:07 +01:00
Kristoffer Dalby c0390cb657 AGENTS.md: drop references to the removed proto/gRPC stack
Point make targets, gen/ and SetTags tests at what replaced them.
2026-11-20 18:35:07 +01:00
Kristoffer Dalby 22adccdcbd state: test that a repeated capability version stays quiet 2026-11-20 16:56:53 +01:00
Kristoffer Dalby 6ac73c76e5 policy/v2: recapture SSH forwarding from a pushed tscap commit
Same SaaS answers; drops them from untraceable.
2026-11-20 16:56:53 +01:00
Kristoffer Dalby 993d00cf0c mapper: check peer Cap against a Tailscale SaaS capture
1.86 and Cap 152 clients; each peer carries its own Cap.
2026-11-20 16:56:53 +01:00
Kristoffer Dalby 5cdc76246e mapper, state: send each peer its own capability version
Peers carried the viewer's Cap; new clients then enable hybrid
WireGuard handshakes against old peers, which never answer.
2026-11-20 16:56:53 +01:00
Kristoffer Dalby 8c1c2d5020 types: add runtime Node.CapVer, drop unused TailNodes
TailNodes stamped one capability version on every peer.
2026-11-20 16:56:53 +01:00
Kristoffer Dalby 3ad8f889d8 tools/bump: keep the Android emulator image's pins current
Temurin follows Java LTS on the same Ubuntu flavour; command-line tools
and build tools follow the stable channel of the index sdkmanager reads.
The API level stays hand-picked: it is the Android release under test.

Updates tailscale/tailscale#15660
2026-11-20 11:19:11 +01:00
Kristoffer Dalby 6fa78f41bc github: run Android integration tests on x86 KVM runners
Arm64 runners have no KVM. Tests head (tailscale-android main, debug),
unstable and latest on Android 13. The emulator image is built once per
run and shared as an artifact; the head APK is cached by commit.

Updates tailscale/tailscale#15660
2026-11-20 11:19:11 +01:00
Kristoffer Dalby 9888a7d0f9 docs: describe running the Android integration tests
Updates tailscale/tailscale#15660
2026-11-20 11:19:11 +01:00
Kristoffer Dalby e48c8409f0 cmd/hi: warn when /dev/kvm is missing
Updates tailscale/tailscale#15660
2026-11-20 11:19:11 +01:00
Kristoffer Dalby 248d2c4054 integration: test the Tailscale Android app against headscale
Covers login (alternate server, auth key, MDM, debug hook), TLS with a
private CA, restart, in-place upgrade, peer changes, MagicDNS, subnet
routes, exit nodes, Taildrop and network loss. Every test also fails on
an app crash. Lives in its own package so the arm64 matrix skips it.

Updates tailscale/tailscale#15660
2026-11-20 11:19:11 +01:00
Kristoffer Dalby e13cf4a011 integration/androidic: add Android emulator client
Runs the official Tailscale Android app in the emulator and drives it
like a user, over adb and uiautomator: login via the alternate server
dialog, an auth key, MDM or the debug login hook, CA installation in the
user or system store, network toggles, exit node selection and Taildrop.
The app has no CLI, so tests verify externally.

Updates tailscale/tailscale#15660
2026-11-20 11:19:11 +01:00
Kristoffer Dalby 1591cfb0f4 integration: add Android emulator image with test helper app
Headless KVM emulator (google_apis, API 33) plus a small helper app:
a device-owner DPC that sets the Tailscale app's managed configuration,
and a probe that resolves and fetches as an ordinary app, through the
VPN.

Updates tailscale/tailscale#15660
2026-11-20 11:19:11 +01:00
headscale-bot[bot]andgithub-actions[bot] a491228b7f Update VOUCHED list (#3705)
https://github.com/juanfont/headscale/issues/3704#issuecomment-6928641623

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-11-16 20:39:19 +00:00
Kristoffer Dalby 520eb6f9c7 .github: verify actions.lock on pull requests 2026-11-12 14:03:30 +01:00
Kristoffer Dalby 963dcf353f .github: lock workflow actions
Generated: gh-actions-lock --migrate-local-actions.
2026-11-12 14:03:30 +01:00
Kristoffer Dalby b3bbf1725e .github/actions: align headscale-up pins with the workflows
Bump never read this file; hestia sat at v2.0.0.
2026-11-12 14:03:30 +01:00
Kristoffer Dalby 44e831e1fa tools/bump: lock actions with gh-actions-lock
Workflows name release tags; actions.lock holds the commits. Bump moves
tags then relocks, and now reads .github/actions. Verify checks the lock.
2026-11-12 14:03:30 +01:00
github-actions[bot] 875f9f977c all: regenerate generated files 2026-11-12 06:55:28 +01:00