@@ -8,46 +8,32 @@ user. RGW supports canned ACLs.
88
99Authentication
1010--------------
11- Authenticating a request requires including an access key and a Hash-based
12- Message Authentication Code (HMAC) in the request before it is sent to the
13- RGW server. RGW uses an S3-compatible authentication approach.
11+ Requests are authenticated with AWS Signatures which are derived from the
12+ user's credentials (S3 access key and secret key).
1413
15- ::
14+ Most S3 clients and AWS SDKs will generate these signatures for you, given the
15+ necessary credentials. When issuing raw http requests, these signatures must be
16+ added manually.
1617
17- HTTP/1.1
18- PUT /buckets/bucket/object.mpeg
19- Host: cname.domain.com
20- Date: Mon, 2 Jan 2012 00:01:01 +0000
21- Content-Encoding: mpeg
22- Content-Length: 9999999
18+ AWS Signature v4
19+ ^^^^^^^^^^^^^^^^
2320
24- Authorization: AWS {access-key}:{hash-of-header-and-secret}
21+ Please refer to the official documentation in ` Authenticating Requests ( AWS Signature Version 4) `_.
2522
26- In the foregoing example, replace ``{access-key} `` with the value for your access
27- key ID followed by a colon (``: ``). Replace ``{hash-of-header-and-secret} `` with
28- a hash of the header string and the secret corresponding to the access key ID.
23+ The following values of the `x-amz-content-sha256 ` request header are supported:
2924
30- To generate the hash of the header string and secret, you must:
25+ * Actual payload checksum value
26+ * `UNSIGNED-PAYLOAD `
27+ * `STREAMING-UNSIGNED-PAYLOAD-TRAILER `
28+ * `STREAMING-AWS4-HMAC-SHA256-PAYLOAD `
29+ * `STREAMING-AWS4-HMAC-SHA256-PAYLOAD-TRAILER `
3130
32- #. Get the value of the header string.
33- #. Normalize the request header string into canonical form.
34- #. Generate an HMAC using a SHA-1 hashing algorithm.
35- See `RFC 2104 `_ and `HMAC `_ for details.
36- #. Encode the ``hmac `` result as base-64.
31+ AWS Signature v2
32+ ^^^^^^^^^^^^^^^^
3733
38- To normalize the header into canonical form:
34+ Please refer to the official documentation in ` Authenticating Requests (AWS Signature Version 2) `_.
3935
40- #. Get all fields beginning with ``x-amz- ``.
41- #. Ensure that the fields are all lowercase.
42- #. Sort the fields lexicographically.
43- #. Combine multiple instances of the same field name into a
44- single field and separate the field values with a comma.
45- #. Replace white space and line breaks in field values with a single space.
46- #. Remove white space before and after colons.
47- #. Append a new line after each field.
48- #. Merge the fields back into the header.
49-
50- Replace the ``{hash-of-header-and-secret} `` with the base-64 encoded HMAC string.
36+ .. note :: While v2 signatures have been deprecated in AWS, RGW continues to support them.
5137
5238Authentication against OpenStack Keystone
5339-----------------------------------------
@@ -231,5 +217,5 @@ play. This is one of the many reasons that you should use S3 bucket
231217policies rather than S3 ACLs when possible.
232218
233219
234- .. _ RFC 2104 : http ://www.ietf.org/rfc/rfc2104.txt
235- .. _ HMAC : https://en.wikipedia.org/wiki/HMAC
220+ .. _ Authenticating Requests (AWS Signature Version 4) : https ://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html
221+ .. _ Authenticating requests (AWS signature version 2) : https://docs.aws.amazon.com/AmazonS3/latest/userguide/auth-request-sig-v2.html
0 commit comments