Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion docs/docs/reference/networking/tailscale-policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,18 @@ short-lived API token, and no long-lived credential is stored.
| --- | --- |
| Credential type | OpenID Connect trust credential |
| Issuer | GitHub Actions |
| Subject | `repo:GilmanLab/networking:*` |
| Subject | `repo:GilmanLab@66194346/networking@1334494603:*` |
| Scopes | `policy_file`, with `devices:posture_attributes` and `devices:core:read` |
| Audience | `api.tailscale.com/<client id>` |

The `GilmanLab` organization issues OIDC subjects in GitHub's immutable form,
with numeric organization and repository IDs rather than
`repo:GilmanLab/networking:...`. A subject pattern written with plain names
never matches, and Tailscale rejects the token exchange with HTTP 403 before it
evaluates scopes. The trailing `*` covers both subject shapes CI produces:
`:ref:refs/heads/master` for an apply run and `:pull_request` for a validation
run.

Trust credentials are managed on the
[Trust credentials](https://login.tailscale.com/admin/settings/trust-credentials)
page. The node-registration credential used elsewhere in the lab is a separate
Expand Down
9 changes: 6 additions & 3 deletions docs/docs/runbooks/tailscale-policy-change.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,12 @@ emergency edit that is not carried back into git is silently lost.

- Validation fails with an error you cannot interpret: check the
[policy file syntax reference](https://tailscale.com/docs/reference/syntax/policy-file).
- The apply step fails to authenticate: inspect the trust credential on the
- The step fails with `token exchange failed with status 403`: the OIDC token's
claims do not match the trust credential. Inspect the credential on the
[Trust credentials](https://login.tailscale.com/admin/settings/trust-credentials)
page, which records the most recent token exchange error, and confirm the
repository variables still match the credential.
page, which records the most recent token exchange error, and compare its
subject against the
[expected subject](../reference/networking/tailscale-policy.md#credentials).
Confirm the repository variables still match the credential.
- The apply step fails on a checksum mismatch: someone edited the policy in the
console. Reconcile that edit into git, then re-run the workflow.