You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(ruler): properly read OrgID from context (#3343)
* fix(ruler): properly read OrgID from context
Previously the `/prometheus/api/v1/{rules|alerts}` endpoints used
`user.ExtractOrgIDFromHTTPRequest` to read the tenant id directly from
the HTTP request headers.
This however only works in multi-tenant mode. When auth is disabled, no
such headers are needed to be set and above function returns no value.
By directly reading from the request, the HTTP auth middleware which
usually catches such cases is bypassed.
This PR changes the behavior to always read from the context instead of
the request, which always holds the correct org id as set by the middleware.
Signed-off-by: sh0rez <[email protected]>
* fix(alertmanager): read org id from context
Ports fixes done to the ruler api also to alertmanager
Signed-off-by: sh0rez <[email protected]>
* doc: add CHANGELOG entry
Signed-off-by: sh0rez <[email protected]>
* Address review comments
Signed-off-by: gotjosh <[email protected]>
Co-authored-by: gotjosh <[email protected]>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -108,6 +108,7 @@
108
108
*[BUGFIX] Honor configured timeout in Azure and GCS object clients. #3285
109
109
*[BUGFIX] Shuffle sharding: fixed max global series per user/metric limit when shuffle sharding and `-distributor.shard-by-all-labels=true` are both enabled in distributor. When using these global limits you should now set `-distributor.sharding-strategy` and `-distributor.zone-awareness-enabled` to ingesters too. #3369
110
110
*[BUGFIX] Slow query logging: when using downstream server request parameters were not logged. #3276
111
+
*[BUGFIX] Fixed tenant detection in the ruler and alertmanager API when running without auth. #3343
0 commit comments