Skip to content

rgw: remove v4 signature special cases - #47773

Closed
robbat2 wants to merge 1 commit into
ceph:mainfrom
robbat2:rjohnson/main-rgw-s3-v4
Closed

robbat2 wants to merge 1 commit into
ceph:mainfrom
robbat2:rjohnson/main-rgw-s3-v4

Conversation

@robbat2

@robbat2 robbat2 commented Aug 23, 2022

Copy link
Copy Markdown
Contributor

V4 Signatures can be used with "Transfer-Encoding: chunked", which is
not the same as AWS V4 CHUNK encoding.

TE:Chunked is not detected as empty payload in the present case, and
worked correctly if the operation was already in the large switch
statement. Other operations not in the switch statement were wrongly
rejected as NotImplemented, when they certainly were (e.g.
DeleteObject). TE:Chunked is important because it's a trivial transform
from HTTP/2 framing, opening the door to easier HTTP/2 functionality.

If this passes s3-tests, it should be backported to all active versions.

Signed-off-by: Robin H. Johnson [email protected]

V4 Signatures can be used with "Transfer-Encoding: chunked", which is
not the same as AWS V4 CHUNK encoding.

TE:Chunked is not detected as empty payload in the present case, and
worked correctly if the operation was already in the large switch
statement. Other operations not in the switch statement were wrongly
rejected as NotImplemented, when they certainly were (e.g.
DeleteObject). TE:Chunked is important because it's a trivial transform
from HTTP/2 framing, opening the door to easier HTTP/2 functionality.

Signed-off-by: Robin H. Johnson <[email protected]>
@robbat2
robbat2 requested a review from cbodley August 23, 2022 23:36
@github-actions github-actions Bot added the rgw label Aug 23, 2022
Comment thread src/rgw/rgw_rest_s3.cc
Comment on lines -5678 to -5679
ldpp_dout(s, 10) << "ERROR: AWS4 completion for operation: " << s->op_type << ", NOT IMPLEMENTED" << dendl;
throw -ERR_NOT_IMPLEMENTED;

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.

Other operations not in the switch statement were wrongly rejected as NotImplemented, when they certainly were (e.g. DeleteObject)

my interpretation of this switch statement is that it tracks the ops that call do_aws4_auth_completion(). we reject other ops where we haven't implemented this v4 auth completion

there are a bunch of s3 ops which we don't expect to contain a request body, and rgw replies after reading just their headers. maybe we could use a separate switch statement to track those, and perform their 'auth completion' here by comparing their exp_payload_hash against the empty hash e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855

an alternative is to add explicit calls to do_aws4_auth_completion() to more ops, so we can mark them as 'supported' in the existing switch

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.

an alternative is to add explicit calls to do_aws4_auth_completion() to more ops, so we can mark them as 'supported' in the existing switch

i raised #64569 as an example that adds coverage for the s3 DeleteObject op used in the reproducers from https://tracker.ceph.com/issues/71607#note-1

we don't have a general solution for this, but can address operations on a case-by-case basis

@github-actions

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 May 25, 2023
@mkll

mkll commented May 25, 2023

Copy link
Copy Markdown

Any progress on it?

@github-actions github-actions Bot removed the stale label May 25, 2023
@github-actions

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 Jul 24, 2023
@github-actions

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 Aug 23, 2023
@robbat2 robbat2 self-assigned this Jan 17, 2024
@LenzGr

LenzGr commented Jun 4, 2025

Copy link
Copy Markdown
Contributor

@robbat2 do you still intend to work on this?

@robbat2 robbat2 removed their assignment Jun 5, 2025
@robbat2

robbat2 commented Jun 5, 2025

Copy link
Copy Markdown
Contributor Author

@LenzGr somebody else should go fix it; afaik it's still a bug, but I don't get much time for Ceph anymore

@LenzGr

LenzGr commented Jun 9, 2025

Copy link
Copy Markdown
Contributor

@LenzGr somebody else should go fix it; afaik it's still a bug, but I don't get much time for Ceph anymore

Got it, no worries. Would you mind adding an issue to the bug tracker about this?

@robbat2

robbat2 commented Jun 9, 2025

Copy link
Copy Markdown
Contributor Author

@LenzGr filed as https://tracker.ceph.com/issues/71607

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.

4 participants