Skip to content

Commit 543fd10

Browse files
Revert "rgw/auth: Fix the return code returned by AuthStrategy,"
This reverts commit 6f7ef86. the above fix introduced regression for ec2 auth when rgw_s3_auth_order has local before external. fixes: https://tracker.ceph.com/issues/68393 Signed-off-by: Pritha Srivastava <[email protected]>
1 parent c5eacfc commit 543fd10

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/rgw/rgw_auth.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ strategy_handle_rejected(rgw::auth::Engine::result_t&& engine_result,
377377

378378
case Control::FALLBACK:
379379
/* Don't try next. */
380-
return std::make_pair(false, std::move(engine_result));
380+
return std::make_pair(false, std::move(strategy_result));
381381

382382
default:
383383
/* Huh, memory corruption? */

src/rgw/rgw_rest_s3.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6466,7 +6466,7 @@ rgw::auth::s3::LocalEngine::authenticate(
64666466
if (driver->get_user_by_access_key(dpp, access_key_id, y, &user) < 0) {
64676467
ldpp_dout(dpp, 5) << "error reading user info, uid=" << access_key_id
64686468
<< " can't authenticate" << dendl;
6469-
return result_t::reject(-ERR_INVALID_ACCESS_KEY);
6469+
return result_t::deny(-ERR_INVALID_ACCESS_KEY);
64706470
}
64716471
//TODO: Uncomment, when we have a migration plan in place.
64726472
/*else {
@@ -6488,7 +6488,7 @@ rgw::auth::s3::LocalEngine::authenticate(
64886488
const auto iter = user->get_info().access_keys.find(access_key_id);
64896489
if (iter == std::end(user->get_info().access_keys)) {
64906490
ldpp_dout(dpp, 0) << "ERROR: access key not encoded in user info" << dendl;
6491-
return result_t::reject(-EPERM);
6491+
return result_t::deny(-EPERM);
64926492
}
64936493
const RGWAccessKey& k = iter->second;
64946494

@@ -6512,7 +6512,7 @@ rgw::auth::s3::LocalEngine::authenticate(
65126512
ldpp_dout(dpp, 15) << "compare=" << compare << dendl;
65136513

65146514
if (compare != 0) {
6515-
return result_t::reject(-ERR_SIGNATURE_NO_MATCH);
6515+
return result_t::deny(-ERR_SIGNATURE_NO_MATCH);
65166516
}
65176517

65186518
auto apl = apl_factory->create_apl_local(

0 commit comments

Comments
 (0)