0002-00000409
Issue description
The date in the Credential field of the Authorization header does not match the request date.
Cause
You sent a request that uses an Amazon S3-compatible V4 signature. However, the date in the Credential field of the Authorization header does not match the request date.
Example Problem
In the following example, the date in the Credential part of the Authorization header does not match the request date.
GET /test.txt HTTP/1.0
Date: Tue, 20 Dec 2022 08:48:18 GMT
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Authorization:AWS4-HMAC-SHA256 Credential=LTAI****************/20130524/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=1
x-amz-content-sha256: abc***
x-amz-date: 20221220T084818Z
x-oss-s3-compat: true
The timestamp 20130524 in the Credential field of the Authorization request header does not match the timestamp 20221220T084818Z in the Date request header.
Solution
Ensure the Authorization field is complete and the date in the Credential part matches the request date. The following is a correct example:
GET /test.txt HTTP/1.0
Date: Tue, 20 Dec 2022 08:48:18 GMT
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Authorization:AWS4-HMAC-SHA256 Credential=LTAI****************/20221220/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=34****
x-amz-content-sha256: abc****
x-amz-date: 20221220T084818Z
x-oss-s3-compat: true
We recommend that you use Amazon S3 SDKs to initiate the request. For more information, see Use Amazon S3 SDKs to access OSS.