From: Radoslaw Zarzynski Date: Wed, 11 Jan 2017 17:32:32 +0000 (+0100) Subject: rgw: move ACL Strategies to the newer auth framework. X-Git-Tag: v12.0.2~305^2~13 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=95f2180204afa94ca2623e7cb3a0a28f58e62393;p=ceph.git rgw: move ACL Strategies to the newer auth framework. Signed-off-by: Radoslaw Zarzynski --- diff --git a/src/rgw/rgw_auth.cc b/src/rgw/rgw_auth.cc index c9a1893913c3..250622df648d 100644 --- a/src/rgw/rgw_auth.cc +++ b/src/rgw/rgw_auth.cc @@ -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; diff --git a/src/rgw/rgw_auth.h b/src/rgw/rgw_auth.h index 53d6b9e506d6..2abf97e2e8e7 100644 --- a/src/rgw/rgw_auth.h +++ b/src/rgw/rgw_auth.h @@ -137,7 +137,7 @@ public: } }; - using aclspec_t = RGWIdentityApplier::aclspec_t; + using aclspec_t = rgw::auth::Identity::aclspec_t; typedef std::function 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 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 */ diff --git a/src/rgw/rgw_auth_keystone.cc b/src/rgw/rgw_auth_keystone.cc index a789cb22472f..a7d3048d6ec9 100644 --- a/src/rgw/rgw_auth_keystone.cc +++ b/src/rgw/rgw_auth_keystone.cc @@ -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) {