Kristoffer Dalby
91f0c8e8bb
servertest: add exit-node SaaS capture
...
saasprobe exit-node: a node picks, switches and clears an exit node
while same-user and other-user peers watch.
Updates #3643
2026-11-05 16:15:27 +01:00
Kristoffer Dalby
ac25916b5f
api/v2: register device update operations apart
...
registerDevices passed gocyclo's limit.
Updates #3629
2026-11-05 15:51:04 +01:00
Kristoffer Dalby
49ddd3d412
docs: describe update-client as Tailscale answers it
...
auto_update.enabled reaches only nodes with no stored setting.
Updates #3629
2026-11-05 15:51:04 +01:00
Kristoffer Dalby
fda2a123c7
hscontrol: answer 413 only for an oversized c2n response
...
Updates #3629
2026-11-05 15:51:04 +01:00
Kristoffer Dalby
6245fbe30b
integration: expect not found from nodes update-client
...
Run every tested client version.
Updates #3629
2026-11-05 15:51:04 +01:00
Kristoffer Dalby
f9992637a6
cli: follow the update-client wire format
...
Drop --force, which also shadowed the global flag. Wait 15s, past
the server's 10s c2n wait.
Updates #3629
2026-11-05 15:51:04 +01:00
Kristoffer Dalby
04ba527a91
gen/client/v2: regenerate for update-client and update-status
...
Updates #3629
2026-11-05 15:51:04 +01:00
Kristoffer Dalby
7af29e8c45
api/v2: add device update-status
...
updating from a started update until the node runs another version,
or for at most 10 minutes; else not-updating. Kept in memory.
Updates #3629
2026-11-05 15:51:04 +01:00
Kristoffer Dalby
8230c58a0c
api/v2: answer update-client as Tailscale does
...
No body, 200 {} once started, 404 "not found" for a device that
disallows updates, has no map stream, or refuses. c2n wait 10s.
Updates #3629
2026-11-05 15:51:04 +01:00
Kristoffer Dalby
7ea7208ec0
servertest: replay update-client captures against headscale
...
Fails until update-client matches SaaS; grace test now expects SaaS's 404.
Updates #3629
2026-11-05 15:51:04 +01:00
Kristoffer Dalby
da6a5e9f5d
servertest: add update-client SaaS captures
...
API rows from saasprobe; console Start update imported from a browser HAR.
Updates #3629
2026-11-05 15:51:04 +01:00
Kristoffer Dalby
e0c6839c11
api/v2: bound update-client request body
...
TestEveryRequestBodyIsBounded landed on main after the PR branched.
Updates #3629
2026-11-05 15:51:04 +01:00
Martín Gómez
c660713a7c
CHANGELOG: link the update-client pull request
2026-11-05 15:51:04 +01:00
Martín Gómez
f203c003eb
docs: document updating clients remotely
2026-11-05 15:51:04 +01:00
Martín Gómez
215844e5b7
integration: test nodes update-client
2026-11-05 15:51:04 +01:00
Martín Gómez
931282a137
cli: add nodes update-client command
2026-11-05 15:51:04 +01:00
Martín Gómez
bb4c690101
gen/client/v2: regenerate for the update-client endpoint
2026-11-05 15:51:04 +01:00
Martín Gómez
c8e5aa6682
api/v2: add the device update-client endpoint
...
POST /api/v2/device/{id}/update-client asks a connected node to update
its Tailscale client through c2n POST /update, as the Tailscale admin
console does. The path is the console's undocumented one; the request
and response shapes are headscale's own.
2026-11-05 15:51:04 +01:00
Martín Gómez
1386772daf
hscontrol: accept c2n responses over noise
...
Tailscale clients post the HTTP response to a c2n PingRequest over
Noise. Accept it on /machine/c2n-response, only from the Noise session
of the node the request was sent to, and hand it to the waiting caller.
2026-11-05 15:51:04 +01:00
Martín Gómez
672340c07e
state: track pending c2n requests
...
A node answers a c2n request with a separate POST to control. Register
each request under a random id so the answer reaches the caller waiting
for it, and drop the entry when the caller gives up.
2026-11-05 15:51:04 +01:00
Kristoffer Dalby
2853d71d24
servertest: replay rule-less exit captures
2026-11-05 15:34:46 +01:00
Kristoffer Dalby
62c2efb7c2
policy/v2: add SaaS captures of exit routes under rule-less policies
2026-11-05 15:34:46 +01:00
Kristoffer Dalby
9f88e7ddcf
policy/v2: compile a rule-less policy as allow-all per node too
...
compileFilterRulesForNode missed the case d2a85b1d1 fixed.
2026-11-05 15:34:46 +01:00
Kristoffer Dalby
9332d2d022
docs: describe which rules offer exit nodes
...
Exit routes need a rule to the internet. via grants add up; plain internet rules bypass via.
2026-11-05 15:34:46 +01:00
Kristoffer Dalby
6f2c7fbe7d
derp: check derp.paths and derp.urls regions like a policy derpMap
...
Clients count latency by RegionID, so a key mismatch picks a missing home.
Updates #2918
2026-11-05 14:11:33 +01:00
Kristoffer Dalby
1a635e7d08
docs: document the policy derpMap
...
Updates #2918
2026-11-05 14:11:33 +01:00
Kristoffer Dalby
69e01ca7f8
policy/v2: reject policy DERP nodes on tailscale.com like SaaS
...
SaaS also rejects its DERP servers' IPs; that needs its live server list.
Updates #2918
2026-11-05 14:11:33 +01:00
Kristoffer Dalby
b54570d375
state: serve the configured DERP map with the policy derpMap applied
...
Applied as SaaS applies it; a derpMap-only policy write reaches clients.
Updates #2918
2026-11-05 14:11:33 +01:00
Kristoffer Dalby
502a47c7d3
policy/v2: accept and validate a policy derpMap like SaaS
...
Same rules and wording as SaaS: custom regions 900-999 with a node,
IDs match their keys, null removes. 26 SaaS captures pin it.
Updates #2918
2026-11-05 14:11:33 +01:00
Kristoffer Dalby
9dd164e04a
servertest: pin DERP HomeParams a client keeps
...
Updates #2918
2026-11-05 14:11:33 +01:00
Kristoffer Dalby
e358a539af
derp: reject unknown keys in derp.paths files
...
SaaS rejects them in a policy derpMap; a misspelt key silently did nothing.
Updates #2918
2026-11-05 14:11:33 +01:00
Kristoffer Dalby
00f9373246
docs: document DERP region scores
...
Updates #2918
2026-11-05 14:11:33 +01:00
Kristoffer Dalby
6f2f97ca17
derp: fix HomeParams merge panic, allow scores-only files
...
Maps without HomeParams (Tailscale default, embedded region) hit a nil
dereference. Keep HomeParams nil unless set; drop scores clients ignore
or JSON cannot encode.
Fixes #2918
2026-11-05 14:11:33 +01:00
Samy Djemaï
0f2e68fd1d
feat: add DERPHomeParams settings
2026-11-05 14:11:33 +01:00
Kristoffer Dalby
f2a9b71d50
policy/v2: add SaaS captures for SSH rule validation
...
Updates #3335
2026-11-05 13:43:48 +01:00
Kristoffer Dalby
a48fe0f94d
policy/v2: pin SSH rules refused unlike SaaS
...
SaaS accepts autogroup:tagged next to user dsts, then sends no rules.
The check fails when a re-capture shows SaaS changed.
Updates #3335
2026-11-05 13:43:48 +01:00
Kristoffer Dalby
b20d37289e
policy/v2: check SSH user destinations as Tailscale does
...
A user dst needs every source to be that user; groups count by their
members. Tags and autogroup:tagged reach neither user dsts nor self.
Updates #3335
2026-11-05 13:43:48 +01:00
Kristoffer Dalby
36ea8d9e81
policy/v2: refuse autogroup:member as SSH destination
...
Tailscale answers invalid dst "autogroup:member" for every source.
Updates #3335
2026-11-05 13:43:48 +01:00
Kristoffer Dalby
e93046aa68
policy/v2: word SSH rule errors as Tailscale does
...
Check src and dst kinds in validate, not in JSON decoding, so they
get the label. Texts from SaaS acl/validate answers.
Updates #3335
2026-11-05 13:43:48 +01:00
Kristoffer Dalby
87b110b335
policy/v2: label SSH rule errors once with [ssh]
...
Wrap in the SSH loop, so shared tag and group checks get it too.
Tailscale's marker; replaces the per-message ssh: prefix.
Fixes #3335
2026-11-05 13:43:48 +01:00
Jemanuel
f8d3703a80
policy: prefix all SSH validation errors with "ssh"
2026-11-05 13:43:48 +01:00
Kristoffer Dalby
2908eff547
hscontrol: replay SaaS key expiry captures
...
Each expirySeconds form, auth and API keys; tscap 4f88289.
2026-11-05 12:41:50 +01:00
Kristoffer Dalby
895094edb0
gen/client/v2: regenerate for the auth key tags and expiry changes
2026-11-05 12:41:50 +01:00
Kristoffer Dalby
f32fc9f14a
api/v2: refuse expirySeconds outside 0 to 90 days
...
Matches SaaS status and text.
2026-11-05 12:41:50 +01:00
Kristoffer Dalby
f1382e4322
api/v2: accept an auth key create without tags
...
SaaS takes it; huma marked the field required (422).
2026-11-05 12:41:50 +01:00
Kristoffer Dalby
9ad6b73072
cli: show a pre-auth key without expiration as -
2026-11-05 12:41:50 +01:00
Kristoffer Dalby
8daa63cc9d
gen/client/v1: regenerate for the nullable pre-auth key expiration
2026-11-05 12:41:50 +01:00
Kristoffer Dalby
1a32d031bf
api/v1: report a pre-auth key without expiration as null
...
Zero time read as expired; API keys and 0.29 already emit null.
2026-11-05 12:41:50 +01:00
Seena Fallah
92bc0b6226
api/v1: persist omitted key expiration as NULL, not zero time
...
CreateAPIKey and CreatePreAuthKey declared a zero-valued time.Time and
passed its address to the state layer, so a request that omitted the
expiration persisted 0001-01-01 instead of NULL. Both key types were
then rejected as already-expired on first use. Pass the request body's
*time.Time straight through (nil when omitted).
Signed-off-by: Seena Fallah <seenafallah@gmail.com >
2026-11-05 12:41:50 +01:00
Kristoffer Dalby
459b157c3b
docs: note the posture attributes endpoint and its proxy setting
...
trusted_proxies now feeds a stored, API-visible address, not only logs.
Updates #2272
2026-11-05 12:38:53 +01:00