https://github.com/131/vvauth
Vault credential helper
https://github.com/131/vvauth
Last synced: 3 months ago
JSON representation
Vault credential helper
- Host: GitHub
- URL: https://github.com/131/vvauth
- Owner: 131
- Created: 2025-02-27T22:08:30.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-03-19T22:41:14.000Z (about 1 year ago)
- Last Synced: 2025-03-28T05:33:24.108Z (about 1 year ago)
- Language: JavaScript
- Size: 41 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Vault Creds manager
This projects helps you log yourself in a HCL vault and retrieve VAULT_TOKEN through different auth methods
* jwt login
* ssh (with agent) login
# Vauth configuration
## Vauth configuration file location
vauth configuration file lies on a `.vauthrc` file (this name can be controlled by the VAUTHRC env var).
vauth will try to find
* if specified, the VAUTHRC file
* fallback to a .vauthrc file in the current directory
* fallback to a .vauthrc file in the current user home directory
## Vauth configuration format
vauth configuration file is a simple yaml file with a specific macro expansion syntax for dynamic parts.
The configuration file should abide the following schema
### configuration macro expansion set
* $${profile.XXX} expand to vault entity metadata/custom_metadata vars
* $${env.XXX} expand to local environement vars
* $${secrets.XXX} expand to remote scrapped secrets (see the env.paths)
```
# vauth URL
vault_addr: https://vauth.myserver.org
# for vauth-auth-plugin-ssh, configure the binding role here
ssh_auth:
role: $${env.VAUTH_USER_LOGIN}
env:
map:
TF_HTTP_USERNAME: $${profile.VAUTH_USER_LOGIN}
TF_HTTP_PASSWORD: $${profile.GITLAB_API_TOKEN}
AWS_ACCESS_KEY_ID: $${secrets.AWS_ACCESS_KEY_ID}
AWS_SECRET_ACCESS_KEY: $${secrets.AWS_SECRET_ACCESS_KEY}
# remote secrets mecanism
# set the secrets mount point - default to secrets
[path: secrets]
# list extra secrets to be reached and populated into the $${secrets.XXX} macro
paths:
- /some/pa4-backend.creds
```
# Credits
* [Francois Leurent](https://github.com/131)