Skip to content

Commit 2d71525

Browse files
committed
Tailscale Doc: Add steps to create and apply a tag, to properly isolate the app capabilities grant. Fixes #273.
1 parent d3b4749 commit 2d71525

1 file changed

Lines changed: 15 additions & 3 deletions

File tree

docs/tailscale.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,21 @@ Tailscale can forward along what they call "capabilities", which can translate t
4343
2. Click on the "Access Controls" tab.
4444
3. Click on "JSON Editor".
4545

46-
Locate the `grants` array in the JSON editor, or create it if needed. Here is an example:
46+
First, create a new tag called `tag:xyops` and add it into the `tagOwners` section. Example:
47+
48+
```json
49+
"tagOwners": {
50+
"tag:xyops": ["your-email@domain.com"]
51+
}
52+
```
53+
54+
Next, locate the `grants` array in the JSON editor, or create it if needed. Add the following grant into the array:
4755

4856
```json
4957
"grants": [
5058
{
5159
"src": ["autogroup:admin"],
52-
"dst": ["autogroup:admin"],
60+
"dst": ["tag:xyops"],
5361
"app": {
5462
"xyops.io/cap/ts": [ {"privileges": ["admin"], "roles": []} ],
5563
}
@@ -128,6 +136,8 @@ tailscale serve --accept-app-caps=xyops.io/cap/ts 5522
128136

129137
The special `--accept-app-caps=xyops.io/cap/ts` argument tells Tailscale to forward the special `Tailscale-App-Capabilities` HTTP header with all incoming requests, which xyOps uses to apply user privileges and roles (see [Capabilities](#capabilities) above).
130138

139+
Before trying to load the app in a browser, go to your [Machine List](https://login.tailscale.com/admin/machines) in your Tailscale Admin Console, and add the `tag:xyops` tag to the machine hosting xyOps.
140+
131141
Note that the first time you visit your Tailscale-provided secure HTTPS URL for your served app, there may be a short delay as Tailscale provisions the TLS certificate. If you receive a timeout error, please wait a few seconds and refresh. This is normal.
132142

133143
## Logout
@@ -281,7 +291,9 @@ Type this command to start everything up (the `-d` switch runs it in the backgro
281291
docker compose up -d
282292
```
283293

284-
And then visit your `TS_HOST` URL in your favorite browser. Example:
294+
Before trying to load the app in a browser, go to your [Machine List](https://login.tailscale.com/admin/machines) in your Tailscale Admin Console, and add the `tag:xyops` tag to the new machine. You can also disable the expiry here as well.
295+
296+
Finally, visit your `TS_HOST` URL in your favorite browser. Example:
285297

286298
https://xyops.taild89302.ts.net/
287299

0 commit comments

Comments
 (0)