From cc2b65fa039c5c80bc2a9732805807923a66285e Mon Sep 17 00:00:00 2001 From: Pritha Srivastava Date: Tue, 28 Aug 2018 10:33:39 +0530 Subject: [PATCH] rgw: STS auth failures will return reject. Signed-off-by: Pritha Srivastava --- src/rgw/rgw_rest_s3.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/rgw/rgw_rest_s3.cc b/src/rgw/rgw_rest_s3.cc index 857cb49a522..3a61875f47f 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); } } -- 2.39.5