-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Read value of remote_user in Slow Query Logs of Query Frontend from a HTTP header #7360
Comments
Would like to work on this. Do maintainers think that this feature is worth a PR? |
I think this can be useful. Don't we already log Grafana specific headers, like the dashboard ID? |
Correct, the Slow Query Log already can handle headers like |
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your proposal related to a problem?
Slow Query Logs of the Query Frontend component play an important part in identifying rogue queries. It is useful to know which user executed a query.
The field
remote_user
is currently set by extracting the username from the Authorization header.Our setup does not use Basic Authentication. Instead, a proxy in front of Query Frontend handles the authentication. That proxy can pass the username along as a HTTP header.
We would like to set the value of the HTTP header as the value of
remote_user
.Describe the solution you'd like
--query-frontend.slow-query-log-user-header
(proposal, any other name will do).--query-frontend.slow-query-log-user-header
is set to, for example,X-Forwarded-User
, Query Frontend sets the value of that header as the value of the fieldremote_user
in the Slow Query Logs.Describe alternatives you've considered
Somehow make the proxy "fake" the Basic Authentication header. That proved too difficult.
Additional context
The feature was introduced in #6153.
The text was updated successfully, but these errors were encountered: