mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Remove sensitive information from presigned URLs prior to logging (#87035)
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com> Co-authored-by: Dan Cech <dcech@grafana.com> Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
This commit is contained in:
@@ -373,13 +373,18 @@ func (proxy *DataSourceProxy) logRequest() {
|
||||
|
||||
panelPluginId := proxy.ctx.Req.Header.Get("X-Panel-Plugin-Id")
|
||||
|
||||
uri, err := util.SanitizeURI(proxy.ctx.Req.RequestURI)
|
||||
if err == nil {
|
||||
proxy.ctx.Logger.Error("Could not sanitize RequestURI", "error", err)
|
||||
}
|
||||
|
||||
ctxLogger := logger.FromContext(proxy.ctx.Req.Context())
|
||||
ctxLogger.Info("Proxying incoming request",
|
||||
"userid", proxy.ctx.UserID,
|
||||
"orgid", proxy.ctx.OrgID,
|
||||
"username", proxy.ctx.Login,
|
||||
"datasource", proxy.ds.Type,
|
||||
"uri", proxy.ctx.Req.RequestURI,
|
||||
"uri", uri,
|
||||
"method", proxy.ctx.Req.Method,
|
||||
"panelPluginId", panelPluginId,
|
||||
"body", body)
|
||||
|
||||
Reference in New Issue
Block a user