]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: distinguish parse_v4_credentials
authorMatt Benjamin <mbenjamin@redhat.com>
Fri, 19 Oct 2018 20:40:19 +0000 (16:40 -0400)
committerAshish Singh <assingh@redhat.com>
Thu, 10 Jan 2019 19:53:33 +0000 (01:23 +0530)
The caller and callees of this method are v4-specific, and their
names contain a v4 infix.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
(cherry picked from commit aa8c686da10ce1211a706f3519757045dfe34bed)

Conflicts:
src/rgw/rgw_auth_s3.cc
src/rgw/rgw_auth_s3.h
src/rgw/rgw_rest_s3.cc
   - Included v4 infix in 'parse_credentials()' and removed
    "session_token" param from definition, declaration and call
    of 'parse_v4_credentials()'.

src/rgw/rgw_auth_s3.cc
src/rgw/rgw_auth_s3.h
src/rgw/rgw_rest_s3.cc

index 0904e825520e8ed49372d78fa513c1985eb2585d..2864f8a8cec44a8e291ffd3dba5c9a99b0af8a58 100644 (file)
@@ -412,13 +412,13 @@ static inline int parse_v4_auth_header(const req_info& info,               /* in
   return 0;
 }
 
-int parse_credentials(const req_info& info,                     /* in */
-                      boost::string_view& access_key_id,        /* out */
-                      boost::string_view& credential_scope,     /* out */
-                      boost::string_view& signedheaders,        /* out */
-                      boost::string_view& signature,            /* out */
-                      boost::string_view& date,                 /* out */
-                      bool& using_qs)                           /* out */
+int parse_v4_credentials(const req_info& info,                     /* in */
+                        boost::string_view& access_key_id,        /* out */
+                        boost::string_view& credential_scope,     /* out */
+                        boost::string_view& signedheaders,        /* out */
+                        boost::string_view& signature,            /* out */
+                        boost::string_view& date,                 /* out */
+                         bool& using_qs)                           /* out */
 {
   const char* const http_auth = info.env->get("HTTP_AUTHORIZATION");
   using_qs = http_auth == nullptr || http_auth[0] == '\0';
index 6f860a72a2e1fc0d98e522fd6b5896d108432671..5f6f70a7c66c4e6b18f4d13b0264f86180fb4d8b 100644 (file)
@@ -381,13 +381,13 @@ static constexpr char AWS4_UNSIGNED_PAYLOAD_HASH[] = "UNSIGNED-PAYLOAD";
 static constexpr char AWS4_STREAMING_PAYLOAD_HASH[] = \
   "STREAMING-AWS4-HMAC-SHA256-PAYLOAD";
 
-int parse_credentials(const req_info& info,                     /* in */
-                      boost::string_view& access_key_id,        /* out */
-                      boost::string_view& credential_scope,     /* out */
-                      boost::string_view& signedheaders,        /* out */
-                      boost::string_view& signature,            /* out */
-                      boost::string_view& date,                 /* out */
-                      bool& using_qs);                          /* out */
+int parse_v4_credentials(const req_info& info,                     /* in */
+                        boost::string_view& access_key_id,        /* out */
+                        boost::string_view& credential_scope,     /* out */
+                        boost::string_view& signedheaders,        /* out */
+                        boost::string_view& signature,            /* out */
+                        boost::string_view& date,                 /* out */
+                         bool& using_qs);                          /* out */
 
 static inline std::string get_v4_canonical_uri(const req_info& info) {
   /* The code should normalize according to RFC 3986 but S3 does NOT do path
index 3b07327f38d7ce2c6a76b4157a098b6f2ea8270c..7f7c7f0b0b22b7e5e173376c0a9eb4c5b0bf1409 100644 (file)
@@ -3736,13 +3736,13 @@ AWSGeneralAbstractor::get_auth_data_v4(const req_state* const s,
   boost::string_view credential_scope;
   boost::string_view client_signature;
 
-  int ret = rgw::auth::s3::parse_credentials(s->info,
-                                             access_key_id,
-                                             credential_scope,
-                                             signed_hdrs,
-                                             client_signature,
-                                             date,
-                                             using_qs);
+  int ret = rgw::auth::s3::parse_v4_credentials(s->info,
+                                               access_key_id,
+                                               credential_scope,
+                                               signed_hdrs,
+                                               client_signature,
+                                               date,
+                                               using_qs);
   if (ret < 0) {
     throw ret;
   }