Luzifer / ots

One-Time-Secret sharing platform with a symmetric 256bit AES encryption in the browser
https://ots.fyi
Apache License 2.0
463 stars 68 forks source link

Create a way to not have (Redis) credentials in an environment variable #178

Closed fblz closed 5 months ago

fblz commented 5 months ago

Moved from #177:

Using environment variables for configuration does not provide a secure way to manage Redis credentials. I propose implementing a configuration file to prevent credentials from being accessible through the environment.

From Luzifer in #177:

Please elaborate. Environment variables are an issue for systems with shared access, files are too. Environment variables will fall when the system is compromized, files will too. Environment variables can be injected by a wrapping process, files cannot.

So how would the security increase by writing the redis credentials into a file on disk in opposite to taking environment variables from a security store?

I think the following holds some good arguments on why environment variables are sub optimal for secret storage: https://security.stackexchange.com/questions/197784/is-it-unsafe-to-use-environmental-variables-for-secret-data

My concerns here are mainly with credentials ending up in crush dumps or similar. I would prefer to pass the credentials at runtime via dedicated secrets management, but this is a bigger change.

Luzifer commented 5 months ago

Okay to take the post you linked:

So still, I don't see any argument against ENV vars and pro files which is effort to implement, a breaking change and does IMHO not improve security.