]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: apply the new filters over appliers in the Swift's auth strategy.
authorRadoslaw Zarzynski <rzarzynski@mirantis.com>
Wed, 11 Jan 2017 18:31:26 +0000 (19:31 +0100)
committerRadoslaw Zarzynski <rzarzynski@mirantis.com>
Fri, 24 Mar 2017 15:55:26 +0000 (16:55 +0100)
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
src/rgw/rgw_swift_auth.h

index e11e87f19a9805b31d4f51f4a81471582ef2b51a..a05ae3233b91b532131640d50434316ad8a566ac 100644 (file)
@@ -165,15 +165,25 @@ class DefaultStrategy : public rgw::auth::Strategy,
                              const req_state* const s,
                              acl_strategy_t&& extra_acl_strategy,
                              const rgw::auth::RemoteApplier::AuthInfo info) const override {
-    return aplptr_t(
-      new rgw::auth::RemoteApplier(cct, store, std::move(extra_acl_strategy), info));
+    auto apl = \
+      rgw::auth::add_3rdparty(store, s->account_name,
+        rgw::auth::add_sysreq(cct, store, s,
+          rgw::auth::RemoteApplier(cct, store, std::move(extra_acl_strategy),
+                                   info)));
+    /* TODO(rzarzynski): replace with static_ptr. */
+    return aplptr_t(new decltype(apl)(std::move(apl)));
   }
 
   aplptr_t create_apl_local(CephContext* const cct,
                             const req_state* const s,
                             const RGWUserInfo& user_info,
                             const std::string& subuser) const override {
-    return aplptr_t(new rgw::auth::LocalApplier(cct, user_info, subuser));
+    auto apl = \
+      rgw::auth::add_3rdparty(store, s->account_name,
+        rgw::auth::add_sysreq(cct, store, s,
+          rgw::auth::LocalApplier(cct, user_info, subuser)));
+    /* TODO(rzarzynski): replace with static_ptr. */
+    return aplptr_t(new decltype(apl)(std::move(apl)));
   }
 
   aplptr_t create_apl_turl(CephContext* const cct,