From 2dd60a73627e8519eff89ee92b52e5ebff5ef3c4 Mon Sep 17 00:00:00 2001 From: ioito Date: Sat, 7 Sep 2019 16:01:20 +0800 Subject: [PATCH] hotfix: avolid auth for yunionmeta dbinstance_skus --- pkg/cloudcommon/policy/defaults.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/pkg/cloudcommon/policy/defaults.go b/pkg/cloudcommon/policy/defaults.go index 7223c7c9f3..10b8fd9b4f 100644 --- a/pkg/cloudcommon/policy/defaults.go +++ b/pkg/cloudcommon/policy/defaults.go @@ -328,6 +328,25 @@ var ( }, }, }, + { + // meta服务 dbinstance_skus列表不需要认证 + Auth: false, + Scope: rbacutils.ScopeSystem, + Rules: []rbacutils.SRbacRule{ + { + Service: "yunionmeta", + Resource: "dbinstance_skus", + Action: PolicyActionGet, + Result: rbacutils.Allow, + }, + { + Service: "yunionmeta", + Resource: "dbinstance_skus", + Action: PolicyActionList, + Result: rbacutils.Allow, + }, + }, + }, { // for anonymous update torrent status Auth: false,