Skip to content

Commit 6e2caf7

Browse files
docs(secrets): warn that agents can use the 1Password token, and keep the check quiet
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 19adf73 commit 6e2caf7

2 files changed

Lines changed: 12 additions & 6 deletions

File tree

‎docs/user/secrets-1password-connect.md‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,23 @@ Then use references as usual, for example `op://Automation/provider-token/creden
2424

2525
## Check that it works
2626

27-
Confirm the address is a Connect server, then read a secret with a clean environment so only the Connect
28-
variables can sign in:
27+
On the server's machine, set `OP_CONNECT_HOST` and `OP_CONNECT_TOKEN` in your shell to the values the
28+
server uses. Confirm the address is a Connect server, then read a secret with a clean environment so only
29+
the Connect variables can sign in:
2930

3031
```bash
3132
curl -s "$OP_CONNECT_HOST/health"
3233
env -i PATH="$PATH" HOME="$(mktemp -d)" OP_CONNECT_HOST="$OP_CONNECT_HOST" OP_CONNECT_TOKEN="$OP_CONNECT_TOKEN" \
33-
op read --no-newline "op://Automation/provider-token/credential"
34+
op read --no-newline "op://Automation/provider-token/credential" >/dev/null && echo "Secret read"
3435
```
3536

3637
The health response names the 1Password Connect API. Any other page means the address points at something
3738
else, such as a reverse proxy that answers for every hostname.
3839

3940
## Things to know
4041

42+
- Agents run with the server's environment, so an agent can use the Connect token to read anything it can.
43+
Give the token only vaults whose items you would let an agent read.
4144
- Through Connect, `op` can read items but cannot list vaults or accounts. Test with `op read` or
4245
`op item get`, not `op vault list`.
4346
- A name in a reference can contain letters, digits, spaces, `.`, `_`, and `-`. An item titled

‎docs/user/secrets-1password-service-account.md‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,20 @@ Then use references as usual, for example `op://Automation/provider-token/creden
2929

3030
## Check that it works
3131

32-
Run this on the server's machine with a clean environment, so only the token can sign in:
32+
On the server's machine, set `OP_SERVICE_ACCOUNT_TOKEN` in your shell to the same token the server uses,
33+
then read a secret with a clean environment so only the token can sign in:
3334

3435
```bash
3536
env -i PATH="$PATH" HOME="$(mktemp -d)" OP_SERVICE_ACCOUNT_TOKEN="$OP_SERVICE_ACCOUNT_TOKEN" \
36-
op read --no-newline "op://Automation/provider-token/credential"
37+
op read --no-newline "op://Automation/provider-token/credential" >/dev/null && echo "Secret read"
3738
```
3839

39-
If it prints the secret, T3 Code can read it. `op whoami` reports a user type of `SERVICE_ACCOUNT`.
40+
If it prints `Secret read`, T3 Code can read it. `op whoami` reports a user type of `SERVICE_ACCOUNT`.
4041

4142
## Things to know
4243

44+
- Agents run with the server's environment, so an agent can use the token to read anything the service
45+
account can. Give it only vaults whose items you would let an agent read.
4346
- A name in a reference can contain letters, digits, spaces, `.`, `_`, and `-`. An item titled
4447
`Service Token: CI` cannot be written as a reference, so use its item ID instead, for example
4548
`op://Automation/<item-id>/credential`.

0 commit comments

Comments
 (0)