Skip to content

Commit dd86cbe

Browse files
committed
[cli] docs: document how to pass secrets to containers in docker compose
1 parent 1326fdb commit dd86cbe

File tree

2 files changed

+39
-2
lines changed

2 files changed

+39
-2
lines changed

cli/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ For scripting purposes you can disable the pretty effect of the env-var by passi
6464

6565
### Environment variables
6666

67-
6867
#### MPFS host
6968
If you do not want to host your own MPFS service, you can use a public one at `https://mpfs.plutimus.com`.
7069

@@ -216,6 +215,8 @@ anti facts --help
216215
```
217216
will show you all the available facts you can query.
218217

218+
219+
219220
## Design
220221

221222
[Interface Design document](docs/antithesis-interface.md)
@@ -225,11 +226,12 @@ will show you all the available facts you can query.
225226

226227
Depending on your role you can access the different manuals.
227228

229+
228230
- [Requester manual](docs/requester-role.md). A test-run requester is the regular user of the system. They can register users and roles, and request test-runs.
229231
- [Agent manual](docs/antithesis-agent-role.md). This is a special role that holds the key to the Antithesis platform. It is responsible for
230232
whitelisting repository and managing test-runs, from pending state to running and completed.
231233
- [Oracle manual](docs/oracle-role.md). The oracle is the owner of the Antithesis token. It is almost mechanically responsible for merging change requests from the agent and the requester.
232-
234+
- [Secrets management manual](docs/secrets-management.md). This manual describes how to manage secrets in a secure way.
233235
Finally, the [Real-world scenario manual][realWorld] provides a realistic overall use case involving all three roles.
234236

235237
[realWorld]: docs/real-world.md

cli/docs/secrets-management.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Secrets management tips
2+
3+
## Secrets in docker containers
4+
5+
When passing secrets to a docker container in a compose you can use the `ANTI_SECRETS_FILE` environment variable to point to a file containing the secrets in yaml format. So instead of setting say `ANTI_SSH_PASSWORD` and `ANTI_GITHUB_PAT` you can create a file `secrets.yaml` with the following content:
6+
7+
```yaml
8+
sshPassword: your_ssh_password
9+
githubPAT: your_github_pat
10+
```
11+
12+
and then pass it to the container with someething like:
13+
14+
```yaml
15+
services:
16+
anti:
17+
.....
18+
environment:
19+
- ANTI_SECRETS_FILE=/run/secrets/anti_secrets
20+
secrets:
21+
- anti_secrets
22+
23+
secrets:
24+
anti_secrets:
25+
file: ./secrets.yaml
26+
```
27+
28+
These are the supported secrets for different commands:
29+
```yaml
30+
sshPassword: requester_ssh_password
31+
githubPAT: requester_or_oracle_github_pat
32+
walletPassphrase: anyone_wallet_passphrase_if_any
33+
antithesisPassword: agent_antithesis_platform_password
34+
slackWebhook: agent_slack_webhook_url
35+
```

0 commit comments

Comments
 (0)