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

commit 48abc6145c8e2de5dcd3ba13d3e35a7c5877045b
Author: Alex Weaver <weaver.alex.d@gmail.com>
Date:   Thu Aug 22 11:58:25 2024 -0500

    Alerting: Fix permission on external rule write endpoint
This commit is contained in:
github-actions[bot]
2024-09-06 09:10:52 -05:00
committed by Kevin Minehart
parent 79a9941056
commit b01b6f6987
+1 -1
View File
@@ -110,7 +110,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":