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 hashes)

Uploaded Source

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