Allows users to enable MFA and add optional trusted devices
Project description
This module adds support for MFA using TOTP (time-based, one-time passwords). It allows users to enable/disable MFA and manage authentication apps/devices via the “Change My Preferences” view and an associated wizard.
After logging in normally, users with MFA enabled are taken to a second screen where they have to enter a password generated by one of their authentication apps and are presented with the option to remember the current device. This creates a secure, HTTP-only cookie that allows subsequent logins to bypass the MFA step.
Table of contents
Installation
Install the PyOTP library using pip: pip install pyotp
Follow the standard module install process
Configuration
By default, the trusted device cookies introduced by this module have a Secure flag. This decreases the likelihood of cookie theft via eavesdropping but may result in cookies not being set by certain browsers unless your Odoo instance uses HTTPS. If necessary, you can disable this flag by going to Settings > Parameters > System Parameters and changing the auth_totp.secure_cookie key to 0.
Usage
If necessary, a user’s trusted devices can be revoked by disabling and re-enabling MFA for that user.
Known issues / Roadmap
External calls to the Odoo XML-RPC API are blocked for users who enable MFA since there is currently no way to perform MFA authentication as part of this process. However, due to the way that Odoo handles authentication caching, multi-threaded or multi-process servers will need to be restarted before the block can take effect for users who have just enabled MFA.
Make the lifetime of the trusted device cookie configurable rather than fixed at 30 days
Add device fingerprinting to the trusted device cookie
Add company-level settings for forcing all users to enable MFA and disabling the trusted device option
Monkey patch 1 is not needed anymore in Werkzeug==0.13 or upper
Monkey patch 2 will work until werkzeug.contrib gets removed.
Bug Tracker
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback.
Do not contact contributors directly about support or help with technical issues.
Credits
Contributors
Oleg Bulkin <obulkin@laslabs.com>
Maintainers
This module is maintained by the OCA.
OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.
This module is part of the OCA/server-auth project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
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 Distributions
Built Distribution
File details
Details for the file odoo12_addon_auth_totp-12.0.1.1.0-py3-none-any.whl
.
File metadata
- Download URL: odoo12_addon_auth_totp-12.0.1.1.0-py3-none-any.whl
- Upload date:
- Size: 190.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 293acfc366081cef8fd97d7d91003126ca3ded42de7acbce0e59621c1bab1c9f |
|
MD5 | 846fe62006e39c136bac1dd886195c2c |
|
BLAKE2b-256 | 3cadb4bc9eec15bdf76a1dc72666082d9b5d368bd7f17e4a89858a7b5a704ca7 |