Problem description
The request uses S3-compatible authentication mode, but specifies the security token using the x-oss-security-token header instead of x-amz-security-token.
Causes
In S3-compatible authentication mode, the security token must be passed using the x-amz-security-token header. The x-oss-security-token header is not supported in S3-compatible mode.
Examples
The following request triggers this error because it uses x-oss-security-token:
GET /oss.jpg HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Fri, 24 Feb 2012 06:38:30 GMT
Authorization: AWS qn6q**************:77Dv****************
x-oss-s3-compat: true
x-oss-security-token: CAISowJ1q6Ft5B2yfSjIr5bgIOz31blR****Solutions
Replace x-oss-security-token with x-amz-security-token:
GET /oss.jpg HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Fri, 24 Feb 2012 06:38:30 GMT
Authorization: AWS qn6q**************:77Dv****************
x-oss-s3-compat: true
x-amz-security-token: CAISowJ1q6Ft5B2yfSjIr5bgIOz31blR****For more information, see Use Amazon S3 SDKs to access OSS.
该文章对您有帮助吗?