]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: ldap auth: S3 auth failure should return InvalidAccessKeyId 30651/head
authorMatt Benjamin <mbenjamin@redhat.com>
Wed, 11 Sep 2019 17:22:26 +0000 (13:22 -0400)
committerPrashant D <pdhange@redhat.com>
Tue, 1 Oct 2019 00:21:40 +0000 (20:21 -0400)
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 <mbenjamin@redhat.com>
(cherry picked from commit 226227cf2d825b3414b7522a9f738180142f3956)

src/rgw/rgw_rest_s3.cc

index 60e5cbd42fab08bf2a20bab53aed8175a58b3bfb..115a2e80a3b8ecab9705595dd8f5bc4d763d7c37 100644 (file)
@@ -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(),