georgemarshall / django-cryptography

Easily encrypt data in Django

Home Page:https://django-cryptography.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Decryption of Encrypted Fields with Django Project hosted on Heroku

anatolzak opened this issue · comments

Hi there!

I am new to django-cryptography and have read the documentation and was wondering about the following question:

Before I migrate my data, I want to make sure everything would work as expected. I am hosting my project on Heroku. I know that Heroku rotates the servers and rotates the server on every rebuild as well. I don't know enough about how this library works behind the scenes to understand whether the following could happen or not so I am sorry for my uninformed question. Will the new servers that Heroku attaches to my project still be able to decrypt the encrypted fields?

I have noticed that when I access my data through the Django admin site but not on the same machine I migrated dummy data to be encrypted, that it says <memory at 0x0x0x0x0x0x>. Just from curiosity and intrest, would you encrypt large amounts of data with this library or would that be not the ideal case?

Thanks so much in advance!

It uses the SECRET_KEY Django's settings variable. So, as long as you don't change it things should keep working. Considering it was set using a environment variable, you can find it in your app's dashboard > Settings > Config Vars.