Skip to content

Commit 5aff922

Browse files
committed
fix: update README
1 parent 0e4a815 commit 5aff922

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

README.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ Different types of secrets are supported and exposed to your builds in appropria
77
- `ssh-agent` for SSH Private Keys
88
- Environment Variables for strings
99
- `git-credential` via git's credential.helper
10+
- Other secrets, which must be suffixed with one of the following:
11+
- `_SECRET`
12+
- `_SECRET_KEY`
13+
- `_PASSWORD`
14+
- `_TOKEN`
15+
- `_ACCESS_KEY`
1016

1117
## Installation
1218

@@ -55,9 +61,10 @@ When run via the agent environment and pre-exit hook, your builds will check in
5561
- `s3://{bucket_name}/private_ssh_key`
5662
- `s3://{bucket_name}/environment` or `s3://{bucket_name}/env`
5763
- `s3://{bucket_name}/git-credentials`
64+
- `s3://{bucket_name}/secret-files/`
5865

5966
The private key is exposed to both the checkout and the command as an ssh-agent instance.
60-
The secrets in the env file are exposed as environment variables.
67+
The secrets in the env file are exposed as environment variables, as are individual secret files.
6168
The locations of git-credentials are passed via `GIT_CONFIG_PARAMETERS` environment to git.
6269

6370
## Uploading Secrets
@@ -100,6 +107,16 @@ Key values pairs can also be uploaded.
100107
aws s3 cp --acl private --sse aws:kms <(echo "MY_SECRET=blah") "s3://${secrets_bucket}/environment"
101108
```
102109

110+
### Individual Secrets
111+
112+
Individual secrets with a suffix of `_SECRET`, `_SECRET_KEY`, `_PASSWORD`, `_TOKEN`, or `_ACCESS_KEY` can be uploaded to the same location as the rest of your configuration, under an additional prefix of `/secret-files/`.
113+
114+
The file contents should be the secret value, and the object key becomes the environment variable name. For example:
115+
116+
```bash
117+
aws s3 cp --acl private --sse aws:kms <(echo "<SECRET_VALUE>") "s3://${secrets_bucket}/secret-files/SPECIAL_SECRET"
118+
```
119+
103120
## Options
104121

105122
### `bucket`

0 commit comments

Comments
 (0)