Module which provide secure authentication by TOTP/SMS/Codes/Question. Login protected by IP ranges and with captcha, when login attempt will fail.
Demo installation:
$ sudo apt-get install -y virtualenvwrapper redis-server git python-dev || brew install pyenv-virtualenvwrapper redis git geoip
$ source /usr/share/virtualenvwrapper/virtualenvwrapper.sh || source /usr/local/bin/virtualenvwrapper.sh
$ mkvirtualenv django-secure-auth
$ workon django-secure-auth
$ git clone --depth 1 https://github.com/gotlium/django-secure-auth.git
$ cd django-secure-auth
$ pip install -r requirements.txt
$ python setup.py develop
$ cd demo
$ pip install -r requirements.txt
$ python manage.py syncdb --noinput
$ python manage.py migrate --noinput
$ python manage.py createsuperuser --username admin --email admin@local.host
$ wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
$ gunzip GeoLiteCity.dat.gz
$ mkdir -p /usr/share/geoip/; mv GeoLiteCity.dat /usr/share/geoip/
$ cd ../
Open settings:
$ vim demo/settings.py
Replace Twilio credentials in AUTH_SMS_BACKEND_AUTH to your demo account settings or change SMS_FORCE to False.
Run Redis server and Celery daemon(or remove ‘djcelery’ from INSTALLED_APPS):
$ make run_redis
$ make run_celery
Run test server:
$ make run_server
Now you can open https://127.0.0.1:8000/accounts/register/ and register new account and setup all available authentication methods.
Note: activation link will be output to console.
Crontab
When you are using TOTP auth method, please update your server time. If your server time is behind from real time, user cannot be authenticated by authenticator app. You can run ntpd clients, or update time on server by cron job:
SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
MAILTO=root@localhost
# Update time
0 */6 * * * ntpdate ntp.ubuntu.com >& /dev/null
Screenshots
Compatibility
Python: 2.7
Django: 1.4, 1.8, 1.11
Metadata
Release files for django-secure-auth 1.3.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| django-secure-auth-1.3.3.2.tar.gz | 52.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_secure_auth-1.3.3.2-py2-none-any.whl | Python 2 | none | any | Details |
Total release size: 162.4 kB
Release files / django-secure-auth-1.3.3.2.tar.gz
| Download URL | django-secure-auth-1.3.3.2.tar.gz |
|---|---|
| Size | 52.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
41f0532967b9d076ef5914a0833d098044278e7ed8d71bc40cc79cc8899fea6d
|
|
BLAKE2b-256 checksum How to use checksums |
8835141aec5f306e0e57e35a04b0f0f0045774313e89ee700920dede47a32005
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / django_secure_auth-1.3.3.2-py2-none-any.whl
| Download URL | django_secure_auth-1.3.3.2-py2-none-any.whl |
|---|---|
| Size | 110.1 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
e492dc9452d54df8427815dc22c7101d62ee995feb3af420f97ab5b350642a60
|
|
BLAKE2b-256 checksum How to use checksums |
8aa9d1b07662cd9a4743587a0b4bbbc146943d1b3a14fedb34715deadfd41391
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-secure-auth 1.3.3.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.