defrex / django-encrypted-fields

This is a collection of Django Model Field classes that are encrypted using Keyczar.
MIT License
193 stars 60 forks source link

Way to store key in settings file #32

Open samlobel opened 6 years ago

samlobel commented 6 years ago

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.

iMerica commented 6 years ago

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