This project is now read‑only. Starting Monday, February 2, please use Jira Cloud for all bug tracking management.
Bug 2402526 - RGW returns wrong HTTP status code for expired STS token
Summary: RGW returns wrong HTTP status code for expired STS token
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: RGW
Version: 9.1
Hardware: All
OS: All
unspecified
medium
Target Milestone: ---
: 9.0
Assignee: Pritha Srivastava
QA Contact: Yuva Teja Sree Gayam
Rivka Pollack
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-10-08 16:01 UTC by Anthony D'Atri
Modified: 2026-01-29 07:01 UTC (History)
6 users (show)

Fixed In Version: ceph-20.1.0-91
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2026-01-29 07:01:26 UTC
Embargoed:
rpollack: needinfo+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github ceph ceph pull 65847 0 None open rgw/sts: correct error code to 401 (from 403) 2025-10-09 06:19:45 UTC
Red Hat Issue Tracker RHCEPH-12310 0 None None None 2025-10-08 16:01:58 UTC
Red Hat Product Errata RHSA-2026:1536 0 None None None 2026-01-29 07:01:30 UTC

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


Note You need to log in before you can comment on or make changes to this bug.