Skip to content

rgw: AWS4 authentication minimal support - #4943

Merged
yehudasa merged 28 commits into
ceph:masterfrom
jmunhoz:wip-aws4
Feb 20, 2016
Merged

yehudasa merged 28 commits into
ceph:masterfrom
jmunhoz:wip-aws4

Conversation

@jmunhoz

@jmunhoz jmunhoz commented Jun 12, 2015

Copy link
Copy Markdown
Contributor

Amazon S3 supports Signature Version 4. This patch contains the minimal
implementation supporting AWS4 in radosgw. It implements AWS4
authentication on http methods without body content and vars not
shipping in the request query string.

Related: #10333

Signed-off-by: Javier M. Mellid [email protected]

@jmunhoz jmunhoz closed this Jun 15, 2015
@jmunhoz
jmunhoz deleted the wip-aws4 branch June 15, 2015 14:53
@jmunhoz
jmunhoz restored the wip-aws4 branch June 15, 2015 15:08
@yehudasa

Copy link
Copy Markdown
Member

@jmunhoz any reason why you closed the pull request?

@jmunhoz
jmunhoz deleted the wip-aws4 branch June 15, 2015 15:14
@jmunhoz

jmunhoz commented Jun 15, 2015

Copy link
Copy Markdown
Contributor Author

@yehudasa I removed my remote wip-aws4 before pushing my new local and rebased wip-aws4 with all changes included and I found github closed the pull-request. I guess I will have to create a new pull request? Sorry, I was not expecting this behaviour in github.

@jmunhoz

jmunhoz commented Jun 15, 2015

Copy link
Copy Markdown
Contributor Author

@yehudasa reopening the pull request.

@jmunhoz jmunhoz reopened this Jun 15, 2015
@jmunhoz

jmunhoz commented Jun 15, 2015

Copy link
Copy Markdown
Contributor Author

@yehudasa It looks I could reopen the pull request successfully. I checked all our comments are in place and the new commit taking care of your comments is available too.

@jmunhoz

jmunhoz commented Jun 15, 2015

Copy link
Copy Markdown
Contributor Author

@yehudasa Apologies for messing up the PR.You can see the old comments at
jmunhoz@96f6f6f

@yehudasa

Copy link
Copy Markdown
Member

@jmunhoz no worries

@jmunhoz

jmunhoz commented Jun 26, 2015

Copy link
Copy Markdown
Contributor Author

@yehudasa pull request updated with the missing bits. whole feature uploaded.

@yehudasa

Copy link
Copy Markdown
Member

@jmunhoz sorry for not completing review, didn't forget about it!

@jmunhoz

jmunhoz commented Jul 10, 2015

Copy link
Copy Markdown
Contributor Author

@yehudasa don't worry, thanks for the update!

@yehudasa yehudasa self-assigned this Aug 24, 2015
@yehudasa

Copy link
Copy Markdown
Member

@jmunhoz I will try to take a closer look at it this week

@jmunhoz

jmunhoz commented Aug 25, 2015

Copy link
Copy Markdown
Contributor Author

@yehudasa thanks!

@jmunhoz

jmunhoz commented Sep 10, 2015

Copy link
Copy Markdown
Contributor Author

@yehudasa I will try that approach. thanks

@jmunhoz

jmunhoz commented Sep 25, 2015

Copy link
Copy Markdown
Contributor Author

@yehudasa I added a new commit to validate the requests with body following one streaming approach as suggested. Now, it doesn't read the whole thing in memory to validate it. I rebased the the whole tree to keep the sources up to date too.

jmunhoz and others added 24 commits February 13, 2016 12:25
When computing V4 signature, we need to encode the query string. But it
could come already encoded, at least partially.

So do not encode the entities that are already encoded.

Fixes: ceph#10333

Signed-off-by: Javier M. Mellid <[email protected]>
Handle AWS4 auth on requests with positive content-length. It splits the
auth process along several steps to process the body content on the fly
instead of reading the whole body in memory. After that, it completes
the delayed AWS4 auth properly.

Requests with content-length <= 0 are validated as usual. They don't
require any kind of completion.

Requests with content-length > 0 use a streaming approach together with
a completion step.

Fixes: ceph#10333

Signed-off-by: Javier M. Mellid <[email protected]>
Fixes: ceph#10333

Signed-off-by: Javier M. Mellid <[email protected]>
Fixes: ceph#10333

Signed-off-by: Javier M. Mellid <[email protected]>
Verify content's sha256 sum matches the expected value.

Fixes: ceph#10333

Signed-off-by: Javier M. Mellid <[email protected]>
…dheaders

This patch gets the same error response in S3 and RGW when the error is related
to the signedheaders processing.

Fixes: ceph#10333

Signed-off-by: Javier M. Mellid <[email protected]>
Signed-off-by: Javier M. Mellid <[email protected]>
Provides the time period, in seconds, for which the generated presigned URL is
valid. For example, 86400 (24 hours). This value is an integer. The minimum
value you can set is 1, and the maximum is 604800 (seven days).

Signed-off-by: Javier M. Mellid <[email protected]>
Protect against reuse of the signed portions of the request. In AWS, the signed
portions (using AWS Signatures) of requests are valid within 15 minutes of the
timestamp in the request.

Signed-off-by: Javier M. Mellid <[email protected]>
The X-Amz-Credential value in the URL shows the "/" character only for
readability. In practice, it should be encoded as %2F

Signed-off-by: Javier M. Mellid <[email protected]>
Fix pending conflicts after massive merging. It catches up with SLO, bucket
website, bulk deletes and payment request features.

Signed-off-by: Javier M. Mellid <[email protected]>
@jmunhoz

jmunhoz commented Feb 14, 2016

Copy link
Copy Markdown
Contributor Author

@yehudasa fixed

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