Overview
You can call this API to detect the security configurations of a tenant and obtain the detection results and risk items.
API details
Constraints
The caller must have an AccessKey for accessing the multi-cloud API. For information about how to obtain the AccessKey ID and AccessKey secret, see Manage AccessKeys.
Request path
GET /api/v2/instances/{instanceId}/security/tenantSecurityConfig
Request parameters
Path
| Parameter | Type | Required | Description | Example value |
|---|---|---|---|---|
| instanceId | String | Yes | The ID of the OceanBase cluster. | ob317v4uif**** |
Query
| Parameter | Type | Required | Description | Example value |
|---|---|---|---|---|
| tenantId | String | No | The ID of the tenant. | t4louaeei**** |
| checkId | String | No | The unique identifier of the security check. | **** |
Response parameters
| Parameter | Type | Description | Example value |
|---|---|---|---|
| requestId | String | The ID of the request. | 523E7183-1490-590D-BA03-12DFD316614B |
| data | Object | The detection results. | - |
| data.totalCheckCount | Integer | The total number of security configuration items. | 4 |
| data.totalRiskCount | Integer | The total number of risk items. | 0 |
| data.tenantSecurityConfigs | Array | The list of detection results of each tenant. | - |
| data.tenantSecurityConfigs[].tenantId | String | The ID of the tenant. | xxx |
| data.tenantSecurityConfigs[].tenantName | String | The name of the tenant. | xxx |
| data.tenantSecurityConfigs[].riskCount | Integer | The number of risk items of the tenant. | 0 |
| data.tenantSecurityConfigs[].securityConfigs | Array | The list of risk items of the tenant. | - |
| data.tenantSecurityConfigs[].securityConfigs[].configGroup | String | The risk group. | WHITELIST |
| data.tenantSecurityConfigs[].securityConfigs[].configName | String | The name of the risk item. | WHITELIST_RANGE_LARGE |
| data.tenantSecurityConfigs[].securityConfigs[].risk | Boolean | Indicates whether a risk exists. | true |
| data.tenantSecurityConfigs[].securityConfigs[].riskDescription | String | The description of the risk. | The whitelist is opened too widely. We recommend that you set it as needed. |
| data.tenantSecurityConfigs[].securityConfigs[].configDescription | String | The name of the detection item. | Check whether the whitelist of the cluster is opened too widely. |
| data.checkId | String | The unique identifier of the security check. | xxx |
| data.instanceId | String | The ID of the OceanBase cluster. | ob317v4uif**** |
| data.checkTime | String | The time when the security check was performed. | 2023-08-07 15:30:00 |
| success | Boolean | Indicates whether the call was successful. | true |
Examples
Request example
curl --digest -u 'ak:sk' \
-X GET \
'https://api-cloud.oceanbase.com/api/v2/instances/{instanceId}/security/tenantSecurityConfig'
Response example
JSON format
{
"data": {
"totalCheckCount": 4,
"totalRiskCount": 0,
"tenantSecurityConfigs": [
{
"tenantId": "xxx",
"tenantName": "xxx",
"riskCount": 0,
"securityConfigs": [
{
"configGroup": "WHITELIST",
"configName": "WHITELIST_RANGE_LARGE",
"risk": true,
"riskDescription": "The whitelist is opened too widely. We recommend that you set it as needed.",
"configDescription": "Check whether the whitelist of the cluster is opened too widely."
}
]
}
],
"checkId": "xxx",
"instanceId": "ob317v4uif****",
"checkTime": "2023-08-07 15:30:00"
},
"requestId": "523E7183-1490-590D-BA03-12DFD316614B",
"success": true
}