]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: STS auth failures will return reject.
authorPritha Srivastava <prsrivas@redhat.com>
Tue, 28 Aug 2018 05:03:39 +0000 (10:33 +0530)
committerPritha Srivastava <prsrivas@redhat.com>
Fri, 21 Sep 2018 05:39:33 +0000 (11:09 +0530)
Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
src/rgw/rgw_rest_s3.cc

index 857cb49a5224d8f71ecef4e4d25652125002750f..3a61875f47fda7df809af4a74b4061985730fc68 100644 (file)
@@ -4405,7 +4405,7 @@ rgw::auth::s3::STSEngine::authenticate(
 
   STS::SessionToken token;
   if (int ret = get_session_token(session_token, token); ret < 0) {
-    return result_t::deny(ret);
+    return result_t::reject(ret);
   }
   //Authentication
   //Check if the token has expired
@@ -4417,11 +4417,11 @@ rgw::auth::s3::STSEngine::authenticate(
         real_clock::time_point now = real_clock::now();
         if (now >= *exp) {
           ldout(cct, 0) << "ERROR: Token expired" << dendl;
-          return result_t::deny(-EPERM);
+          return result_t::reject(-EPERM);
         }
       } else {
         ldout(cct, 0) << "ERROR: Invalid expiration: " << expiration << dendl;
-        return result_t::deny(-EPERM);
+        return result_t::reject(-EPERM);
       }
     }
   }
@@ -4438,7 +4438,7 @@ rgw::auth::s3::STSEngine::authenticate(
   ldout(cct, 15) << "compare=" << compare << dendl;
 
   if (compare != 0) {
-    return result_t::deny(-ERR_SIGNATURE_NO_MATCH);
+    return result_t::reject(-ERR_SIGNATURE_NO_MATCH);
   }
 
   // Get all the authorization info
@@ -4463,7 +4463,7 @@ rgw::auth::s3::STSEngine::authenticate(
     int ret = rgw_get_user_info_by_uid(store, token.user, user_info, NULL);
     if (ret < 0) {
       ldout(cct, 5) << "ERROR: failed reading user info: uid=" << token.user << dendl;
-      return result_t::deny(-EPERM);
+      return result_t::reject(-EPERM);
     }
   }