All Projects → labd → wagtail-2fa

labd / wagtail-2fa

Licence: MIT license
2 Factor Authentication for Wagtail

Programming Languages

python
139335 projects - #7 most used programming language
HTML
75241 projects
Makefile
30231 projects

Projects that are alternatives of or similar to wagtail-2fa

yoti-php-sdk
The PHP SDK for interacting with the Yoti Platform
Stars: ✭ 22 (-65.08%)
Mutual labels:  2fa
wagtailyoast
Wagtail + Yoast
Stars: ✭ 22 (-65.08%)
Mutual labels:  wagtail
duo go
An implementation of the Duo Security Web SDK in Go/Golang.
Stars: ✭ 12 (-80.95%)
Mutual labels:  2fa
authy-extractor
Extract 2FA tokens from Authy.
Stars: ✭ 30 (-52.38%)
Mutual labels:  2fa
shibboleth-mfa-u2f-auth
U2F multifactor authentication plugin for Shibboleth IdPv3
Stars: ✭ 25 (-60.32%)
Mutual labels:  2fa
framework
A stylish PHP application framework crafted using Slim, Twig, Eloquent and Sentinel designed to get you from clone to production in a matter of minutes.
Stars: ✭ 56 (-11.11%)
Mutual labels:  2fa
wagtailcolumnblocks
Streamfield columns for Wagtail
Stars: ✭ 38 (-39.68%)
Mutual labels:  wagtail
wagtail-metadata-mixin
🔍 OpenGraph, Twitter Card and Schema.org snippet tags for Wagtail CMS pages
Stars: ✭ 42 (-33.33%)
Mutual labels:  wagtail
kagi
WebAuthn security keys and TOTP multi-factor authentication for Django
Stars: ✭ 17 (-73.02%)
Mutual labels:  2fa
wagtail-color-panel
A package that adds new panels for selecting colors, works both on regular page fields and stream field.
Stars: ✭ 29 (-53.97%)
Mutual labels:  wagtail
tfa
tfa is a 2fa cli tool that aims to help you to generate 2fa code on CI/CD pipelines.
Stars: ✭ 25 (-60.32%)
Mutual labels:  2fa
wagtail-pg-search-backend
PostgreSQL full text search backend for Wagtail CMS
Stars: ✭ 22 (-65.08%)
Mutual labels:  wagtail
wagtail-inventory
Search Wagtail pages by the StreamField blocks they contain
Stars: ✭ 45 (-28.57%)
Mutual labels:  wagtail
pari
Django/Wagtail based PARI webapp
Stars: ✭ 32 (-49.21%)
Mutual labels:  wagtail
BoringAuth
Straightforward password, passphrase, TOTP, and HOTP user authentication
Stars: ✭ 49 (-22.22%)
Mutual labels:  2fa
Django-wagtailmedium
A Medium Editor integration for the Wagtail CMS.
Stars: ✭ 17 (-73.02%)
Mutual labels:  wagtail
wagtail textract
Text extraction for Wagtail document search
Stars: ✭ 27 (-57.14%)
Mutual labels:  wagtail
wagtail-treemodeladmin
An extension for Wagtail's ModelAdmin for a page explorer-like navigation of Django model relationships
Stars: ✭ 31 (-50.79%)
Mutual labels:  wagtail
AuthPress
Add 2-factor authentication to your WordPress blog site.
Stars: ✭ 16 (-74.6%)
Mutual labels:  2fa
pipeline
The Polytechnic's content management system
Stars: ✭ 17 (-73.02%)
Mutual labels:  wagtail
http://codecov.io/github/labd/wagtail-2fa/coverage.svg?branch=master https://readthedocs.org/projects/wagtail-2fa/badge/?version=stable https://img.shields.io/github/stars/labd/wagtail-2fa.svg?style=social&logo=github

wagtail-2fa

This Django app adds two factor authentication to Wagtail. Behind the scenes it use django-otp which supports Time-based One-Time Passwords (TOTP). This allows you to use various apps like Authy, Google Authenticator, or 1Password.

Installation

pip install wagtail-2fa

Then add the following lines to the INSTALLED_APPS list in your Django settings:

INSTALLED_APPS = [
    # ...
    'wagtail_2fa',
    'django_otp',
    'django_otp.plugins.otp_totp',
    # ...
]

Next add the required middleware to the MIDDLEWARE. It should come after the AuthenticationMiddleware:

MIDDLEWARE = [
    # .. other middleware
    # 'django.contrib.auth.middleware.AuthenticationMiddleware',

    'wagtail_2fa.middleware.VerifyUserMiddleware',

    # 'wagtail.core.middleware.SiteMiddleware',
    # .. other middleware
]

Migrate your database:

python manage.py migrate

Settings

The following settings are available (Set via your Django settings):

  • WAGTAIL_2FA_REQUIRED (default False): When set to True all staff, superuser and other users with access to the Wagtail Admin site are forced to login using two factor authentication.
  • WAGTAIL_2FA_OTP_TOTP_NAME (default: False): The issuer name to identify which site is which in your authenticator app. If not set and WAGTAIL_SITE_NAME is defined it uses this. sets OTP_TOTP_ISSUER under the hood.

Making 2FA optional

With the default VerifyUserMiddleware middleware, 2FA is enabled for every user. To make 2FA optional, use the VerifyUserPermissionsMiddleware middleware instead.

To do so, use the VerifyUserPermissionsMiddleware middleware instead of the VerifyUserMiddleware in your Django settings:

MIDDLEWARE = [
    # ...
    # 'wagtail_2fa.middleware.VerifyUserMiddleware',
    'wagtail_2fa.middleware.VerifyUserPermissionsMiddleware',
    # ...
]

When this middleware is used, a checkbox is added to the group permissions and 2FA can be enabled or disabled per group.

2FA is always enabled for superusers, regardless of the middleware used.

Sandbox

First create a new virtualenv with Python 3.8 and activate it. Then run the following commands:

make sandbox

You can then visit http://localhost:8000/admin/ and login with the following credentials:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].