Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a non 200 code for failed login attempts #3058

Open
AnderssonPeter opened this issue Mar 23, 2024 · 4 comments
Open

Use a non 200 code for failed login attempts #3058

AnderssonPeter opened this issue Mar 23, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@AnderssonPeter
Copy link

Is your feature request related to a problem? Please describe.

Security

Describe the solution you'd like

Hi I'm trying to lock down my network by using a fail2ban plugin for my reverse proxy (Traefik), but for it to be able to detect incorrect singin attempts it would need a non http 200 code.

Is there someway to configure it to return something different than 200 when the username or password is incorrect?

Describe alternatives you've considered

No response

Additional context

No response

@AnderssonPeter AnderssonPeter added the enhancement New feature or request label Mar 23, 2024
@AnderssonPeter
Copy link
Author

If i read the codebase corretly its based on Django? i found the following post providing a possible solution: https://code.djangoproject.com/ticket/24465 but I'm a bit unsure where to add it.

@smilerz
Copy link
Collaborator

smilerz commented Mar 23, 2024

Unlikely to change the default Django behavior.

@AnderssonPeter
Copy link
Author

@smilerz It could be hidden behind a cli or environment flag if that helps?

@vabene1111
Copy link
Collaborator

auth is provided by https://docs.allauth.org/en/latest/ in tandoor. Feel free to take a look if they have a setting for status codes and I can implement them, altough I am pretty sure that somebody had a reason to choose the status code they did so please also evaluate whats best practice in this field.

Also allauth already has build in rate limiting functionality so putting fail2ban in front of it is not really necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants