Webserver logs not showing failed login attempts
- Dominant language
- Python
- Stars
- 46.9k
- Forks
- 17.8k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 483
Description
### Apache Airflow version
2.9.2
### If "Other Airflow 2 version" selected, which one?
_No response_
### What happened?
When webserver logs are enabled they do not show failed login attempts. In the docker logs a message does flash by with the failed login attempt, but it does not get logged in the webserver log file.
### What you think should happen instead?
Ideally within the webserver log file a HTTP response 401 gets logged that can be used with fail2ban
### How to reproduce
In the configuration set an access_logfile under [webserver]
try to login to the Web UI with invalid credentials.
Take a look at the docker logs for the webserver and compare with the webserver log file.
The line where the login fails is not in the webserver log file.
### Operating System
Ubuntu 22.04
### Versions of Apache Airflow Providers
_No response_
### Deployment
Docker-Compose
### Deployment details
_No response_
### Anything else?
_No response_
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
Contributor guide
Research direction
Start with the [webserver] access_logfile configuration and reproduce an invalid Web UI login in the Docker Compose deployment. Compare the Docker webserver output with the configured webserver log file, and consider the work done when failed attempts, including the HTTP 401 response, appear in that file for fail2ban use.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker-compose, python
- Domain
- authentication, backend, observability-sre
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100