Diff ACL access
tailscale_diff_acl_accessCompare a proposed Tailscale ACL against the live policy to see which users gain or lose access before applying it, catching silent revocations.
Instructions
Answer 'who loses access?' before applying an ACL change. Compares the CURRENT policy against a proposed one and reports, per user, which destinations they gain and lose. Run this before tailscale_update_acl -- validate_acl only checks syntax and the policy's own tests block, so a policy with no tests validates clean while revoking everyone. LIMITS, all reported in the response rather than left to be discovered. It compares USER principals only, so a revocation that runs through a tag or group can show a clean diff, and an empty result is never proof a change is safe. Posture DEFINITION changes ARE detected: posture names are resolved to their rules, so tightening posture:corp shows as a change -- except when a preview omits the definitions map, where it falls back to comparing names. It costs two preview requests per user, so it checks the first 25 by default and stops after 60 seconds regardless; either way it sets truncated, reports how many were skipped, and says which limit stopped it. Users whose preview fails are listed in failed and excluded from the compared count -- a failure is never reported as lost access, and if nothing could be compared the call fails rather than returning an empty diff.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| policy | Yes | The proposed ACL policy text to compare against the current live policy | |
| principals | No | Principals to check, as they appear in `loginName` from tailscale_list_users. That is often an email, but on a GitHub or SSO tailnet it is not (e.g. 'alice@github') -- pass the loginName verbatim rather than an address you assume. Omit to enumerate the tailnet's users automatically. Pass an explicit list to bound the request count, or to check specific users beyond the cap. | |
| maxPrincipals | No | Maximum users to check (default 25). Each costs two preview requests. Raising this on a large tailnet can be slow and may hit rate limits. |