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
50a6823ffb
api/v2: serve policies and errors with SaaS's content types
...
A JSON read of a commented policy held comments, so JSON clients failed on
it. Errors say application/json, and a policy write answers as HuJSON.
2026-11-03 17:05:00 +01:00
Kristoffer Dalby
4e946edb08
api/v2: enforce and document OAuth tag permissions
...
Retagging requires all current and requested tags; disallowed tags return
400. Token responses list tags only when the token may assign them.
2026-11-02 19:15:40 +01:00
Kristoffer Dalby
0bf5b0f0af
api/v2: limit request bodies and redact schema-validation details
...
Bound schema, raw, and token-form bodies before parsing. Omit submitted
values from schema errors while preserving policy reasons and test labels.
2026-11-02 19:15:40 +01:00
Kristoffer Dalby
f2df44295a
state, db: validate and store the current policy before installing it
...
Reject empty input. Validate without changing live state, then store and
install under one lock; prune old rows only with a successful write.
2026-11-02 19:15:40 +01:00
Kristoffer Dalby
a63ee3e032
api/v2: add the acl/validate endpoint
...
Checks a policy as a write would, without storing it. As on Tailscale,
a refused policy answers 200 with its reason; only an empty body is 400.
Terraform provider 0.29.3 calls it at plan time.
2026-10-29 11:04:05 +01:00
MsfPablo
d60bac5c79
db: reject unknown OAuth client scopes at creation ( #3424 )
...
Unknown scopes grant nothing, so clients were silently under-privileged.
Report every invalid scope at once.
Fixes #3406
2026-09-25 21:24:37 +02:00
Kristoffer Dalby
84715e976c
api/v2: add OAuth client-credentials auth and scope enforcement
2026-06-26 09:18:06 +02:00
Kristoffer Dalby
475a5ead0c
api/v2: add user get and list (Tailscale compat)
...
Backs the tailscale_user and tailscale_users data sources. getUser maps
gorm/ErrUserNotFound to 404; unmodelled fields are honest constants,
deviceCount/lastSeen/currentlyConnected aggregate the user's nodes.
2026-06-24 18:41:06 +02:00
Kristoffer Dalby
fe08d43978
api/v2: add Tailscale-compatible keys API
...
Add the v2 foundation — Basic/Bearer auth, scope scaffolding, the
tailnet check, and the Tailscale error shape — plus the auth-key
endpoints mapped onto Headscale pre-auth keys.
2026-06-21 04:17:03 +02:00