-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Load Vault token from file #72
Comments
Glad you're enjoying We currently do support loading config from files in the Does that suit your needs? Or would you need more flexibility? E.g. like being able to specify where to search for these files or something else |
Ah, of course. I hadn't considered that I could specify the token in the config file. I can then specify a custom path for my docker secret containing the env file. Thanks - problem solved! |
Actually, having just tried this it does work but makes the docker-compose file a little messy. So, yes please, to keep things consistent it would be great to be able to specify |
Could you post a minimal example of the docker compose file so we can get a feel for the problem? |
Yes certainly, thanks. I'm putting my services:
app:
image: 'my-app'
secrets:
- source: vault_config
target: /etc/vaultenv.conf
- vault_secrets
entrypoint:
- vaultenv
- docker-entrypoint.sh
secrets:
vault_config:
external: true
vault_secrets:
external: true My proposal, above, would mean I could use the default Docker secret mount as the location of the config file by setting the services:
app:
image: 'my-app'
secrets:
- vault_config
- vault_secrets
entrypoint:
- vaultenv
- docker-entrypoint.sh
secrets:
vault_config:
external: true
vault_secrets:
external: true |
One of the things we currently do is allow cascading behavior of these config files. That fact isn't documented too well in the current README, but
This cascading behavior is very useful for machines which have multiple users/projects. I don't want to drop that, so we'd need to choose how this extra customization interacts with the current behavior. Instead of This means that the defaults would be equivalent to these invocations:
We could keep the current behavior as a default and allow users to override the current behavior by passing in custom |
Yes, that sounds good, thanks @duijf. It's similar to the |
Do you mind if we keep this open for the time being until #75 is revisited? I'm still really keen for this one, thanks so much 🙏 |
Vaultenv is a fantastic tool and has really helped my organisation simplify our developer workflow. One additional feature that I’d love is the ability to load the Vault token from a file.
We currently use Docker and distribute the token to our swarm nodes via the
VAULT_TOKEN
environment variable. The problem is that if an unauthorised user gained access to a node they could simple dodocker inspect
to retrieve the token.If Vaultenv could load the token from a file, e.g. via a path specified with the
VAULTENV_TOKEN_FILE
environment variable, we could then use Docker Secrets to distribute the token to the node, which would be more secure.The text was updated successfully, but these errors were encountered: