-
-
Notifications
You must be signed in to change notification settings - Fork 318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why read_env reads everything to os.environ? #66
Comments
The main reason is that this package helps you to interact with An evolution of this package can support it, loading values from a cascade list of sources, producing different environments replacing the use of Why do you call suspicious a simple wrapper for |
@joke2k thank you for explanation. It looked suspicious at first because Saving everything to Using From what I understand, currently there is no direct use of |
There is only one case in which django-environ put some data into I don't know if there are more secure way to pass some data to django settings, but i read a lot of articles that use environment variables to do that, including all the cloud hosting mazinga providers like Amazon or Heroku. Also reading the 12factor.net/config:
|
Sure, environment variables are really convenient way to pass configuration options between processes. But once configuration value gets into a process, then inside process itself there is no need to expose them as environment variables, unless you need it for some reason. My point is, that it is really good to be able to override configuration values with environment variables, but not store everything from If you keep everything in So if I put a secret in Anyway, I'm not security expert, just have a suspicion, that using |
The security is a myth 😄 I've checked all my servers to see permissions of Anyway, Thank you for questions. |
It looks quite suspicious that everything is read into global variable
environ.Env.ENVIRON
and even worse,environ.Env.ENVIRON
points toos.eviron
.For global variables, if I will instantiate
environ.Env
two times, I would expect to get two independent environments, but currently, I will have two class instances operating on same global environment.Is there a good reason for this?
The text was updated successfully, but these errors were encountered: