Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jsok/docker-credential-vault
Docker credential helper to store credentials in HashiCorp Vault
https://github.com/jsok/docker-credential-vault
credentials-helper docker vault
Last synced: about 2 months ago
JSON representation
Docker credential helper to store credentials in HashiCorp Vault
- Host: GitHub
- URL: https://github.com/jsok/docker-credential-vault
- Owner: jsok
- Created: 2019-07-30T06:54:40.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-07-31T00:36:12.000Z (over 5 years ago)
- Last Synced: 2024-10-16T00:31:45.501Z (3 months ago)
- Topics: credentials-helper, docker, vault
- Language: Go
- Size: 11.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# docker-credential-vault
A [Docker credential helper](https://github.com/docker/docker-credential-helpers) to store credentials in [HashiCorp Vault](https://vaultproject.io).
## Usage
1. In your docker config (`~/.docker/config.json` typically), set:
```json
{
"credsStore": "vault"
}
```1. Ensure `docker-credential-vault` is in your `$PATH`.
1. Decide which Vault KV backend (both v1 and v2 are supported) and the path t
1. `export DOCKER_CREDENTIAL_VAULT_KV_PATH=secret/path/to/use`: This is a KV backend (both v1 and v2 are supported) path where the helper will store and look for credentials.
1. Configure how the helper will connect to vault, all the standard `$VAULT_` environment variables will be used to configured the vault client, e.g. `$VAULT_ADDR` and `$VAULT_TOKEN` will be required at a minimum.## Internals
The helper will store the credentials in the following format, e.g. server URL is `https://example.com:8080`:
`vault kv get -format=json $DOCKER_CREDENTIAL_VAULT_KV_PATH/example.com` will return:
```json
{
"request_id": "89ec7fd0-be41-2e85-7c79-1b16199a3d7b",
"lease_id": "",
"lease_duration": 0,
"renewable": false,
"data": {
"data": {
"Secret": "s3cr3t",
"ServerURL": "https://example.com",
"Username": "docker"
},
"metadata": {"redacted": "metadata"}
},
"warnings": null
}
```