]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: eradicate req_state::aws4_auth::credential.
authorRadoslaw Zarzynski <rzarzynski@mirantis.com>
Sat, 15 Apr 2017 19:03:20 +0000 (21:03 +0200)
committerRadoslaw Zarzynski <rzarzynski@mirantis.com>
Wed, 7 Jun 2017 10:43:16 +0000 (12:43 +0200)
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
src/rgw/rgw_common.h
src/rgw/rgw_rest_s3.cc

index b6853d8229155c8c719451e8f61b3b973906926b..d36931d64c5686c3b0b46278d5e93f1b5ce6b0dc 100644 (file)
@@ -1696,7 +1696,6 @@ inline ostream& operator<<(ostream& out, const rgw_obj_index_key &o) {
 
 struct rgw_aws4_auth {
   string date;
-  string credential;
   string signed_hdrs;
   string access_key_id;
   string credential_scope;
index 23a7e66e6e5f0aa3448224f5c79a3c76e8ad3ed8..accb76afd06097634f616d7ed6c0b69a78680dd7 100644 (file)
@@ -3530,8 +3530,9 @@ int RGW_Auth_S3::authorize_v4(RGWRados *store, struct req_state *s, bool force_b
     return -ENOMEM;
   }
 
+  std::string credential;
   int ret = rgw::auth::s3::parse_credentials(s->info,
-                                             s->aws4_auth->credential,
+                                             credential,
                                              s->aws4_auth->signed_hdrs,
                                              s->aws4_auth->signature,
                                              s->aws4_auth->date,
@@ -3542,14 +3543,14 @@ int RGW_Auth_S3::authorize_v4(RGWRados *store, struct req_state *s, bool force_b
 
   /* grab access key id */
 
-  pos = s->aws4_auth->credential.find("/");
-  s->aws4_auth->access_key_id = s->aws4_auth->credential.substr(0, pos);
+  pos = credential.find("/");
+  s->aws4_auth->access_key_id = credential.substr(0, pos);
 
   dout(10) << "access key id = " << s->aws4_auth->access_key_id << dendl;
 
   /* grab credential scope */
 
-  s->aws4_auth->credential_scope = s->aws4_auth->credential.substr(pos + 1, s->aws4_auth->credential.length());
+  s->aws4_auth->credential_scope = credential.substr(pos + 1);
 
   dout(10) << "credential scope = " << s->aws4_auth->credential_scope << dendl;