]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: grant mgr profile "config" commands
authorJohn Spray <john.spray@redhat.com>
Wed, 11 Apr 2018 16:08:39 +0000 (12:08 -0400)
committerJohn Spray <john.spray@redhat.com>
Mon, 23 Apr 2018 11:29:46 +0000 (07:29 -0400)
...and remove redundant config-key lines (these are applied
to mgr anyway in the next block, and mgr even has a broader
config-key permission in the line above).

Signed-off-by: John Spray <john.spray@redhat.com>
src/mon/MonCap.cc

index ef2872aea1d49b8efb70ee65793b98892cd4acdd..73f4a07ad03ddc2b270a49cda6060d219472ae28 100644 (file)
@@ -198,13 +198,7 @@ void MonCapGrant::expand_profile_mon(const EntityName& name) const
     profile_grants.push_back(MonCapGrant("osd", MON_CAP_R | MON_CAP_W));
     profile_grants.push_back(MonCapGrant("auth", MON_CAP_R | MON_CAP_X));
     profile_grants.push_back(MonCapGrant("config-key", MON_CAP_R | MON_CAP_W));
-    StringConstraint constraint(StringConstraint::MATCH_TYPE_PREFIX,
-                                "daemon-private/mgr/");
-    profile_grants.push_back(MonCapGrant("config-key get", "key", constraint));
-    profile_grants.push_back(MonCapGrant("config-key set", "key", constraint));
-    profile_grants.push_back(MonCapGrant("config-key put", "key", constraint));
-    profile_grants.push_back(MonCapGrant("config-key exists", "key", constraint));
-    profile_grants.push_back(MonCapGrant("config-key delete", "key", constraint));
+    profile_grants.push_back(MonCapGrant("config", MON_CAP_R | MON_CAP_W));
   }
   if (profile == "osd" || profile == "mds" || profile == "mon" ||
       profile == "mgr") {