Note
For OceanBase Database V4.2.x, this parameter was introduced in OceanBase Database V4.2.5.
Description
sts_credential specifies the credential for accessing the Security Token Service (STS) provided by OceanBase Cloud Platform (OCP). When you access the object storage service from a user tenant or the sys tenant in AssumeRole mode, the system obtains the access key ID and secret access key from the sts_credential parameter to access OCP, thus playing a role.
Note
Only ApsaraDB for OceanBase supports access to the object storage service in AssumeRole mode.
Limitations
Query the parameter
In the
systenant or a user tenant, you can execute theSHOW PARAMETERSstatement to query the parameter or query theGV$OB_PARAMETERSview for the parameter.Modify the parameter
You can modify the parameter in the
systenant or a user tenant.
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 specify this parameter when you create a tenant and modify it after the tenant is created.
Examples
A credential for accessing the STS is in the sts_url=xxx&sts_ak=xxx&sts_sk=xxx format. Assume that you have obtained the credential sts_url=https://ob-cn-***.aliyun-inc.com/services/***&sts_ak=***&sts_sk=*** for accessing the STS from OCP. Here are some examples:
Specify 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=***";Specify the
sts_credentialparameter after a tenant is created.Specify the
sts_credentialparameter for a user tenant from thesystenant.obclient> ALTER SYSTEM SET sts_credential='https://ob-cn-***.aliyun-inc.com/services/***&sts_ak=***&sts_sk=***' TENANT=mysql001;Specify the
sts_credentialparameter for the current user tenant.obclient> ALTER SYSTEM SET sts_credential='sts_url=https://ob-cn-***.aliyun-inc.com/services/***&sts_ak=***&sts_sk=***';