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

Provide username in log data on auth failure #6827

Merged
merged 2 commits into from Jun 18, 2020

Conversation

rtribotte
Copy link
Member

@rtribotte rtribotte commented May 20, 2020

What does this PR do?

This PR adds the username in the log data, if present, on auth failure for middlewares basic auth and digest auth.

Motivation

fixes #6722
Providing the user on auth failure in the access log is an expected behavior for some tools, at least fail2ban.

More

  • Added/updated tests
  • Added/updated documentation

Additional Notes

Copy link
Contributor

@dtomcej dtomcej left a comment

Choose a reason for hiding this comment

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

LGTM
:shipit:

@mpl mpl requested review from mpl and removed request for mpl June 2, 2020 08:43
@mpl mpl assigned mpl and unassigned mpl Jun 2, 2020
@mpl mpl removed their request for review June 2, 2020 13:13
@jbdoumenjou jbdoumenjou requested a review from mpl June 2, 2020 13:16
@ldez ldez added this to To review in v2 via automation Jun 2, 2020
integration/access_log_test.go Outdated Show resolved Hide resolved
pkg/middlewares/auth/basic_auth.go Outdated Show resolved Hide resolved
pkg/middlewares/auth/basic_auth.go Show resolved Hide resolved
pkg/middlewares/auth/digest_auth.go Show resolved Hide resolved
Copy link
Member

@juliens juliens left a comment

Choose a reason for hiding this comment

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

LGTM

@traefiker traefiker merged commit 8d3d5c0 into traefik:v2.2 Jun 18, 2020
v2 automation moved this from To review to Done Jun 18, 2020
@crazy-max
Copy link

Nice thanks!

@ldez ldez added the kind/bug/fix a bug fix label Jun 28, 2020
@rtribotte rtribotte deleted the fix/accesslog-username branch August 18, 2020 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
v2
Done
Development

Successfully merging this pull request may close these issues.

None yet

8 participants