Skip to content

rgw/auth: correcting the error message to indicate - #55371

Merged
cbodley merged 1 commit into
ceph:mainfrom
pritha-srivastava:wip-rgw-correct-err-msg
Feb 11, 2024
Merged

cbodley merged 1 commit into
ceph:mainfrom
pritha-srivastava:wip-rgw-correct-err-msg

Conversation

@pritha-srivastava

@pritha-srivastava pritha-srivastava commented Jan 30, 2024 •

Copy link
Copy Markdown
Contributor

clearly that a pre-signed URL has expired.

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
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows
  • jenkins test rook e2e

@cbodley

cbodley commented Jan 30, 2024

Copy link
Copy Markdown
Contributor

dout messages only help if the user is also an admin that can look at rgw debug logs. it would be even better if we could add a Message to the xml Error response using s->err.message so clients could see the reason

this auth code doesn't have ready access to the req_state, so we'd have to do something else.. for example, add a special error code ERR_PRESIGNED_URL_EXPIRED to return there, then map that back to EPERM and add a message where we have a req_state

@pritha-srivastava

Copy link
Copy Markdown
Contributor Author

@cbodley : I can see that you have approved the PR, but you have additional comments, do you want those comments to be addressed as a part of this PR?

@mattbenjamin

Copy link
Copy Markdown
Contributor

@pritha-srivastava in this case, I agree with Casey--if the comment being addressed is, let's try to send back a human-readable message to the client

@mattbenjamin

Copy link
Copy Markdown
Contributor

(I asked for us to consider this in, iirc, gchat)

@pritha-srivastava

Copy link
Copy Markdown
Contributor Author

(I asked for us to consider this in, iirc, gchat)

It was in the bz, I probably misunderstood what you had to say

@cbodley

cbodley commented Jan 30, 2024

Copy link
Copy Markdown
Contributor

@cbodley : I can see that you have approved the PR, but you have additional comments, do you want those comments to be addressed as a part of this PR?

up to you guys. i approved the PR because it improves existing error messages, and is obviously correct - we could merge it without qa. but if you think the s->err.message changes are important, you can either follow up on that here or as a separate pr

@mattbenjamin

Copy link
Copy Markdown
Contributor

I'd say do it in this one, if it's not difficult, and I don't remember it being?

@pritha-srivastava

Copy link
Copy Markdown
Contributor Author

I'd say do it in this one, if it's not difficult, and I don't remember it being?

I'll do it in this PR

@cbodley

cbodley commented Jan 30, 2024

Copy link
Copy Markdown
Contributor

jenkins test make check

clearly that a pre-signed URL has expired.

Signed-off-by: Pritha Srivastava <[email protected]>
@cbodley

cbodley commented Feb 5, 2024

Copy link
Copy Markdown
Contributor

jenkins test make check

@cbodley

cbodley commented Feb 11, 2024

Copy link
Copy Markdown
Contributor

@cbodley
cbodley merged commit 0151e6a into ceph:main Feb 11, 2024
@cbodley

cbodley commented Feb 11, 2024 •

Copy link
Copy Markdown
Contributor

@pritha-srivastava do you think this is worth backports? if so, would you please create a tracker for it?

@cbodley : I have opened a tracker: https://github.com/ceph/ceph/pull/55371/files, what releases should I set for backport?

tobias-urdin added a commit to tobias-urdin/ceph that referenced this pull request Sep 25, 2024
We have special error handling for these cases but we
don't check the negative value of the error so it
instead gets caught as an error not defined with a
response and throws a http 500.

This was implement by [1] and the same way done
with [2].

[1] ceph#55371
[2] ceph#56044

Signed-off-by: Tobias Urdin <[email protected]>
neha-ojha pushed a commit that referenced this pull request Jun 27, 2026
We have special error handling for these cases but we
don't check the negative value of the error so it
instead gets caught as an error not defined with a
response and throws a http 500.

This was implement by [1] and the same way done
with [2].

[1] #55371
[2] #56044

Signed-off-by: Tobias Urdin <[email protected]>
(cherry picked from commit c01b5b1)
jrse pushed a commit to jrse/ceph that referenced this pull request Sep 25, 2026
We have special error handling for these cases but we
don't check the negative value of the error so it
instead gets caught as an error not defined with a
response and throws a http 500.

This was implement by [1] and the same way done
with [2].

[1] ceph#55371
[2] ceph#56044

Signed-off-by: Tobias Urdin <[email protected]>
(cherry picked from commit c01b5b1)
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.

3 participants