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

Log user agent and remote addr on auth errors #9475

Merged
merged 1 commit into from
Jul 16, 2024

Conversation

butonic
Copy link
Member

@butonic butonic commented Jun 26, 2024

The proxy will now log user_agent, client.address, network.peer.address and network.peer.port to help operations debug authentication errors. The latter three follow the Semantic Conventions 1.26.0 / General / Attributes naming to better integrate with log aggregation tools.

Trying to help pin down the occurrence very old access tokens... like 120+ days.

@butonic butonic self-assigned this Jun 26, 2024
@butonic butonic added the Category:Enhancement Add new functionality label Jun 26, 2024
@d7oc
Copy link
Contributor

d7oc commented Jun 26, 2024

Do we also have some information available which definitely identifies a single user? I would like to have it in here. Like uid, username etc. None of the information added in here provides this now as even the address might be NATed and thus not unique.

@butonic butonic force-pushed the log-useragent-and-remoteaddr branch from de08f92 to b2255bb Compare July 16, 2024 10:41
@butonic
Copy link
Member Author

butonic commented Jul 16, 2024

we could log the token but when it is opaque we don't gain anything. The root cause of the error will be logged. AFAICT an error only occurs here when the idp is unreachable or the claims cannot be parsed.

when the proxy is running at debug level the claims (including the user id) will be logged on successful auth.

Copy link

@butonic butonic requested review from kobergj and dragonchaser July 16, 2024 11:08
@micbar micbar merged commit 7e9da83 into master Jul 16, 2024
4 checks passed
@micbar micbar deleted the log-useragent-and-remoteaddr branch July 16, 2024 11:23
ownclouders pushed a commit that referenced this pull request Jul 16, 2024
Log user agent and remote addr on auth errors
@micbar micbar mentioned this pull request Jul 30, 2024
20 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category:Enhancement Add new functionality
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants