Security Token Service (STS) is responsible for the temporary access authorization of Alibaba Cloud accounts (primary account) and RAM users (sub-account).
The critial issue that both RAM and STS have resolved is how to securely grant access without leaking AccessKey (AK) of the primary account. Once the AK of the primary account is leaked, there is great risk that others can operate on all the resources of the primary account and steal important information. Using RAM and STS greatly improves management security and flexibility.
RAM provides an access control mechanism that is available permanently. This mechanism divides the primary accounts into many sub-accounts with defferent permissions granted. Even if information about one of the sub-account is leaked, information about the rest sub-accounts is still secure. For better maintenance, the RAM sub-accounts are avaiable permanently.
Instead of offering permanent access permissions like RAM, STS adopts a temporary solution by providing temporary AK and SecurityToken (Token). As a result, STS is often more rigorous and time constraint with less impact even after information leakage.
STS also applies to cross-account authorization. For details, see Cross-account resource access and authorization.
Note: STS is supported only by Java SDK 1.7.8.Final or above.
To use STS when sending or receiving messages via the API, fill out the properties below with your AK and Token.
Properties properties = new Properties();
// The AccessKeyId of STS
// The AccessKeySecret of STS
// The SecurityToken of STS