]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: ldap auth: S3 auth failure should return InvalidAccessKeyId 30652/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:09 +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 9413a7b3dcb9773f7350b68d049792de02cc0021..49cbb8f3ed93324a4c455e762c36df8aac69c0c9 100644 (file)
@@ -4251,7 +4251,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(),