News for hackers. Stuff that matters.
Re:Learning from a Year of Security Breaches by tptacek on Tuesday December 20, 2016 @06:10PM (#13225210)
If your code adopts a convention of reading secrets from the environment, you get a lot of flexibility in how they're actually stored; you can put them in protected files and export the contents of the file before running the service, or you can have a tool that works like "env" that populates from a secret store. Your secret storage system can get more sophisticated without your code having to change.

I wouldn't recommend putting them in /etc/environment or /etc/profile or /home/service/.profile where you'll forget about them, though.

Just as a strategy for passing secrets to code, I like the environment a lot.

Re:Learning from a Year of Security Breaches by andrewflnr on Tuesday December 20, 2016 @10:03PM (#13226504)
Article and discussion re storing secrets in environment variables: https://news.ycombinator.com/item?id=8826024

The gist seems to be that it's easy to accidentally leak environment variables (which is why I think the top comment is off-base). tptacek, do you think this risk is overblown?

Re:Learning from a Year of Security Breaches by tptacek on Tuesday December 20, 2016 @11:26PM (#13226787)
It's good to be aware of the fact that environments are inherited by child processes (as are file descriptors), but I don't think that's a good reason to avoid using the environment.