From: Pritha Srivastava Date: Tue, 28 Aug 2018 05:03:39 +0000 (+0530) Subject: rgw: STS auth failures will return reject. X-Git-Tag: v14.0.1~113^2~9 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cc2b65fa039c5c80bc2a9732805807923a66285e;p=ceph.git rgw: STS auth failures will return reject. Signed-off-by: Pritha Srivastava --- diff --git a/src/rgw/rgw_rest_s3.cc b/src/rgw/rgw_rest_s3.cc index 857cb49a5224..3a61875f47fd 100644 --- a/src/rgw/rgw_rest_s3.cc +++ b/src/rgw/rgw_rest_s3.cc @@ -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); } }