Note
- For V4.3.x, this parameter is available starting with V4.3.5.
- For V4.2.x, this parameter is available starting with V4.2.5.
Description
The sts_credential parameter specifies the credentials for accessing the STS service provided by OCP. When a user tenant or system tenant accesses an object storage service by using the Assume Role mode, the system retrieves the AccessKey (AK) and SecretKey (SK) for accessing OCP from the sts_credential parameter and performs role playing.
Note
The Assume Role mode is supported only for public cloud services.
Privilege requirements
Query the parameter
The
systenant and all user tenants can query the value of this parameter by using theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview.Modify the parameter
The
systenant and user tenants can modify this parameter.
Attributes
| Attribute | Description |
|---|---|
| Type | String |
| Default value | "", which indicates an empty string. |
| Modifiable | Yes. You can use the ALTER SYSTEM SET statement to modify the parameter. |
| Effective upon OBServer node restart | No. The setting takes effect immediately. |
Considerations
You can set this parameter when you create a tenant or after the tenant is created.
Examples
The STS service credentials are in the sts_url=xxx&sts_ak=xxx&sts_sk=xxx format. Assume that you have obtained the STS service credentials for accessing OCP from OCP. For example, the credentials are sts_url=https://ob-cn-***.aliyun-inc.com/services/***&sts_ak=***&sts_sk=***. The configuration example is as follows:
Set the
sts_credentialparameter when you create a tenant.obclient> CREATE TENANT IF NOT EXISTS mysql001 PRIMARY_ZONE='z1', RESOURCE_POOL_LIST=('my_pool_01') set sts_credential="sts_url=https://ob-cn-***.aliyun-inc.com/services/***&sts_ak=***&sts_sk=***";Set the
sts_credentialparameter after the tenant is created.The
systenant sets thests_credentialparameter for a specified tenant.obclient> ALTER SYSTEM SET sts_credential='sts_url=https://ob-cn-***.aliyun-inc.com/services/***&sts_ak=***&sts_sk=***' TENANT=mysql001;A user tenant sets the
sts_credentialparameter for itself.obclient> ALTER SYSTEM SET sts_credential='sts_url=https://ob-cn-***.aliyun-inc.com/services/***&sts_ak=***&sts_sk=***';
