Note
This parameter was introduced in V4.3.5 for V4.3.x.
Description
The sts_credential parameter specifies the credentials for accessing the STS service of OCP. When a user tenant or a system tenant accesses object storage in Assume Role mode, the system obtains the AK and SK for accessing OCP from the sts_credential parameter and assumes the role.
Note
The feature of accessing object storage in Assume role mode is supported only for public cloud products.
Privilege requirements
Query the parameter
The
systenant and all user tenants can query 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 this parameter. |
| Effective upon OBServer node restart | No. The parameter takes effect immediately after it is set. |
Considerations
You can set this parameter when you create a tenant or after a tenant is created.
Examples
The format of the credentials for the STS service is sts_url=xxx&sts_ak=xxx&sts_sk=xxx. Assume that you have obtained the credentials sts_url=https://ob-cn-***.aliyun-inc.com/services/***&sts_ak=***&sts_sk=*** for accessing the STS service of OCP. The following examples show how to set the sts_credential parameter:
Set the
sts_credentialparameter when you create a tenantobclient> 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 a tenant is createdSet the
sts_credentialparameter for a specified tenant as a system tenantobclient> ALTER SYSTEM SET sts_credential='sts_url=https://ob-cn-***.aliyun-inc.com/services/***&sts_ak=***&sts_sk=***' TENANT=mysql001;Set the
sts_credentialparameter for the current tenant as a user tenantobclient> ALTER SYSTEM SET sts_credential='sts_url=https://ob-cn-***.aliyun-inc.com/services/***&sts_ak=***&sts_sk=***';