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: trueSolutions
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: trueTo avoid signing errors, use Amazon S3 SDKs to sign and send requests. For setup instructions, see Use Amazon S3 SDKs to access OSS.
该文章对您有帮助吗?