From: Matt Benjamin Date: Wed, 11 Sep 2019 17:22:26 +0000 (-0400) Subject: rgw: ldap auth: S3 auth failure should return InvalidAccessKeyId X-Git-Tag: v14.2.5~229^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F30651%2Fhead;p=ceph.git 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) --- 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(),