0002-00000074

更新时间:
复制 MD 格式

Problem description

The Signature field is missing from the signed URL in the request.

Causes

The request uses URL-based authentication, but the Signature field is absent from the URL parameters. A valid signed URL must include all three of the following query parameters:

ParameterDescription
OSSAccessKeyIdYour AccessKey ID
ExpiresUnix timestamp after which the URL is no longer valid
SignatureHMAC-SHA1 signature computed from your AccessKeySecret and request details

Examples

The following request is missing the Signature field:

GET /test.txt?OSSAccessKeyId=nz2p****&Expires=1141889120 HTTP/1.0
Date: Tue, 20 Dec 2022 08:48:18 GMT
Host: oss-example.oss-cn-hangzhou.aliyuncs.com

Solutions

Add the Signature field to the URL and make sure it is correctly computed. The following request includes a valid Signature:

GET /test.txt?OSSAccessKeyId=nz2p****&Expires=1141889120&Signature=vjbyPxybdZaNmGa%2ByT272YEAiv**** HTTP/1.0
Date: Tue, 20 Dec 2022 08:48:18 GMT
Host: oss-example.oss-cn-hangzhou.aliyuncs.com

To compute the Signature value:

Signature = urlencode(base64(hmac-sha1(AccessKeySecret,
            VERB + "\n"
            + CONTENT-MD5 + "\n"
            + CONTENT-TYPE + "\n"
            + EXPIRES + "\n"
            + CanonicalizedOSSHeaders
            + CanonicalizedResource)))

For the full signing specification, see Add signatures to URLs.

Note

We recommend using Alibaba Cloud SDKs to send requests. SDKs automatically compute signatures, so you do not need to calculate them manually. For more information, see Overview.