Django application for FIDO protocol
Project description
django-fido
Django application for FIDO protocol
Django-fido provides basic components for FIDO 2 authentication - model to store user's FIDO 2 authenticator data and basic views.
Table of Contents
Dependencies
- Python 3.5 and higher
- Django >= 1.11
Configuration
-
Add
django_fido
toINSTALLED_APPS
. -
Add
django_fido.backends.Fido2AuthenticationBackend
toAUTHENTICATION_BACKENDS
. -
Link django-fido URLs into your
urls.py
:urlpatterns += [ url(r'', include('django_fido.urls')), ]
-
If you wish, set string variable
DJANGO_FIDO_RP_NAME
.
One step authentication
You can also decide to use one step authentication. In this case, you will use just one authentication form, that will collect username, password and FIDO2 credentials. In addition to the configuration above, you also need to:
- Set
DJANGO_FIDO_TWO_STEP_AUTH
toFalse
. - Replace
django_fido.backends.Fido2AuthenticationBackend
withdjango_fido.backends.Fido2GeneralAuthenticationBackend
inAUTHENTICATION_BACKENDS
. - Set
DJANGO_FIDO_AUTHENTICATION_BACKENDS
to the list of your additional authentication backends, if you use others thandjango.contrib.auth.backends.ModelBackend
. - Set
data-autosubmit-off
attribute on the form element of your login page.
Please note that your login form must have a field named username
, even if your USERNAME_FIELD
is not username
.
Changes
See changelog.
Testing
Use tox
to run tests
tox
License
See LICENSE.
Changelog
0.19
- Added class attribute
attestation_types
toFido2ViewMixin
to specify allowed attestation types during registration. - Set default value of setting
DJANGO_FIDO_AUTHENTICATION_BACKENDS
to list containingdjango.contrib.auth.backends.ModelBackend
0.18
- Fix issue caused by default value of
DJANGO_FIDO_AUTHENTICATION_BACKENDS
. It is now empty list.
0.17
- BREAKING Replace
Fido2ModelAuthenticationBackend
with more generalFido2GeneralAuthenticationBackend
.
0.16
- BREAKING Authenticator
label
has to be unique for user. This can potentialy break if you have multiple tokens for user. - Add authenticator admin.
- Add one step authentication.
0.15
- Add
DJANGO_FIDO_RP_NAME
setting. - Add back autosubmit on login view.
- Display error in login view on server request error.
0.14
- Add label to Authenticator model.
- Remove autosubmit on registration view.
- Update JS dependencies.
0.13
- Support fido2 0.6-0.8.
- Add support for python 3.8.
- Fixup annotations.
0.12
- Fix dependencies (add webpack-cli).
0.11
- Fix webpack output path.
0.10
- Fix dependencies (add webpack).
0.9
- Refactor JS code.
- Update setup.
- Add bumpversion.
0.8
- Fix JS translation lazynes.
- For empty values, submit button reload page.
0.7
- Add credential ID field.
- Drop
credential_data
field. - Update error messages.
- Mark django-fido as typed.
- Add JS hooks.
0.6
- Use FIDO 2 instead of U2F.
- Drop python 2.7.
- Add annotations and mypy check.
- Move repository to a CZ.NIC account.
0.5
- Fix JS translation lazynes
0.4
- Update JS messages.
- Drop unused
polint
environment in tox.
0.3
- Store attestation certificate in database #6
- Install package data #7
0.2
- Accept any arguments in
BaseU2fRequestView.get
- Add czech translations
- Fix links in README
0.1
- Initial version
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django-fido-0.19.tar.gz
.
File metadata
- Download URL: django-fido-0.19.tar.gz
- Upload date:
- Size: 322.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cef137b04ab33ad8572d330d9b5bdb5b58e140c8870957b2d8ee76e5eac4cc7f |
|
MD5 | 70a000419225eac2f236f53d69fdf8c7 |
|
BLAKE2b-256 | b0a12552e4651c1c49ef8cc92a1dcc607fe86701e2e823b1dec79fa1b057f4e0 |
File details
Details for the file django_fido-0.19-py3-none-any.whl
.
File metadata
- Download URL: django_fido-0.19-py3-none-any.whl
- Upload date:
- Size: 401.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 238b101947ac337a3f8ce7e692ca495284b49e06429c261f878131b8341f633b |
|
MD5 | 7b569edb94aecd63b297e131fc8f959d |
|
BLAKE2b-256 | fa5c6158e11f7a72effe0e1e9e45dbbaf7db4ef748fdb100863466929caf2c85 |