From: Radoslaw Zarzynski Date: Sat, 15 Apr 2017 19:03:20 +0000 (+0200) Subject: rgw: eradicate req_state::aws4_auth::credential. X-Git-Tag: v12.1.0~155^2~52 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1514408681557c1d8e291b3741ca494fb7cc7d30;p=ceph.git rgw: eradicate req_state::aws4_auth::credential. Signed-off-by: Radoslaw Zarzynski --- diff --git a/src/rgw/rgw_common.h b/src/rgw/rgw_common.h index b6853d822915..d36931d64c56 100644 --- a/src/rgw/rgw_common.h +++ b/src/rgw/rgw_common.h @@ -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; diff --git a/src/rgw/rgw_rest_s3.cc b/src/rgw/rgw_rest_s3.cc index 23a7e66e6e5f..accb76afd060 100644 --- a/src/rgw/rgw_rest_s3.cc +++ b/src/rgw/rgw_rest_s3.cc @@ -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;