Skip to content

rgw/sts: correct error code to 400 (from 403) - #65847

Merged
cbodley merged 1 commit into
ceph:mainfrom
pritha-srivastava:wip-rgw-sts-expired-creds
Mar 25, 2026
Merged

cbodley merged 1 commit into
ceph:mainfrom
pritha-srivastava:wip-rgw-sts-expired-creds

Conversation

@pritha-srivastava

@pritha-srivastava pritha-srivastava commented Oct 9, 2025 •

Copy link
Copy Markdown
Contributor

for expires sts credentials.

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

@pritha-srivastava
pritha-srivastava requested a review from a team as a code owner October 9, 2025 06:10
@github-actions github-actions Bot added the rgw label Oct 9, 2025
@pritha-srivastava
pritha-srivastava force-pushed the wip-rgw-sts-expired-creds branch from 588c735 to 8b8ce94 Compare October 9, 2025 06:17
@pritha-srivastava

Copy link
Copy Markdown
Contributor Author

jenkins test windows

@cbodley cbodley left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i was hoping that EPERM would already do the right thing, but i see that only swift maps it to '401 Unauthorized' while s3 maps it to 403. i wonder if any other uses of EPERM in rgw_rest_s3.cc should map to 401 too?

the mappings in rgw_common.cc:

rgw_http_errors rgw_http_s3_errors({
...
    { EACCES, {403, "AccessDenied" }},
    { EPERM, {403, "AccessDenied" }},
...
rgw_http_errors rgw_http_swift_errors({
    { EACCES, {403, "AccessDenied" }},
    { EPERM, {401, "AccessDenied" }},

Comment thread src/rgw/rgw_common.cc Resolved
@cbodley

cbodley commented Oct 9, 2025

Copy link
Copy Markdown
Contributor

needs to be tested against ceph/s3-tests#700 for qa

@ivancich

Copy link
Copy Markdown
Member

@pritha-srivastava, It doesn't appear as though the testing was updated to reflect these changes. In @anrao19 's QE run with this PR we're getting this error:

2025-10-17T17:32:52.085 INFO:teuthology.orchestra.run.smithi162.stdout:>       assert s3bucket_error == 'AccessDenied'
2025-10-17T17:32:52.085 INFO:teuthology.orchestra.run.smithi162.stdout:E       AssertionError: assert 'UnauthorizedRequest' == 'AccessDenied'
2025-10-17T17:32:52.085 INFO:teuthology.orchestra.run.smithi162.stdout:E
2025-10-17T17:32:52.085 INFO:teuthology.orchestra.run.smithi162.stdout:E         - AccessDenied
2025-10-17T17:32:52.085 INFO:teuthology.orchestra.run.smithi162.stdout:E         + UnauthorizedRequest

I'm removing the needs-qa label so this can be addressed.

Teuthology log: https://qa-proxy.ceph.com/teuthology/anuchaithra-2025-10-17_14:08:09-rgw-wip-anrao5-testing-2025-10-16-2222-distro-default-smithi/8558359/teuthology.log

QE tracker: https://tracker.ceph.com/issues/73576

@pritha-srivastava

Copy link
Copy Markdown
Contributor Author

@ivancich : I am still waiting to figure out what the correct error code should be here, so this can be left out from the qe jobs as of now. I will test it later when I am sure of the error code.

@cbodley

cbodley commented Nov 12, 2025

Copy link
Copy Markdown
Contributor

@cbodley

cbodley commented Nov 12, 2025

Copy link
Copy Markdown
Contributor

jenkins test make check arm64

@github-actions github-actions Bot added the tests label Nov 13, 2025
@pritha-srivastava
pritha-srivastava force-pushed the wip-rgw-sts-expired-creds branch 2 times, most recently from 7a8361c to 18c624a Compare November 14, 2025 04:54
@pritha-srivastava pritha-srivastava changed the title rgw/sts: correct error code to 401 (from 403) rgw/sts: correct error code to 400 (from 403) Nov 14, 2025
@pritha-srivastava
pritha-srivastava force-pushed the wip-rgw-sts-expired-creds branch from 18c624a to aadf20b Compare November 26, 2025 05:41
@pritha-srivastava
pritha-srivastava force-pushed the wip-rgw-sts-expired-creds branch from aadf20b to 8d0ae97 Compare December 8, 2025 09:25
@github-actions

github-actions Bot commented Feb 6, 2026

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@github-actions github-actions Bot added the stale label Feb 6, 2026
@github-actions

github-actions Bot commented Mar 8, 2026

Copy link
Copy Markdown

This pull request has been automatically closed because there has been no activity for 90 days. Please feel free to reopen this pull request (or open a new one) if the proposed change is still appropriate. Thank you for your contribution!

@github-actions github-actions Bot closed this Mar 8, 2026
@github-actions github-actions Bot removed the stale label Mar 20, 2026
@pritha-srivastava
pritha-srivastava force-pushed the wip-rgw-sts-expired-creds branch from 8d0ae97 to eb2d634 Compare March 23, 2026 05:23
@pritha-srivastava

pritha-srivastava commented Mar 24, 2026 •

Copy link
Copy Markdown
Contributor Author

https://qa-proxy.ceph.com/teuthology/prsrivas-2026-03-23_11:08:35-rgw:sts-wip-rgw-sts-expired-creds-distro-default-trial/117270/teuthology.log

checked force-branch is set to:

force-branch: wip-rgw-sts-expired-creds
git_remote: https://github.com/pritha-srivastava/

the test has passed:

2026-03-23T12:19:07.389 INFO:teuthology.orchestra.run.trial009.stdout:s3tests_boto3/functional/test_sts.py::test_assume_role_creds_expiry PASSED [ 96%]
2026-03-23T12:19:07.781 INFO:teuthology.orchestra.run.trial009.stdout:s3tests_boto3/functional/test_sts.py::test_assume_role_deny_head_nonexistent PASSED [ 96%]

@ivancich @cbodley : the PR is ready to be merged

@pritha-srivastava
pritha-srivastava force-pushed the wip-rgw-sts-expired-creds branch from eb2d634 to a0a3395 Compare March 24, 2026 04:14
@pritha-srivastava

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@pritha-srivastava

Copy link
Copy Markdown
Contributor Author

jenkins test make check arm64

@pritha-srivastava

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@pritha-srivastava

pritha-srivastava commented Mar 24, 2026 •

Copy link
Copy Markdown
Contributor Author

A variety of errors happened during make check arm64:

  4 - run-tox-mgr (Failed)
	 19 - run-tox-python-common (Failed)

A bunch of cephadm tests have failed
A no directory error etc

@pritha-srivastava

Copy link
Copy Markdown
Contributor Author

same for make check also

@pritha-srivastava

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@pritha-srivastava

Copy link
Copy Markdown
Contributor Author

jenkins test make check arm64

@cbodley

cbodley commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

A variety of errors happened during make check arm64:

#67954 just merged for that 🤞

@cbodley

cbodley commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

jenkins test make check

@cbodley

cbodley commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

jenkins test make check arm64

@jmundack

Copy link
Copy Markdown
Contributor

do we have a tracker for this? (that we can use to backport to tentacle and squid)

@cbodley

cbodley commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

from the commit message:

Fixes: https://tracker.ceph.com/issues/73441

i updated the backports there, thanks

@pritha-srivastava
pritha-srivastava force-pushed the wip-rgw-sts-expired-creds branch from a0a3395 to a6d1cba Compare March 25, 2026 03:46
@pritha-srivastava

Copy link
Copy Markdown
Contributor Author

make check arm64 has passed after the rebase, but I still see errors in make check:
/ceph/src/script/lib-build.sh: line 67: cd: build: No such file or directory

File "/ceph/src/pybind/mgr/dashboard/.tox/py3/lib/python3.10/site-packages/cheroot/server.py", line 1844, in start
    self.prepare()
  File "/ceph/src/pybind/mgr/dashboard/.tox/py3/lib/python3.10/site-packages/cheroot/server.py", line 1799, in prepare
    raise socket.error(msg)
OSError: No socket could be created -- (('127.0.0.1', 54583): [Errno 98] Address already in use)
The following tests FAILED:
	  7 - run-tox-mgr-dashboard-py3 (Failed)

@pritha-srivastava

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@pritha-srivastava

Copy link
Copy Markdown
Contributor Author

@cbodley : all checks have passed, please merge the PR

@cbodley
cbodley merged commit f365392 into ceph:main Mar 25, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants