Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wip rgw aws4 #7720

Merged
merged 29 commits into from Feb 20, 2016
Merged

Wip rgw aws4 #7720

merged 29 commits into from Feb 20, 2016

Conversation

yehudasa
Copy link
Member

No description provided.

jmunhoz and others added 29 commits February 13, 2016 12:22
Amazon S3 supports Signature Version 4. This patch contains the minimal
implementation supporting AWS4 in RGW. It implements AWS4 authentication
on http methods without body content and vars not shipping in the
request query string.

Fixes: #10333

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Crafts the canonical query string. URI-encode each parameter name and
value properly.

Fixes: #10333

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Adds a new authorize function to identify/handle AWSv4 and AWSv2 auth
properly, handling common code, etc.

Fixes: #10333

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Fixes: #10333

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
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: #10333

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Fixes: #10333

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
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: #10333

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Fixes: #10333

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Fixes: #10333

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Fixes: #10333

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Verify content's sha256 sum matches the expected value.

Fixes: #10333

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
…dheaders

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

Fixes: #10333

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
…auth"

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
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 <jmunhoz@igalia.com>
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 <jmunhoz@igalia.com>
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 <jmunhoz@igalia.com>
Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
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 <jmunhoz@igalia.com>
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>

Conflicts:
	src/rgw/rgw_auth_s3.h
	src/rgw/rgw_client_io.cc
	src/rgw/rgw_client_io.h
	src/rgw/rgw_common.h
	src/rgw/rgw_main.cc
	src/rgw/rgw_op.cc
	src/rgw/rgw_op.h
	src/rgw/rgw_rest.cc
	src/rgw/rgw_rest_metadata.cc
	src/rgw/rgw_rest_s3.cc
@yehudasa yehudasa added the rgw label Feb 19, 2016
yehudasa added a commit that referenced this pull request Feb 20, 2016
rgw support for aws authentication v4 (Javier M. Mellid)
@yehudasa yehudasa merged commit c885801 into master Feb 20, 2016
@liewegas liewegas deleted the wip-rgw-aws4 branch November 23, 2016 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants