Skip to main content

Yubikey Support for the Django Admin.

Project description

# django-yubikey-admin

This library enable two-factor authentication in the django-admin. It does that by adding an extra field to the default login page, for the yubikey OTP. Currently this supports stock django and [django-grappelli](https://github.com/sehmaschine/django-grappelli)

## Setup

  • pip install django-yubikey-admin

  • Add ‘django_yubikey_admin’ to your INSTALLED_APPS

  • Add django_yubikey_admin.auth_backends.YubikeyAuth to your AUTHENTICATION BACKENDS like the example below.

    AUTHENTICATION_BACKENDS = (‘django_yubikey_admin.auth_backends.YubikeyAuth’, )

  • Set your YUBIKEY_CLIENT_ID (if you don’t have one registered, it’s 16)

  • Set your YUBIKEY_SECRET_KEY if applicable

### Authentication Options

By default, this library validates your yubikey against the yubico servers. If you’d like to maintain a local store of valid yubikeys, ensuring that a user can only log in if their yubikey is known, then set the option below.

  • DJANGO_ADMIN_YUBIKEY_CACHE = True

### How It Works

This library implements a custom authentication backend. The login form itself supports an extra OTP field, for yubikeys. After user authentication completes, the yubikey authentication takes place. If it passes, access to the django admin is granted, failing that - it fails.

## Building

### Core * Python 2.6+ or Python 3.3+ * Django 1.7+ * [yubico-client](https://github.com/Kami/python-yubico-client)

License: MIT

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-yubikey-admin-0.5.1.tar.gz (3.6 kB view details)

Uploaded Source

File details

Details for the file django-yubikey-admin-0.5.1.tar.gz.

File metadata

File hashes

Hashes for django-yubikey-admin-0.5.1.tar.gz
Algorithm Hash digest
SHA256 a26d7e6d2f862a114a55ac9527e3bb6f582801e31b4538934e33cad950030d97
MD5 3ab7c027ef2031b9448dce1c54ec8b2a
BLAKE2b-256 9ce37c895aa9683f973d0f40349bf36a7f42b09f8433917c30d4906d01cb3ee6

See more details on using hashes here.

Supported by

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