Skip to content

fix(cd): OAuth token exchange requires client_id — read TS_OAUTH_CLIENT_ID - #16

Merged
Jesssullivan merged 1 commit into
mainfrom
jess/oauth-exchange-client-id
Jul 4, 2026
Merged

fix(cd): OAuth token exchange requires client_id — read TS_OAUTH_CLIENT_ID#16
Jesssullivan merged 1 commit into
mainfrom
jess/oauth-exchange-client-id

Conversation

@Jesssullivan

Copy link
Copy Markdown
Owner

Pre-deadline fix for the TAILSCALE_API_KEY→OAuth swap (hard deadline 2026-07-31): the tskey-client exchange in scripts/ts_auth.py posted client_id="" which Tailscale rejects (docs require both fields). Now reads the non-secret TS_OAUTH_CLIENT_ID Actions variable (set via gh variable set TS_OAUTH_CLIENT_ID) and errors with a clear message if a client secret is supplied without it — instead of a cryptic 4xx during the deadline-window swap. Legacy tskey-api pass-through unchanged (current CD unaffected). Local checks: syntax + passthrough + guard behavior.

Tailscale's /api/v2/oauth/token rejects client_credentials requests
without client_id (docs: both fields required). resolve_bearer() sent
client_id="" — the OAuth path would have failed on first real use at the
TAILSCALE_API_KEY swap. Read the (non-secret) id from TS_OAUTH_CLIENT_ID,
fail loudly if a tskey-client secret is provided without it, and pass the
Actions variable through in cd.yml.
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown

✅ ACL Validation

Validation

tailnet-acl dev shell
  dhall:         1.42.3
  dhall-to-json: 1.7.12
  just:          just 1.46.0
Loading local policy from /home/runner/work/tailnet-acl/tailnet-acl/generated/policy.json ...
Fetching live ACL from taila4c78d.ts.net ...

Validation PASSED: local policy matches live ACL.
acls: OK
autoApprovers: OK
grants: OK
groups: OK
hosts: OK
nodeAttrs: OK
ssh: OK
tagOwners: OK

Diff against live

tailnet-acl dev shell
  dhall:         1.42.3
  dhall-to-json: 1.7.12
  just:          just 1.46.0
Fetching live ACL ...
No changes: local policy matches live ACL.

@Jesssullivan
Jesssullivan merged commit 4765352 into main Jul 4, 2026
3 checks passed
@Jesssullivan
Jesssullivan deleted the jess/oauth-exchange-client-id branch July 4, 2026 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant