Don't use ENV variables for secret data (2017)
diogomonica.com
Don't use ENV variables for secret data (2017)
1–10 of 147 posts
Re: Don't use ENV variables for secret data (2017)
#2Re: Don't use ENV variables for secret data (2017)
#3Re: Don't use ENV variables for secret data (2017)
#4Every production product I’ve ever worked on, the entire team put database credentials in the environment variables.
Re: Don't use ENV variables for secret data (2017)
#5Re: Don't use ENV variables for secret data (2017)
#6Every production product I’ve ever worked on, the entire team put database credentials in the environment variables.
It's way better than hard coding them into the code.
Also, as an aside: The very premise of plaintext credentials for computer-computer database connections always seemed strange to me. Maybe I'm just not knowledgeable enough here, but I wish the standard for database credentials was key-based.
Re: Don't use ENV variables for secret data (2017)
#7In my experience, if you prevent using envs for secrets (as docker swarm does) all you get is a disgruntled programmer reading the contents of a secret file to an env in the entrypoint.
Re: Don't use ENV variables for secret data (2017)
#8Re: Don't use ENV variables for secret data (2017)
#9Re: Don't use ENV variables for secret data (2017)
#10Earlier quoted context omitted.
It's way better than hard coding them into the code.
Why is that? Also, as an aside: The very premise of plaintext credentials for computer-computer database connections always seemed strange to me. Maybe I'm just not knowledgeable enough here, but I wish the standard for database credentials was key-based.
You don't want to accidentally commit your credentials to github and have the world see them. At least if they're in ENV they stay private as long as your environment does.