Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
This project is now read‑only. Starting Monday, February 2, please use https://ibm-ceph.atlassian.net/ for all bug tracking management.

Bug 2402526

Summary: RGW returns wrong HTTP status code for expired STS token
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Anthony D'Atri <adatri>
Component: RGWAssignee: Pritha Srivastava <prsrivas>
Status: CLOSED ERRATA QA Contact: Yuva Teja Sree Gayam <ygayam>
Severity: medium Docs Contact: Rivka Pollack <rpollack>
Priority: unspecified    
Version: 9.1CC: ceph-eng-bugs, cephqe-warriors, mbenjamin, rpollack, tserlin, ygayam
Target Milestone: ---Flags: rpollack: needinfo+
Target Release: 9.0   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: ceph-20.1.0-91 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2026-01-29 07:01:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Anthony D'Atri 2025-10-08 16:01:31 UTC
Description of problem:

RGW returns wrong HTTP status code for expired STS token.


Version-Release number of selected component (if applicable):


How reproducible:

From the customer:

RGW is returning http 403 status code instead of returning 401 status code:
We've noticed when a STS token is expired the RGW is returning the wrong status code back, currently it looks like it returns a 403 but is should return a 401 status code since the credentials expired.
```
ceph-client.rgw.rgw.cephnode0438.jdbvbp.log:2025-03-05T17:44:34.195+0000 7f243be08640  0 req 11324914595151635225 0.000000000s s3:list_bucket ERROR: Token expired
ceph-client.rgw.rgw.cephnode0438.jdbvbp.log:2025-03-05T17:44:34.195+0000 7f243be08640  1 beast: 0x7f2405c99650: 17.155.209.182 - - [05/Mar/2025:17:44:34.195 +0000] "GET /swe-diaglogs-prod-acos-b1-us-east-1?list-type=2&delimiter=%2F&prefix=checkpoints%2F5b740509d79a31c4a48b045e38554bb5%2Fshared%2F&fetch-owner=false&max-keys=2 HTTP/1.1" 403 206 - "Hadoop 3.3.4, aws-sdk-java/1.12.779 Linux/5.4.144-16.el7pie OpenJDK_64-Bit_Server_VM/17.0.12+7-LTS java/17.0.12 kotlin/1.4.10 vendor/Apple_Inc. cfg/retry-mode/legacy cfg/auth-source#unknown" - latency=0.000000000s
ceph-client.rgw.rgw.cephnode0438.jdbvbp.log:2025-03-05T17:44:34.229+0000 7f248569b640  0 req 12402845197639486671 0.000000000s s3:get_obj ERROR: Token expired
ceph-client.rgw.rgw.cephnode0438.jdbvbp.log:2025-03-05T17:44:34.229+0000 7f248569b640  1 beast: 0x7f2405c99650: 17.155.209.182 - - [05/Mar/2025:17:44:34.229 +0000] "HEAD /swe-diaglogs-prod-acos-b1-us-east-1/checkpoints/job-result-store/gulch-qualified-iquej/1b95678a-bd9c-4217-a6e4-63b5c05d0a15/5b740509d79a31c4a48b045e38554bb5.json HTTP/1.1" 403 0 - "Hadoop 3.3.4, aws-sdk-java/1.12.779 Linux/5.4.144-16.el7pie OpenJDK_64-Bit_Server_VM/17.0.12+7-LTS java/17.0.12 kotlin/1.4.10 vendor/Apple_Inc. cfg/retry-mode/legacy cfg/auth-source#unknown" - latency=0.000000000s
ceph-client.rgw.rgw.cephnode0438.jdbvbp.log:2025-03-05T17:44:34.232+0000 7f24e1f54640  0 req 1415287706486596062 0.001000000s s3:list_bucket ERROR: Token expired
ceph-client.rgw.rgw.cephnode0438.jdbvbp.log:2025-03-05T17:44:34.232+0000 7f24e1f54640  1 beast: 0x7f2405c99650: 17.155.209.182 - - [05/Mar/2025:17:44:34.231 +0000] "GET /swe-diaglogs-prod-acos-b1-us-east-1?delimiter=%2F&max-keys=2&prefix=checkpoints%2Fjob-result-store%2Fgulch-qualified-iquej%2F1b95678a-bd9c-4217-a6e4-63b5c05d0a15%2F5b740509d79a31c4a48b045e38554bb5.json%2F&fetch-owner=false&list-type=2 HTTP/1.1" 403 206 - "Hadoop 3.3.4, aws-sdk-java/1.12.779 Linux/5.4.144-16.el7pie OpenJDK_64-Bit_Server_VM/17.0.12+7-LTS java/17.0.12 kotlin/1.4.10 vendor/Apple_Inc. cfg/retry-mode/legacy cfg/auth-source#unknown" - latency=0.001000000s
ceph-client.rgw.rgw.cephnode0438.jdbvbp.log:2025-03-05T17:44:34.360+0000 7f24d1733640  1 beast: 0x7f2405d9b650: 17.155.210.19 - rtr_66a17ab7f25bf76ec1fa3c67$rtr_66a17ab7f25bf76ec1fa3c67 [05/Mar/2025:17:44:34.359 +0000] "HEAD /root-bucket-0/36318-6555374801-daol-129/0-a1-tsew-su-ycnetal-1-tsae-su-dorp-sot/0/0/0/91 HTTP/1.1" 404 0 - - - latency=0.001000000s
```
I've noticed a previous bug reported as well https://tracker.ceph.com/issues/22223 that might be related.


Steps to Reproduce:
1.
2.
3.

Actual results:

403
Expected results:
401

Additional info:

Comment 10 errata-xmlrpc 2026-01-29 07:01:26 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: Red Hat Ceph Storage 9.0 Security and Enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2026:1536