/* FIXME: remove this after switching all handlers to the new authentication
* infrastructure. */
- if (! s->auth_identity) {
- s->auth_identity = rgw_auth_transform_old_authinfo(s);
+ if (! s->auth.identity) {
+ s->auth.identity = rgw::auth::transform_old_authinfo(s);
}
req->log(s, "reading op permissions");
/* FIXME: remove this after switching all handlers to the new authentication
* infrastructure. */
- if (! s->auth_identity) {
- s->auth_identity = rgw_auth_transform_old_authinfo(s);
+ if (! s->auth.identity) {
+ s->auth.identity = rgw::auth::transform_old_authinfo(s);
}
req->log(s, "reading op permissions");
#define dout_subsys ceph_subsys_rgw
-std::unique_ptr<RGWIdentityApplier>
-rgw_auth_transform_old_authinfo(req_state * const s)
+namespace rgw {
+namespace auth {
+
+std::unique_ptr<rgw::auth::Identity>
+transform_old_authinfo(const req_state* const s)
{
/* This class is not intended for public use. Should be removed altogether
* with this function after moving all our APIs to the new authentication
* infrastructure. */
- class RGWDummyIdentityApplier : public RGWIdentityApplier {
- CephContext * const cct;
+ class DummyIdentityApplier : public rgw::auth::Identity {
+ CephContext* const cct;
/* For this particular case it's OK to use rgw_user structure to convey
* the identity info as this was the policy for doing that before the
const int perm_mask;
const bool is_admin;
public:
- RGWDummyIdentityApplier(CephContext * const cct,
- const rgw_user& auth_id,
- const int perm_mask,
- const bool is_admin)
+ DummyIdentityApplier(CephContext* const cct,
+ const rgw_user& auth_id,
+ const int perm_mask,
+ const bool is_admin)
: cct(cct),
id(auth_id),
perm_mask(perm_mask),
}
};
- return std::unique_ptr<RGWIdentityApplier>(
- new RGWDummyIdentityApplier(s->cct,
- s->user->user_id,
- s->perm_mask,
+ return std::unique_ptr<rgw::auth::Identity>(
+ new DummyIdentityApplier(s->cct,
+ s->user->user_id,
+ s->perm_mask,
/* System user has admin permissions by default - it's supposed to pass
* through any security check. */
- s->system_request));
+ s->system_request));
}
+} /* namespace auth */
+} /* namespace rgw */
+
uint32_t rgw_perms_from_aclspec_default_strategy(
const rgw_user& uid,
return out;
}
-std::unique_ptr<RGWIdentityApplier>
-rgw_auth_transform_old_authinfo(req_state * const s);
-
uint32_t rgw_perms_from_aclspec_default_strategy(
const rgw_user& uid,
const RGWIdentityApplier::aclspec_t& aclspec);
}
+std::unique_ptr<Identity> transform_old_authinfo(const req_state* const s);
+
+
/* Interface for classes applying changes to request state/RADOS store
* imposed by a particular rgw::auth::Engine.
*
/* FIXME: remove this after switching all handlers to the new authentication
* infrastructure. */
- if (nullptr == s->auth_identity) {
- s->auth_identity = rgw_auth_transform_old_authinfo(s);
+ if (nullptr == s->auth.identity) {
+ s->auth.identity = rgw::auth::transform_old_authinfo(s);
}
req->log(s, "normalizing buckets and tenants");
/* FIXME: remove this after switching S3 to the new authentication
* infrastructure. */
- s->auth_identity = rgw_auth_transform_old_authinfo(s);
+ s->auth.identity = rgw::auth::transform_old_authinfo(s);
} else {
ldout(s->cct, 0) << "No attached policy found!" << dendl;
}