Skip to main content

Store user secrets encrypted into database.

Project description

Store user secrets encrypted into database.

Current project state: “Pre-Alpha”

Licence: GPL v3 or above

the idea

Store a user’s secrets in the database encrypted with his password.

Only the user can decrypt the stored data. His password is used for encryption and decryption. This password is only transmitted in plain text when logging in (Django itself only saves a salted hash of the password).

The intermediate-user-secret is decrypted and stored with the clear text password in RAM after successful login. All user secrets will be encrypted and decrypted with his intermediate-user-secret.

Limitations and/or facts:

  • Only the same user can decrypt his own data.

  • The decrypted data can only be used during an active session.

  • A intermediate-user-secret is used, so that a password can be changed without losing the encrypted data.

DEMO

Prepare: install poetry e.g.:

~$ sudo apt install python3-pip
~$ pip3 install -U pip --user
~$ pip3 install -U poerty --user

Clone the sources, e.g.:

~$ git clone https://github.com/jedie/django-user-secrets.git
~$ cd django-user-secrets

# install via poetry:
~/django-user-secrets$ poetry install

# Start Django dev. server:
~/django-user-secrets$ poetry run dev_server

You can also use our Makefile, e.g.:

~/django-user-secrets$ make help
help                 List all commands
install-poetry       install or update poetry
install              install django-user-secrets via poetry
update               update the sources and installation
lint                 Run code formatters and linter
fix-code-style       Fix code formatting
tox-listenvs         List all tox test environments
tox                  Run pytest via tox with all environments
tox-py36             Run pytest via tox with *python v3.6*
tox-py37             Run pytest via tox with *python v3.7*
tox-py38             Run pytest via tox with *python v3.8*
pytest               Run pytest
update-rst-readme    update README.rst from README.creole
publish              Release new version to PyPi
start-dev-server     Start Django dev. server with the test project

history


Note: this file is generated from README.creole 2020-07-04 18:52:44 with "python-creole"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-user-secrets-0.1.0.tar.gz (18.4 kB view details)

Uploaded Source

Built Distribution

django_user_secrets-0.1.0-py3-none-any.whl (26.5 kB view details)

Uploaded Python 3

File details

Details for the file django-user-secrets-0.1.0.tar.gz.

File metadata

  • Download URL: django-user-secrets-0.1.0.tar.gz
  • Upload date:
  • Size: 18.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.6.9

File hashes

Hashes for django-user-secrets-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1f5e4a6fb1f272d9c595ab34382287b14be4f7584ca52b5cafdcf292e0b74f89
MD5 2856574ca76d64fcf431ed8d7ddd5a4d
BLAKE2b-256 0e2d5403ec5a7c3463009963d4c003dc316c6a9a90a56ef079a4838ad22ed28f

See more details on using hashes here.

File details

Details for the file django_user_secrets-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: django_user_secrets-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 26.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.6.9

File hashes

Hashes for django_user_secrets-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4dde8a5a2fccf0aa2e16df74d3db2b2327c8b9b03d76c683406b7ae26d140c8f
MD5 5d34ddcd95f018f1a1f45b3dce24428b
BLAKE2b-256 4f650584d5f036a20f95462159d4222f09856c208c1050aab5f8dc97965572b9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page