Skip to content

Conversation

@legalsylvain
Copy link
Contributor

Add a module to limit brut force attack on authentication.
Define an ir.config_parameter that mentions max attempts.
Once this maximum reached, the remote user will be blocked. (by IP).

See readme file for the whole description.

Thanks for your review.

screenshot_attempts_list

@pedrobaeza
Copy link
Member

Very interesting module. I think the name can be shorten to auth_brute_force, because we don't need to put the full title on the name 😉

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/Brut Force/Brut-force attacks

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does that call delay the login? It should be then put on Known issues, or prepare an asynchronous call for that

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The call is done when the user is banned. So it doesn't delay the login...

@pedrobaeza
Copy link
Member

Good icon! Do you have the SVG version? Can you remove blank background from it and let it transparent?

@pedrobaeza
Copy link
Member

Please put also icon reference on credits (ensuring it can be used - CC license?)

@pedrobaeza
Copy link
Member

Sorry for bothering you again. In last commit you have changed references to auth_brut_force instead of auth_brute_force

@legalsylvain
Copy link
Contributor Author

hi @pedrobaeza ! Thanks for your review !

  • About what odoo returns, I updated the description. This point is pretty important, the module don't change the behaviour. Odoo will simply indicates that the combination is bad (even if the attacker finally find the good combination of login / password)
  • About logging, log can be used by a system that parse logs, or by sentry system, when table will not. (or not so easy). But I can understand that it is redundant.
  • About the image, I have to fix it;

I changed the rest according to your other comments.

@legalsylvain legalsylvain added this to the 8.0 milestone Sep 26, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion:
Tracks Authentication Attempts and Prevents Brute-force Attacks
or
Authentication Tracking and Brute-force Attacks Prevention
=> 2 verbs or 2 nouns. I prefer the first one.

@pedrobaeza
Copy link
Member

One minor remark:

access_res_authentication_attempt,access_res_authentication_attempt,model_res_authentication_attempt,,1,0,0,0 

The rest seems 👍 (code review)

@legalsylvain
Copy link
Contributor Author

Thanks for your review, @pedrobaeza.
I added security file, giving read access to all users, and write / Delete access to "config / settting" members. (admin, by default).
Kind regards.

@max3903
Copy link
Member

max3903 commented Feb 10, 2016

👍

max3903 pushed a commit that referenced this pull request Feb 10, 2016
…_force

[ADD] auth track and prevent brut force
@max3903 max3903 merged commit b403942 into OCA:8.0 Feb 10, 2016
@rafaelbn
Copy link
Member

Hi @legalsylvain , I would like to ash about this module after reading README. Does it notify to any user in Odoo to take care about? (notify -> email). Thanks!

* if the Odoo server is behind an Apache / NGinx proxy without redirection,
all the request will be have the value '127.0.0.1' for the REMOTE_ADDR key;
* If some users are behind the same Internet Service Provider, if a user is
banned, all the other users will be banned too;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But this is expected to be the usual case, isn't it?
I'm a little out of step here, be shouldn't we also look into X-Forwarded-For?

model_id: model_res_authentication_attempt
name: Authentication Attempt All Users
perm_read: true

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's a kind of privacy flaw to allow all users to read res.authentication.attempt. And it's not needed to give that right to all users.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're probably right. (the same for model_res_banned_remote I guess)
feel free to propose a PR, I'll review it quickly. (you can too replace by xml, as yml is now deprecated)

yajo pushed a commit to Tecnativa/server-auth that referenced this pull request May 22, 2018
nikunjantala pushed a commit to Nitrokey/odoo-server-auth that referenced this pull request Sep 5, 2022
nikunjantala pushed a commit to Nitrokey/odoo-server-auth that referenced this pull request Sep 28, 2022
nikunjantala pushed a commit to Nitrokey/odoo-server-auth that referenced this pull request Oct 10, 2022
dsolanki-initos pushed a commit to Nitrokey/odoo-server-auth that referenced this pull request Nov 30, 2022
SiesslPhillip pushed a commit to grueneerde/OCA-server-tools that referenced this pull request Nov 20, 2024
Syncing from upstream OCA/server-tools (10.0)
hitesh-erpharbor pushed a commit to Nitrokey/odoo-server-auth that referenced this pull request Nov 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants