0002-00000407

更新时间:
复制 MD 格式

Problem description

The Signature field is missing from the Authorization header in an Amazon S3-compatible V4 signature request.

Causes

The Authorization header for Amazon S3-compatible V4 signature requests must include three comma-separated fields: Credential, SignedHeaders, and Signature. If the Signature field is absent, OSS rejects the request.

Examples

The following request triggers this error. The Authorization header ends after SignedHeaders, with no Signature field:

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
x-amz-content-sha256: abc****
x-amz-date: 20221220T084818Z
x-oss-s3-compat: true

Solutions

Make sure that the Authorization header is complete and correctly calculated, including the Signature field. A complete header looks like this:

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

To avoid signing errors, use Amazon S3 SDKs to sign and send requests. For setup instructions, see Use Amazon S3 SDKs to access OSS.