0002-00000235

更新时间:
复制 MD 格式

Problem description

A request to access an OSS object using a V4 signed URL fails because the request time is not within the URL's validity period.

Causes

The time at which the request is sent is earlier than the start time specified by x-oss-date in the signed URL. OSS rejects the request because it arrives before the validity window opens.

Examples

The signed URL sets a start time of 20231220T083018Z via x-oss-date, but the request is sent at 20231220T081516Z—about 15 minutes and 2 seconds before the validity period begins.

GET /oss.jpg?x-oss-additional-headers=host&x-oss-credential=accesskeyid%2F20231203%2Fcn-hangzhou%2Foss%2Faliyun_v4_request&x-oss-date=20231220T083018Z&x-oss-expires=86400&x-oss-signature=2c6****&x-oss-signature-version=OSS4-HMAC-SHA256
Host: oss-example.oss-cn-hangzhou.aliyuncs.com

Solutions

Make sure the request time is within the signed URL's validity period. The request time must be no earlier than 15 minutes before the time specified by x-oss-date.

For example, if x-oss-date is 20231220T083018Z, the earliest allowed request time is 20231220T081518Z.

References

For details on V4 signed URL parameters including x-oss-date, see Include a V4 signature in a URL (recommended).