apply security patch: v11.1.x/0001-Alerting-Fix-permission-on-external-rule-write-endpo.patch

commit 8be7b33e066ebaa575efb63bf62eec8d1defd602
Author: Alex Weaver <weaver.alex.d@gmail.com>
Date:   Thu Aug 22 11:54:30 2024 -0500

    Alerting: Fix permission on external rule write endpoint
This commit is contained in:
github-actions[bot]
2024-09-06 14:04:49 +00:00
parent fccf08107b
commit b2c053e5b4
+1 -1
View File
@@ -112,7 +112,7 @@ func (api *API) authorize(method, path string) web.Handler {
case http.MethodGet + "/api/ruler/{DatasourceUID}/api/v1/rules":
eval = ac.EvalPermission(ac.ActionAlertingRuleExternalRead, datasources.ScopeProvider.GetResourceScopeUID(ac.Parameter(":DatasourceUID")))
case http.MethodPost + "/api/ruler/{DatasourceUID}/api/v1/rules/{Namespace}":
eval = ac.EvalPermission(ac.ActionAlertingInstancesExternalWrite, datasources.ScopeProvider.GetResourceScopeUID(ac.Parameter(":DatasourceUID")))
eval = ac.EvalPermission(ac.ActionAlertingRuleExternalWrite, datasources.ScopeProvider.GetResourceScopeUID(ac.Parameter(":DatasourceUID")))
// Lotex Prometheus-compatible Paths
case http.MethodGet + "/api/prometheus/{DatasourceUID}/api/v1/rules":