django-encrypted-fields | Django Model Field classes that are encrypted using Keyczar | REST library
kandi X-RAY | django-encrypted-fields Summary
kandi X-RAY | django-encrypted-fields Summary
This is a collection of Django Model Field classes that are encrypted using Keyczar. Keyczar is a crypto library that exposes a simple API by letting the user set things like the algorithm and key size right in the keyfile. It also provides for things like expiring old keys and cycling in new ones. Create a basic keyczar keyset. AES-256 in this case. Use your model as normal and your data will be encrypted in the database. Warning: Once the data is encrypted, it can no longer to used to query or sort. In SQL, these will all look like text fields with random noise in them (which is what you want). Currently build in and unit-tested fields. They have the same APIs as their non-encrypted counterparts. Making new fields is easy! Django Encrypted Fields uses a handy mixin to make upgrading pre-existing fields quite easy. Please report an issues you encounter when trying this, since I've only tested it with the fields above.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Get database value
- Encrypt the value
- Get the cookiepter
- Convert database value to python value
- Decrypt the value
django-encrypted-fields Key Features
django-encrypted-fields Examples and Code Snippets
Community Discussions
Trending Discussions on django-encrypted-fields
QUESTION
I'm working on a Django project where one of my models has a field that needs to be encrypted. I'm using django-encrypted-fields for the EncryptedCharField for my model.
As part of the setup, I have to create some keys for encryption. Since I'm working on my local machine, but will be deploying on AWS (both using the same remote database), I'm wondering if the fieldkeys directory, which contains the keys, should be included in my .gitignore file, or if all machines should use the same keys.
Thanks.
...ANSWER
Answered 2018-Aug-03 at 16:35I'm wondering if the fieldkeys directory, which contains the keys, should be included in my
.gitignore
file,
Ideally no, in that those files should not be in the Git repo folder in the first place (so no need to add them to a .gitignore file).
Having them inside a Git repo is too dangerous. Even ignored, they can still be added with a git add -f
Or if all machines should use the same keys.
No either: the best practice remains to have a dedicated key by environment, which makes a key revocation easy and won't break all the other environments.
You need to have a way to reference your key (stored separately outside of the git repo).
Semi-related: "New AWS Encryption SDK for Python Simplifies Multiple Master Key Encryption".
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install django-encrypted-fields
You can use django-encrypted-fields like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page