]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: Add support wildcard subuser for bucket policy 36186/head
authorSeena Fallah <seenafallah@gmail.com>
Thu, 5 Mar 2020 19:00:39 +0000 (22:30 +0330)
committerNathan Cutler <ncutler@suse.com>
Sat, 18 Jul 2020 20:22:56 +0000 (22:22 +0200)
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 0008f84cb03402b159001bf6b6c3a2ff48b2de9b)

src/rgw/rgw_auth.cc

index b03d5b280106b6577d00546f8e948b50b92dc22c..df41a8c8ade5c5ff041cc4910e86450c9f867ca4 100644 (file)
@@ -602,7 +602,11 @@ bool rgw::auth::LocalApplier::is_identity(const idset_t& ids) const {
       if (id.get_id() == user_info.user_id.id) {
         return true;
       }
-      if (subuser != NO_SUBUSER) {
+      std::string wildcard_subuser = user_info.user_id.id;
+      wildcard_subuser.append(":*");
+      if (wildcard_subuser == id.get_id()) {
+        return true;
+      } else if (subuser != NO_SUBUSER) {
         std::string user = user_info.user_id.id;
         user.append(":");
         user.append(subuser);