]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: add AWS4 completion support for RGW_OP_PUT_ACLS
authorJavier M. Mellid <jmunhoz@igalia.com>
Wed, 13 Jan 2016 21:50:33 +0000 (22:50 +0100)
committerJavier M. Mellid <jmunhoz@igalia.com>
Sat, 13 Feb 2016 12:43:04 +0000 (12:43 +0000)
Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
src/rgw/rgw_rest.h
src/rgw/rgw_rest_s3.cc
src/rgw/rgw_rest_s3.h

index a60d9a7dbc2810f2944fd4408b8f3d0f25264539..e79315f4306d98889ff73c04d40b4afc464879db 100644 (file)
@@ -245,7 +245,7 @@ public:
   RGWPutACLs_ObjStore() {}
   ~RGWPutACLs_ObjStore() {}
 
-  int get_params();
+  virtual int get_params();
 };
 
 class RGWGetCORS_ObjStore : public RGWGetCORS {
index 55ef699b37100930a755c15a30e497328b4d4193..ab9f14a5f67c0f20047b8c89931a49dfa56579cb 100644 (file)
@@ -1713,6 +1713,19 @@ void RGWGetACLs_ObjStore_S3::send_response()
   s->cio->write(acls.c_str(), acls.size());
 }
 
+int RGWPutACLs_ObjStore_S3::get_params()
+{
+  int ret =  RGWPutACLs_ObjStore::get_params();
+  if (ret < 0)
+    s->aws4_auth_needs_complete = false;
+  if (s->aws4_auth_needs_complete) {
+    int ret_auth = do_aws4_auth_completion();
+    if (ret_auth)
+      return ret_auth;
+  }
+  return ret;
+}
+
 int RGWPutACLs_ObjStore_S3::get_policy_from_state(RGWRados *store, struct req_state *s, stringstream& ss)
 {
   RGWAccessControlPolicy_S3 s3policy(s->cct);
index e7c500c7451e09111271e881a0bbf4ba64e12052..9fd63b447da17dfcc8d25ba9b57a55b4a1d575e2 100644 (file)
@@ -226,6 +226,7 @@ public:
 
   int get_policy_from_state(RGWRados *store, struct req_state *s, stringstream& ss);
   void send_response();
+  int get_params();
 };
 
 class RGWGetCORS_ObjStore_S3 : public RGWGetCORS_ObjStore {