All Projects → justinmayer → kagi

justinmayer / kagi

Licence: BSD-2-Clause license
WebAuthn security keys and TOTP multi-factor authentication for Django

Programming Languages

python
139335 projects - #7 most used programming language
javascript
184084 projects - #8 most used programming language
HTML
75241 projects
shell
77523 projects

Projects that are alternatives of or similar to kagi

adfsmfa
MFA for ADFS 2022/2019/2016/2012r2
Stars: ✭ 86 (+405.88%)
Mutual labels:  totp, multi-factor-authentication, webauthn
Authelia
The Single Sign-On Multi-Factor portal for web apps
Stars: ✭ 11,094 (+65158.82%)
Mutual labels:  u2f, totp, 2fa
SimpleTOTP
A highly configurable yet simple to use TOTP based two-factor authentication processing module for SimpleSAMLphp.
Stars: ✭ 16 (-5.88%)
Mutual labels:  totp, multi-factor-authentication, 2fa
a12n-server
A ready-to-launch User and Authentication system for those that don't want to build it
Stars: ✭ 324 (+1805.88%)
Mutual labels:  totp, 2fa, webauthn
totp.js
Time-based One-time Password Algorithm By Javascript
Stars: ✭ 26 (+52.94%)
Mutual labels:  totp, 2fa
crotp
CrOTP - One Time Passwords for Crystal
Stars: ✭ 62 (+264.71%)
Mutual labels:  totp, 2fa
AspNetCoreBackChannelLogout
ASP.NET Core Back-Channel Logout for Hybrid Clients, Redis, Key Vault, Azure
Stars: ✭ 17 (+0%)
Mutual labels:  totp, 2fa
clarion
WebAuthn (U2F) helper for CLI operations (e.g. SSH Log in)
Stars: ✭ 78 (+358.82%)
Mutual labels:  u2f, webauthn
keymaster
Short term certificate based identity system (ssh/x509 ca + openidc)
Stars: ✭ 59 (+247.06%)
Mutual labels:  u2f, totp
otp-java
A small and easy-to-use one-time password generator library for Java according to RFC 4226 (HOTP) and RFC 6238 (TOTP).
Stars: ✭ 107 (+529.41%)
Mutual labels:  totp, 2fa
wp-webauthn
🔒 WP-WebAuthn allows you to safely login to your WordPress site without password.
Stars: ✭ 85 (+400%)
Mutual labels:  u2f, webauthn
Opensk
OpenSK is an open-source implementation for security keys written in Rust that supports both FIDO U2F and FIDO2 standards.
Stars: ✭ 2,114 (+12335.29%)
Mutual labels:  u2f, webauthn
Solo
Solo 1: open security key supporting FIDO2 & U2F over USB + NFC
Stars: ✭ 1,986 (+11582.35%)
Mutual labels:  u2f, webauthn
rci
🔢 better code inputs for react/web
Stars: ✭ 805 (+4635.29%)
Mutual labels:  totp, 2fa
crystal-two-factor-auth
Two Factor Authentication Crystal code implementing the Time-based One-time Password Algorithm
Stars: ✭ 24 (+41.18%)
Mutual labels:  totp, 2fa
2FAuth
A Web app to manage your Two-Factor Authentication (2FA) accounts and generate their security codes
Stars: ✭ 664 (+3805.88%)
Mutual labels:  totp, 2fa
apache 2fa
Apache two-factor (2FA) authentication with Google Authenticator based on Time-based One-Time Password (TOTP) or HMAC-based one-time password (HOTP) Algorithms.
Stars: ✭ 63 (+270.59%)
Mutual labels:  totp, 2fa
rx-otp
HMAC-based (HOTP) and Time-based (TOTP) One-Time Password manager. Works with Google Authenticator for Two-Factor Authentication.
Stars: ✭ 79 (+364.71%)
Mutual labels:  u2f, totp
awesome-yubikey
Curated list of awesome Yubikey resources, open source projects, tools and tutorials.
Stars: ✭ 22 (+29.41%)
Mutual labels:  u2f, webauthn
u2f-php
FIDO/FIDO2 Universal 2 Factors (U2F) support for PHP
Stars: ✭ 25 (+47.06%)
Mutual labels:  u2f, webauthn

Kagi

Code of Conduct Build Status Code Coverage Documentation Status PyPI Version

Kagi provides support for FIDO WebAuthn security keys and TOTP tokens in Django.

Kagi is a relatively young project and has not yet been fully battle-tested. Its use in a high-impact environment should be accompanied by a thorough understanding of how it works before relying on it.

Installation

python -m pip install kagi

Add kagi to INSTALLED_APPS and include kagi.urls somewhere in your URL patterns. Set: LOGIN_URL = "kagi:login"

Make sure that Django’s built-in login view does not have a urlpattern, because it will authenticate users without their second factor. Kagi provides its own login view to handle that.

Demo

To see a demo, use the test project included in this repository and perform the following steps (creating and activating a virtual environment first is optional).

First, install Poetry:

curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | python -

Clone the Kagi source code and switch to its directory:

git clone https://github.com/justinmayer/kagi.git && cd kagi

Install dependencies, run database migrations, create a user, and serve the demo:

poetry install
poetry shell
invoke migrate
python testproj/manage.py createsuperuser
invoke serve

You should now be able to see the demo project login page in your browser at: http://localhost:8000/kagi/login

Supported browsers and versions can be found here: https://caniuse.com/webauthn For domains other than localhost, WebAuthn requires that the site is served over a secure (HTTPS) connection.

Since you haven’t added any security keys yet, you will be logged in with just a username and password. Once logged in and on the multi-factor settings page, choose “Manage WebAuthn keys” and then “Add another key” and follow the provided instructions. Once WebAuthn and/or TOTP has been successfully configured, your account will be protected by multi-factor authentication, and when you log in the next time, your WebAuthn key or TOTP token will be required.

You can manage the keys attached to your account on the key management page at: http://localhost:8000/kagi/keys

Using WebAuthn Keys on Linux

Some distros don’t come with udev rules to make USB HID /dev/ nodes accessible to normal users. If your key doesn’t light up and start flashing when you expect it to, this might be what is happening. See Yubico/libu2f-host#2 and https://github.com/Yubico/libu2f-host/blob/master/70-u2f.rules for some discussion of the rule to make it accessible. If you just want a quick temporary fix, you can run sudo chmod 666 /dev/hidraw* every time after you plug in your key (the files disappear after unplugging).

Gratitude

This project would not exist without the significant contributions made by Rémy HUBSCHER.

Thanks to Gavin Wahl for django-u2f, which served as useful initial scaffolding for this project.

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].