django-encrypted-fields icon indicating copy to clipboard operation
django-encrypted-fields copied to clipboard

Way to store key in settings file

Open samlobel opened this issue 6 years ago • 1 comments

I think it would be nice for ease-of-use to have a key available as a settings-variable. Maybe the SECRET_KEY could be the default encrypter, but you could also have an ENCRYPTION_KEY variable as well.

That would be helpful for deployment, because you could then load these keys through environment variables. I'd rather not check my keys into version control, and deploying to something like AWS lambda is tough when it relies on your filesystem.

Less of an issue and more of a feature request. It goes without saying, but it's a great library.

samlobel avatar Feb 27 '18 15:02 samlobel

Using a filesystem makes django-encrypted-fields unusable in platforms like Heroku where file system access is not possible.

Please consider using an environment variable instead. It's the standard way of handling this kind of thing in Django and web-apps in general these days.

More info: https://12factor.net/config

iMerica avatar Apr 11 '18 20:04 iMerica