feat(headscale): add file-based ACL policy
Ship policy.hujson (mounted + installed on first deploy, edits preserved) and wire policy.mode=file / policy.path in config.yaml. Translate the Tailscale "grants" default into headscale's legacy "acls" format (self-access, tag:shared, Tailscale SSH), since headscale 0.28 doesn't support grants. Embed in deploy.sh and document `headscale policy check`.
This commit is contained in:
6 files changed
+167
-64
No files matched your search
@@ -46,3 +46,19 @@ Unattended provisioning: [`cloud-init.yml`](cloud-init.yml).
|
||||
|
||||
DNS for `HEADSCALE_DOMAIN` must resolve to the host and 80/443 be reachable
|
||||
before deploy.
|
||||
|
||||
## ACL policy
|
||||
|
||||
A starter ACL ships in [`policy.hujson`](policy.hujson) (installed to
|
||||
`$STACK_DIR/policy.hujson` on first deploy; your edits survive re-deploys).
|
||||
**headscale uses Tailscale's legacy `acls` format, not the newer `grants`
|
||||
syntax** from the Tailscale admin console — the bundled policy is that default
|
||||
translated over (per-user self-access, a `tag:shared` everyone can reach, and
|
||||
SSH to your own devices). Some pieces (`autogroup:self`, the `ssh` block) are
|
||||
newer/experimental in headscale; a permissive fallback is included in the file.
|
||||
|
||||
```bash
|
||||
$EDITOR /srv/headscale/policy.hujson
|
||||
headscale policy check # validate (host CLI wrapper)
|
||||
cd /srv/headscale && docker compose restart headscale # apply
|
||||
```
|
||||
Reference in new issue
Block a user