Overview
The sts_credential parameter specifies the credentials for accessing the STS service provided by OCP. When a user tenant or system tenant accesses object storage in Assume Role mode, the system obtains the AccessKey (AK) and SecretKey (SK) for accessing OCP from the sts_credential to perform role-playing.
Note
The feature of accessing object storage in Assume role mode is currently supported only in public cloud services.
Privilege requirements
Query parameters
Both the
systenant and all user tenants can query this parameter using theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview.Modify parameters
Both the
systenant and user tenants can modify this parameter.
Attributes
Attribute |
Description |
|---|---|
| Parameter type | String |
| Default Value | "", indicating an empty string. |
| Modifiable | Yes, you can use theALTER SYSTEM SETStatement modification. |
| Whether to restart the OBServer node for the change to take effect | No, the setting takes effect immediately. |
Usage instructions
This parameter can be set when creating a tenant or after the tenant is created by modifying its parameters.
Configuration example
The credential format for the STS service is: sts_url=xxx&sts_ak=xxx&sts_sk=xxx. Assume that you have obtained the STS service credentials sts_url=https://ob-cn-***.aliyun-inc.com/services/***&sts_ak=***&sts_sk=*** for accessing OCP from OCP. The configuration example is as follows:
Set
sts_credentialwhen creating 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=***";After the tenant is created, set the
sts_credentialparameter.The system tenant sets the parameter
sts_credentialfor a specified tenant.obclient> ALTER SYSTEM SET sts_credential='sts_url=https://ob-cn-***.aliyun-inc.com/services/***&sts_ak=***&sts_sk=***' TENANT=mysql001;The user tenant sets its own parameter
sts_credential.obclient> ALTER SYSTEM SET sts_credential='sts_url=https://ob-cn-***.aliyun-inc.com/services/***&sts_ak=***&sts_sk=***';