0002-00000108

更新时间:
复制 MD 格式

Problem description

The Signature field is missing from the Authorization request header.

Causes

The request uses a V2 signature (OSS2), but the Authorization header omits the required Signature field.

A valid V2 signature Authorization header must follow this format:

OSS2 AccessKeyId:<id>[,AdditionalHeaders:<headers>],Signature:<signature>

The header has two parts separated by a space:

  • Signature version — always OSS2

  • Signature information — key-value pairs separated by commas (,), each in key:value format

FieldRequiredDescription
AccessKeyIdYesYour AccessKey ID
SignatureYesThe computed signature value
AdditionalHeadersNoAdditional headers included in the signature

Examples

The following request uses a V2 signature but omits the required Signature field:

GET /oss.jpg HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Tue, 20 Dec 2022 08:48:18 GMT
Authorization: OSS2 AccessKeyId:44**07,AdditionalHeaders:host

The Signature field is missing. OSS rejects the request because it cannot validate the signature.

Solutions

Add the Signature field to the Authorization header:

GET /oss.jpg HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Tue, 20 Dec 2022 08:48:18 GMT
Authorization: OSS2 AccessKeyId:44**07,AdditionalHeaders:host,Signature:n7I**I0=

If the header format looks correct but requests still fail, check whether the signature value itself is wrong. If the server response includes a StringToSign parameter, compare its value with the string you computed locally before signing. A mismatch means the string-to-sign was constructed incorrectly, not just the header format.

References