0002-00000003
Problem description
You sent a request using an AccessKey ID from the Security Token Service (STS), but did not use the STS authentication method.
Causes
You used an AccessKey ID from STS, but did not include the SecurityToken field in the request to specify the STS authentication method.
Example problem
-
You sent a request using a signed URL with an STS AccessKey ID, but the URL does not include the
security-tokenfield. -
You sent a request using a signed header with an STS AccessKey ID, but the request does not include the
x-oss-security-tokenheader.
Solution
Follow these steps to send a request using STS authentication:
-
Obtain temporary access credentials by calling the AssumeRole operation or using an STS software development kit (SDK).
Temporary access credentials include a temporary AccessKey pair, which consists of an AccessKey ID and an AccessKey secret, and a security token. For more information about how to obtain temporary access credentials, see Use temporary access credentials from STS to access OSS.
-
Send a request that uses STS authentication with an SDK or by calling a REST API operation. For example:
https://examplebucket.oss-cn-hangzhou.aliyuncs.com/oss-api.pdf?OSSAccessKeyId=STS.****************&Expires=1141889120&Signature=vjby****************************&security-token=CAISowJ1q6Ft5B2yfSjIr5bgIOz31blR9oWmWBfCs3kDR/xm3Imc1zz2IHxMdHJsCeAcs/Q0lGFR5/sflqJIRoReREvCUcZr8szfWcsZos2T1fau5Jko1be0ewHKeQKZsebWZ+LmNpy/Ht6md1HDkAJq3LL+bk/Mdle5MJqP+/kFC9MMRVuAcCZhDtVbLRcYgq18D3bKMuu3ORPHm3fZCFES2jBxkmRi86+ysIP+phPVlw/90fRH5dazcJW0Zsx0OJo6Wcq+3+FqM6DQlTNM6hwNtoUO1fYUommb54nDXwQIvUjfbtC5qIM/cFVLAYEhALNBofTGkvl1h/fejYyfyWwWYbkFCHiPFNr9kJCUSbr4a4sjF6zyPnPWycyCLYXleLzhxPWd/2kagAGaXG69BqwYNvrKKI3W8weP3bNc1wQDMXQfiHpFCRG6lYhh3iXFtpwH90A3sTlxzRGvi8+9p63JwrluOHWs+Fj6S6s0cOhKvKRWYE8UuWeXIvv4l6DAGwHDE8BLjLC11f5prUJgI2wb+3hwuBod32Jx+us/1p996Glao725orcb****