]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: move ACL Strategies to the newer auth framework.
authorRadoslaw Zarzynski <rzarzynski@mirantis.com>
Wed, 11 Jan 2017 17:32:32 +0000 (18:32 +0100)
committerRadoslaw Zarzynski <rzarzynski@mirantis.com>
Fri, 24 Mar 2017 15:55:41 +0000 (16:55 +0100)
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
src/rgw/rgw_auth.cc
src/rgw/rgw_auth.h
src/rgw/rgw_auth_keystone.cc

index c9a1893913c3b646460394e9687d8da5526db4bb..250622df648dde038f416c8169e3eb27b0fb2ff0 100644 (file)
@@ -82,7 +82,7 @@ transform_old_authinfo(const req_state* const s)
 
 uint32_t rgw_perms_from_aclspec_default_strategy(
   const rgw_user& uid,
-  const RGWIdentityApplier::aclspec_t& aclspec)
+  const rgw::auth::Identity::aclspec_t& aclspec)
 {
   dout(5) << "Searching permissions for uid=" << uid <<  dendl;
 
index 53d6b9e506d69c06dfd3a75071a9ecf16efe1d7b..2abf97e2e8e7e516bd416497a0ce56e11fab6be8 100644 (file)
@@ -137,7 +137,7 @@ public:
     }
   };
 
-  using aclspec_t = RGWIdentityApplier::aclspec_t;
+  using aclspec_t = rgw::auth::Identity::aclspec_t;
   typedef std::function<uint32_t(const aclspec_t&)> acl_strategy_t;
 
 protected:
@@ -605,7 +605,7 @@ public:
     }
   };
 
-  using aclspec_t = RGWIdentityApplier::aclspec_t;
+  using aclspec_t = rgw::auth::Identity::aclspec_t;
   typedef std::function<uint32_t(const aclspec_t&)> acl_strategy_t;
 
 protected:
@@ -660,7 +660,7 @@ public:
  * the authentication process, they must have it loaded. Leveraging this is
  * a way to avoid unnecessary calls to underlying RADOS store. */
 class LocalApplier : public IdentityApplier {
-  using aclspec_t = RGWIdentityApplier::aclspec_t;
+  using aclspec_t = rgw::auth::Identity::aclspec_t;
 
 protected:
   const RGWUserInfo user_info;
@@ -726,4 +726,9 @@ protected:
 } /* namespace auth */
 } /* namespace rgw */
 
+
+uint32_t rgw_perms_from_aclspec_default_strategy(
+  const rgw_user& uid,
+  const rgw::auth::Identity::aclspec_t& aclspec);
+
 #endif /* CEPH_RGW_AUTH_H */
index a789cb22472fb5c107588c647c68a0eb575eaed8..a7d3048d6ec9ff01777cbf29564b0b0c448757d1 100644 (file)
@@ -183,7 +183,7 @@ TokenEngine::get_acl_strategy(const TokenEngine::token_envelope_t& token) const
   };
 
   /* Lambda will obtain a copy of (not a reference to!) allowed_items. */
-  return [allowed_items](const RGWIdentityApplier::aclspec_t& aclspec) {
+  return [allowed_items](const rgw::auth::Identity::aclspec_t& aclspec) {
     uint32_t perm = 0;
 
     for (const auto& allowed_item : allowed_items) {