3 ms·
It's a really tiny thing, but Faraday uses https://github.com/faradayio/credentials_to_env https://github.com/faradayio/credentials_to_env to download secure cr
by ekidd 11y ago
It's a really tiny thing, but Faraday uses https://github.com/faradayio/credentials_to_env https://github.com/faradayio/credentials_to_env to download secure credentials from a Vault server, and write them to environment variables or files. Alternatively, you can just pass in environment variables manually and ignore Vault (for testing, etc.). This acts as glue for existing programs that don't know about Vault. This is actual production code, even if it's really minor.
The goal here was a single binary that would work on most modern Linux distributions, and which could make some HTTP calls and then exec another program, typically all from inside a Docker container.
Rust was a bit overkill for this, but we already had a couple of the necessary libraries available from in-house experiments, and it was fun to write. The two best features of Rust for this project were: (1) If the program compiled, there was a 95+% chance it would work flawlessly on the first try, and (2) Cargo was really just lovely all around.