rgw: move ACL Strategies to the newer auth framework.

Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
This commit is contained in:
Radoslaw Zarzynski 2017-01-11 18:32:32 +01:00
parent 38e1af31f9
commit 95f2180204
3 changed files with 10 additions and 5 deletions

View 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;

View 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 */

View 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) {