0002-00000002
Problem description
Temporary access credentials obtained from Security Token Service (STS) are used in the request for authentication. However, the AccessKey ID specified in the request does not exist.
Causes
-
Temporary access credentials obtained from STS are used in the request for authentication. However, the AccessKey ID specified in the request is invalid.
-
The AccessKey ID of a RAM user is used in the request for authentication. However, the SecurityToken parameter is specified in the request. Therefore, OSS authenticates the request based on STS credentials and finds that the AccessKey ID is inconsistent with the AccessKey ID obtained from STS.
-
The AccessKey ID has expired.
Examples
-
Temporary access credentials obtained from STS are used in the request for authentication. However, the AccessKey ID specified in the request is the AccessKey ID of a RAM user instead of the AccessKey ID obtained from STS.
-
You want to authenticate the request as a RAM user, but include the
security-tokenfield in the signed URL or thex-oss-security-tokenfield in the request headers. This causes OSS to authenticate the request based on credentials obtained from STS. -
You use the AccessKey ID obtained from STS to initiate a request, but the AccessKey ID has expired.
Solutions
-
Make sure that the AccessKey ID specified in the request is consistent with the AccessKey ID obtained from STS. For more information, see Use temporary credentials provided by STS to access OSS.
-
To use the credentials of a RAM user in a request for authentication, make sure that no security token is specified in the request when you initiate the request by using OSS SDKs or signed URLs. To do so, do not include the
security-tokenfield as a parameter in the URL, or do not include thex-oss-security-tokenfield in the request headers. For more information, see Use the AccessKey pair of a RAM user to initiate a request. -
Obtain new temporary access credentials from STS. For more information, see Use temporary credentials provided by STS to access OSS.