From 8ece29c759392c6fa8e8cc7b06ad383bde20900f Mon Sep 17 00:00:00 2001 From: Matt Benjamin Date: Wed, 11 Sep 2019 13:22:26 -0400 Subject: [PATCH] rgw: ldap auth: S3 auth failure should return InvalidAccessKeyId LDAP was out of sync with the other auth modules, and the default error code is not correct for S3. Fixes: https://tracker.ceph.com/issues/41760 Signed-off-by: Matt Benjamin (cherry picked from commit 226227cf2d825b3414b7522a9f738180142f3956) --- src/rgw/rgw_rest_s3.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/rgw_rest_s3.cc b/src/rgw/rgw_rest_s3.cc index 60e5cbd42fab..115a2e80a3b8 100644 --- a/src/rgw/rgw_rest_s3.cc +++ b/src/rgw/rgw_rest_s3.cc @@ -4386,7 +4386,7 @@ rgw::auth::s3::LDAPEngine::authenticate( }*/ if (ldh->auth(base64_token.id, base64_token.key) != 0) { - return result_t::deny(); + return result_t::deny(-ERR_INVALID_ACCESS_KEY); } auto apl = apl_factory->create_apl_remote(cct, s, get_acl_strategy(), -- 2.47.3