public abstract class AwsSignatureV4Constants extends Object
Modifier and Type | Field and Description |
---|---|
static String |
AMZ_ALGORITHM_HMAC_SHA256
This string identifies AWS Signature Version 4 (AWS4) and the HMAC-SHA256 algorithm (HMAC-SHA256).
|
static String |
AMZ_ALGORITHM_PARAM
For AWS Signature Version 4, you set this parameter value to "AWS4-HMAC-SHA256".
|
static String |
AMZ_CONTENT_SHA256_HEADER
AWS content sha256 header key
|
static String |
AMZ_CREDENTIAL_PARAM
In addition to your access key ID, this parameter also provides scope information identifying the region and
service for which the signature is valid.
|
static String |
AMZ_DATE_HEADER
AWS date header key
|
static String |
AMZ_DATE_PARAM
The date in ISO 8601 format, for example, 20130721T201207Z.
|
static String |
AMZ_DECODED_CONTENT_LENGTH_HEADER
'x-amz-decoded-content-length' is used to transmit the actual
|
static String |
AMZ_EXPIRES_PARAM
Provides the time period, in seconds, for which the generated presigned URL is valid.
|
static String |
AMZ_SECURITY_TOKEN_HEADER
AWS security token key
|
static String |
AMZ_SECURITY_TOKEN_PARAM
This header can be used in the following scenarios:
Provide security tokens for Amazon DevPay operations—Each request that uses Amazon DevPay requires two
x-amz-security-token headers: one for the product token and one for the user token.
|
static String |
AMZ_SIGNATURE_PARAM
X-Amz-Signature Provides the signature to authenticate your request.
|
static String |
AMZ_SIGNEDHEADERS_PARAM
Lists the headers that you used to calculate the signature.
|
static String |
AUTHORIZATION_HEADER
AWS authorization header key
|
static String |
CHUNK_SIGNATURE_HEADER |
static String |
CHUNK_STRING_TO_SIGN_PREFIX |
static String |
CLRF |
static String |
CONTENT_ENCODING_HEADER_AWS_CHUNKED
Content-Encoding
|
static byte[] |
FINAL_CHUNK |
static int |
SIGNATURE_LENGTH |
static String |
STREAMING_BODY_SHA256
SHA256 substitute marker used in place of x-amz-content-sha256 when
employing chunked uploads
|
static String |
UNSIGNED_PAYLOAD
You don't include a payload hash in the Canonical Request, because when you create a presigned URL,
|
public static final String AUTHORIZATION_HEADER
public static final String AMZ_CONTENT_SHA256_HEADER
public static final String AMZ_DATE_HEADER
public static final String AMZ_SECURITY_TOKEN_HEADER
public static final String AMZ_ALGORITHM_PARAM
public static final String AMZ_ALGORITHM_HMAC_SHA256
public static final String AMZ_CREDENTIAL_PARAM
This value should match the scope that you use to calculate the signing key, as discussed in the following section.
The general form for this parameter value is as follows:
<your-access-key-id>/<date>/<AWS-region>/<AWS-service>/aws4_request.
For example:
AKIAIOSFODNN7EXAMPLE/20130721/us-east-1/s3/aws4_request.
For Amazon S3, the AWS-service string is "s3". For a list of AWS-region strings, go to Regions and Endpoints
in the Amazon Web Services General Reference
public static final String AMZ_SECURITY_TOKEN_PARAM
public static final String AMZ_DATE_PARAM
public static final String AMZ_EXPIRES_PARAM
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).
A presigned URL can be valid for a maximum of seven days because the signing key you use in signature calculation is valid for up to seven days.
public static final String AMZ_SIGNEDHEADERS_PARAM
The HTTP host header is required. Any x-amz-* headers that you plan to add to the request are also required for signature calculation.
In general, for added security, you should sign all the request headers that you plan to include in your request.
public static final String AMZ_SIGNATURE_PARAM
This signature must match the signature Amazon S3 calculates; otherwise, Amazon S3 denies the request. For example, 733255ef022bec3f2a8701cd61d4b371f3f28c9f193a1f02279211d48d5193d7
public static final String UNSIGNED_PAYLOAD
you don't know anything about the payload. Instead, you use a constant string "UNSIGNED-PAYLOAD".
public static final String STREAMING_BODY_SHA256
public static final String CHUNK_STRING_TO_SIGN_PREFIX
public static final String CLRF
public static final String CHUNK_SIGNATURE_HEADER
public static final int SIGNATURE_LENGTH
public static final byte[] FINAL_CHUNK
public static final String CONTENT_ENCODING_HEADER_AWS_CHUNKED
Set the value to aws-chunked.
Amazon S3 supports multiple content encodings, for example,
Content-Encoding : aws-chunked, gzip
That is, you can specify your custom content-encoding when using Signature Version 4 streaming API.
public static final String AMZ_DECODED_CONTENT_LENGTH_HEADER
Copyright © 2009-2016 The Apache Software Foundation. All Rights Reserved.