cruise-automation / daytona

A Vault client, but for containers and servers.
Apache License 2.0
310 stars 33 forks source link

Feature Request: Copy secrets directory structure to disk #45

Open karlkfi opened 4 years ago

karlkfi commented 4 years ago

I would like to be able to define a secret or directory of secrets and have them written to disk in a hierarchy that matches the secret path hierarchy.

The obvious exception is for secrets that have both data and act as a directory, but i feel like those should be treated as exceptional and ignored unless specified explicitly.

Example: VAULT_SECRET_PATH could point to a directory like secrets/application/projectx/envy/componentz and then DAYTONA_SECRET_PATH could point to a filesystem path like /home/vault/componentz. Then every secret in the secret path could be copied to a file in the filesystem path, recrusively. Secrets that are both directory and contain data could just be treated as a directory when written to the filesystem, requiring explicit secret/destination extraction, if desired.

This would make it just two env vars to extract a whole hierarchy of secrets, instead of requiring them all to be extracted with explicit secret and destination vars.