Track Authentication Attempts and Prevent Brute-force Attacks
Project description
Tracks Authentication Attempts and Prevents Brute-force Attacks
This module registers each request done by users trying to authenticate into Odoo. If the authentication fails, a counter is increased for the given remote IP. After a defined number of attempts, Odoo will ban the remote IP and ignore new requests. This module applies security through obscurity (https://en.wikipedia.org/wiki/Security_through_obscurity), When a user is banned, the request is now considered as an attack. So, the UI will not indicate to the user that his IP is banned and the regular message ‘Wrong login/password’ is displayed.
This module realizes a call to a web API (http://ip-api.com) to try to have extra information about remote IP.
Configuration
You can use these configuration parameters that control this addon behavior:
auth_brute_force.whitelist_remotes is a comma-separated list of whitelisted IPs. Failures from these remotes are ignored.
auth_brute_force.max_by_ip defaults to 50, and indicates the maximum successive failures allowed for an IP. After hitting the limit, the IP gets banned.
auth_brute_force.max_by_ip_user defaults to 10, and indicates the maximum successive failures allowed for any IP and user combination. After hitting the limit, that user and IP combination is banned.
Usage
Admin user have the possibility to unblock a banned IP.
Logging
This module generates some WARNING logs, in the following cases:
When the IP limit is reached: Authentication failed from remote ‘x.x.x.x’. The remote has been banned. Login tried: xxxx.
When the IP+user combination limit is reached: Authentication failed from remote ‘x.x.x.x’. The remote and login combination has been banned. Login tried: xxxx.
Screenshot
List of Attempts
For further information, please visit:
Known issues / Roadmap
Remove 🐒 patch for https://github.com/odoo/odoo/issues/24183 in v12.
Depending of server and / or user network configuration, the idenfication of the user can be wrong, and mainly in the following cases:
If the Odoo server is behind an Apache / NGinx proxy and it is not properly configured, all requests will use the same IP address. Blocking such IP could render Odoo unusable for all users! Make sure your logs output the correct IP for werkzeug traffic before installing this addon.
The IP metadata retrieval should use a better system. See details here.
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 smash it by providing detailed and welcomed feedback.
Credits
Contributors
Sylvain LE GAL (https://twitter.com/legalsylvain)
David Vidal <david.vidal@tecnativa.com>
Jairo Llopis <jairo.llopis@tecnativa.com>
Maintainer
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.
To contribute to this module, please visit https://odoo-community.org.
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 odoo10_addon_auth_brute_force-10.0.2.1.1-py2-none-any.whl
.
File metadata
- Download URL: odoo10_addon_auth_brute_force-10.0.2.1.1-py2-none-any.whl
- Upload date:
- Size: 143.2 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ce06e4956504563d88445eee59abcda9c25ded750c5d76762cb9e29a4da78f2 |
|
MD5 | ac37c40f63e5628c98d6c14e65e419eb |
|
BLAKE2b-256 | e8fc9a9f8827887e4244de7d964ba6a2d9e46afe8021fb73aaec53b82eb0d4a3 |