@@ -13,21 +13,28 @@ as your source of truth.
1313panel] ( https://login.tailscale.com/admin ) and copying down the name next to the
1414Tailscale logo in the upper left hand corner of the page.
1515
16+ ### ` oauth-client-id ` and ` audience `
17+
18+ ** Optional** The ID and audience for a [ federated identity] ( https://tailscale.com/kb/1581/workload-identity-federation )
19+ for your tailnet. The federated identity must have the ` policy_file ` scope.
20+
21+ Either ` api-key ` , ` oauth-client-id ` and ` oauth-secret ` , or ` oauth-client-id ` and ` audience ` are required.
22+
1623### ` api-key `
1724
1825** Optional** An API key authorized for your tailnet. You can get one [ in the
1926admin panel] ( https://login.tailscale.com/admin/settings/keys ) .
20- Either ` api-key ` or ` oauth-client-id ` and ` oauth-secret ` are required.
27+ Either ` api-key ` , ` oauth-client-id ` and ` oauth-secret ` , or ` oauth-client-id ` and ` audience ` are required.
2128
2229Please note that API keys will expire in 90 days. Set up a monthly event to
23- rotate your Tailscale API key, or use an OAuth client.
30+ rotate your Tailscale API key, or use a trust credential ( OAuth client or federated identity) .
2431
2532### ` oauth-client-id ` and ` oauth-secret `
2633
2734** Optional** The ID and secret for an [ OAuth client] ( https://tailscale.com/kb/1215/oauth-clients )
28- for your tailnet. The client must have the ` acl ` scope.
35+ for your tailnet. The client must have the ` policy_file ` scope.
2936
30- Either ` api-key ` or ` oauth-client-id ` and ` oauth-secret ` are required.
37+ Either ` api-key ` , ` oauth-client-id ` and ` oauth-secret ` , or ` oauth-client-id ` and ` audience ` are required.
3138
3239### ` policy-file `
3340
6370
6471jobs :
6572 acls :
73+ permissions :
74+ contents : read
75+ id-token : write # This is required for the Tailscale action to request a JWT from GitHub
6676 runs-on : ubuntu-latest
6777
6878 steps :
69- - uses : actions/checkout@v4
79+ - uses : actions/checkout@v6
7080
7181 - name : Fetch version-cache.json
72- uses : actions/cache@v4
82+ uses : actions/cache@v5
7383 with :
7484 path : ./version-cache.json
7585 key : version-cache.json-${{ github.run_id }}
8191 id : deploy-acl
8292 uses : tailscale/gitops-acl-action@v1
8393 with :
84- api-key : ${{ secrets.TS_API_KEY }}
94+ oauth-client-id : ${{ secrets.TS_OAUTH_ID }}
95+ audience : ${{ secrets.TS_AUDIENCE }}
8596 tailnet : ${{ secrets.TS_TAILNET }}
8697 action : apply
8798
@@ -90,23 +101,20 @@ jobs:
90101 id : test-acl
91102 uses : tailscale/gitops-acl-action@v1
92103 with :
93- api-key : ${{ secrets.TS_API_KEY }}
104+ oauth-client-id : ${{ secrets.TS_OAUTH_ID }}
105+ audience : ${{ secrets.TS_AUDIENCE }}
94106 tailnet : ${{ secrets.TS_TAILNET }}
95107 action : test
96108` ` `
97109
98- Generate a new API key [here](https://login.tailscale.com/admin/settings/keys).
99-
100- Set a monthly calendar reminder to renew this key because Tailscale does not
101- currently support API key renewal (this will be updated to support that when
102- that feature is implemented).
110+ Generate a new federated identity. See [here](https://login.tailscale.com/admin/settings/keys) for instructions.
103111
104112Then open the secrets settings for your repo and add two secrets:
105113
106- * ` TS_API_KEY`: Your Tailscale API key from the earlier step
114+ * ` TS_OAUTH_ID`: Your federated identity's client ID
115+ * `TS_AUDIENCE`: Your federated identity's audience
107116* `TS_TAILNET`: Your tailnet's name (it's next to the logo on the upper
108- left-hand corner of the [admin
109- panel](https://login.tailscale.com/admin/machines))
117+ left-hand corner of the [admin panel](https://login.tailscale.com/admin/machines))
110118
111119Once you do that, commit the changes and push them to GitHub. You will have CI
112120automatically test and push changes to your tailnet policy file to Tailscale.
0 commit comments