Project

General

Profile

Actions

Bug #62989

closed

s3test test_list_buckets_bad_auth fails with Keystone EC2

Added by Casey Bodley over 2 years ago. Updated 7 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
% Done:

0%

Source:
Backport:
pacific,quincy,reef
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Tags (freeform):
Fixed In:
v18.0.0-6497-g98cdc09608
Released In:
v19.2.0~1501
Upkeep Timestamp:
2025-07-14T19:09:53+00:00

Description

from teuthology run: http://qa-proxy.ceph.com/teuthology/cbodley-2023-09-25_17:25:06-rgw:tempest-main-distro-default-smithi/7402007/teuthology.log
associated rgw log: http://qa-proxy.ceph.com/teuthology/cbodley-2023-09-25_17:25:06-rgw:tempest-main-distro-default-smithi/7402007/remote/smithi083/log/rgw.ceph.client.0.log.gz

2023-09-25T17:57:58.766+0000 7f19e7847640  0 req 17314085603299168821 0.000000000s s3:list_buckets Secret string does not correctly sign payload, cache miss
2023-09-25T17:57:58.766+0000 7f19e7847640 20 req 17314085603299168821 0.000000000s s3:list_buckets found cached admin token
2023-09-25T17:57:58.766+0000 7f19e7847640 20 sending request to http://smithi083.front.sepia.ceph.com:5000/v3/s3tokens
2023-09-25T17:57:58.766+0000 7f19e7847640 20 register_request mgr=0x55e34cdaf440 req_data->id=1303, curl_handle=0x55e351ad5d20
2023-09-25T17:57:58.766+0000 7f19e7847640 20 WARNING: blocking http request
2023-09-25T17:57:58.766+0000 7f1a9d3c0640 20 link_request req_data=0x55e3517e6f00 req_data->id=1303, curl_handle=0x55e351ad5d20
2023-09-25T17:57:58.850+0000 7f19e7847640  2 req 17314085603299168821 0.083998606s s3:list_buckets s3 keystone: token validation ERROR: {"error":{"code":401,"message":"The request you have made requires authentication.","title":"Unauthorized"}}
":"172.21.15.83","user":"testx$tenanteduser.client.0","operation":"list_buckets","uri":"GET / HTTP/1.1","http_status":"200","error_code":"","bytes_sent":286,"bytes_received":0,"object_size":0,"total_time":123,"user_agent":"Boto3/1.24.96 Python/3.10.6 Linux/5.15.0-84-generic Botocore/1.27.96","referrer":"","trans_id":"tx000005cad476ef5a5d8be-006511ca25-1074-default","authentication_type":"Local","access_key_id":"NCTNZXHHCHGAZFMMCOEA","temp_url":false}9b8-44d2-87e2-4b0e54ad09d8.4214.229
2023-09-25T17:57:58.850+0000 7f19e7847640 20 req 17314085603299168821 0.083998606s s3:list_buckets rgw::auth::keystone::EC2Engine denied with reason=-1
...
2023-09-25T17:57:58.854+0000 7f19e7847640  5 req 17314085603299168821 0.087998547s s3:list_buckets error reading user info, uid=7f6fb8d9f45a4fdfb0e71907ca2ca1f0 can't authenticate
2023-09-25T17:57:58.854+0000 7f19e7847640 20 req 17314085603299168821 0.087998547s s3:list_buckets rgw::auth::s3::LocalEngine rejected with reason=-2028
2023-09-25T17:57:58.854+0000 7f19e7847640 20 req 17314085603299168821 0.087998547s s3:list_buckets rgw::auth::s3::AWSAuthStrategy rejected with reason=-2028
2023-09-25T17:57:58.854+0000 7f19e7847640  5 req 17314085603299168821 0.087998547s s3:list_buckets Failed the auth strategy, reason=-2028

because EC2Engine returns deny instead of reject, LocalEngine goes on to look for a local user with this access key and fails with ERR_INVALID_ACCESS_KEY

when looking up an access key in keystone's secret cache (https://github.com/ceph/ceph/blame/ad54514/src/rgw/rgw_auth_keystone.cc#L575-L582), we'll only use a cached secret if its signature matches the client's. but the test deliberately signs with the wrong secret key roflmao, so we never get to the point where we'd fail with SignatureDoesNotMatch


Related issues 4 (0 open4 closed)

Blocks rgw-testing - Bug #59424: run s3tests against keystone EC2ResolvedCasey Bodley

Actions
Copied to rgw - Backport #63043: pacific: s3test test_list_buckets_bad_auth fails with Keystone EC2ResolvedCasey BodleyActions
Copied to rgw - Backport #63044: quincy: s3test test_list_buckets_bad_auth fails with Keystone EC2ResolvedCasey BodleyActions
Copied to rgw - Backport #63045: reef: s3test test_list_buckets_bad_auth fails with Keystone EC2ResolvedCasey BodleyActions
Actions #1

Updated by Casey Bodley over 2 years ago

  • Status changed from New to Fix Under Review
  • Assignee set to Casey Bodley
  • Pull request ID set to 53680
Actions #2

Updated by Casey Bodley over 2 years ago

  • Blocks Bug #59424: run s3tests against keystone EC2 added
Actions #3

Updated by Casey Bodley over 2 years ago

  • Status changed from Fix Under Review to Pending Backport
Actions #4

Updated by Upkeep Bot over 2 years ago

  • Copied to Backport #63043: pacific: s3test test_list_buckets_bad_auth fails with Keystone EC2 added
Actions #5

Updated by Upkeep Bot over 2 years ago

  • Copied to Backport #63044: quincy: s3test test_list_buckets_bad_auth fails with Keystone EC2 added
Actions #6

Updated by Upkeep Bot over 2 years ago

  • Copied to Backport #63045: reef: s3test test_list_buckets_bad_auth fails with Keystone EC2 added
Actions #8

Updated by Casey Bodley over 2 years ago

additional fix merged in https://github.com/ceph/ceph/pull/53846, will include in backports

Actions #9

Updated by Upkeep Bot 9 months ago

  • Merge Commit set to 98cdc0960866fd2cfeca03a1cc77810f6911032f
  • Fixed In set to v18.0.0-6497-g98cdc096086
  • Released In set to v19.2.0~1501
  • Upkeep Timestamp set to 2025-07-09T16:09:25+00:00
Actions #10

Updated by Upkeep Bot 8 months ago

  • Fixed In changed from v18.0.0-6497-g98cdc096086 to v18.0.0-6497-g98cdc09608
  • Upkeep Timestamp changed from 2025-07-09T16:09:25+00:00 to 2025-07-14T19:09:53+00:00
Actions #11

Updated by Patrick Donnelly 7 months ago

  • Status changed from Pending Backport to Resolved
  • Backport changed from pacific quincy reef to pacific,quincy,reef
Actions

Also available in: Atom PDF