Skip to content

Commit 98cdc09

Browse files
authored
Merge pull request ceph#53680 from cbodley/wip-62989
rgw/keystone: EC2Engine uses reject() for ERR_SIGNATURE_NO_MATCH Reviewed-by: Daniel Gryniewicz <[email protected]>
2 parents 123c607 + 71b2070 commit 98cdc09

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/rgw/rgw_auth_keystone.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -682,6 +682,12 @@ rgw::auth::Engine::result_t EC2Engine::authenticate(
682682
get_access_token(dpp, access_key_id, string_to_sign,
683683
signature, signature_factory, y);
684684
if (! t) {
685+
if (failure_reason == -ERR_SIGNATURE_NO_MATCH) {
686+
// we looked up a secret but it didn't generate the same signature as
687+
// the client. since we found this access key in keystone, we should
688+
// reject the request instead of trying other engines
689+
return result_t::reject(failure_reason);
690+
}
685691
return result_t::deny(failure_reason);
686692
}
687693

0 commit comments

Comments
 (0)