Querying the Report of a Check Item in a Security Configuration Check
Function
This API is used to query the report of a check item in a security configuration check.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.
URI
GET /v5/{project_id}/baseline/check-rule/detail
Parameter | Mandatory | Type | Description |
|---|---|---|---|
project_id | Yes | String | Definition Project ID, which is used to specify the project that an asset belongs to. After the project ID is configured, you can query assets in the project using the project ID. For details about how to obtain it, see Obtaining a Project ID. Constraints N/A Range The value can contain 1 to 256 characters. Default Value N/A |
Parameter | Mandatory | Type | Description |
|---|---|---|---|
enterprise_project_id | No | String | Definition Enterprise project ID, which is used to filter assets in different enterprise projects. For details, see Obtaining an Enterprise Project ID. To query assets in all enterprise projects, set this parameter to all_granted_eps. Constraints You need to set this parameter only after the enterprise project function is enabled. Range The value can contain 1 to 256 characters. Default Value 0: default enterprise project. |
check_name | Yes | String | Definition Configuration check baseline name, for example, SSH, CentOS 7, or Windows. Constraints N/A Range The value can contain 0 to 255 characters. Default Value N/A |
check_type | Yes | String | Definition Baseline type. For Linux servers, the values for check_type and check_name are generally the same. For example, they can both be set to SSH or CentOS 7. For Windows servers, the values for check_type and check_name are different. For example, check_type can be set to Windows Server 2019 R2 or Windows Server 2016 R2. The value of check_type can be obtained from the data returned by the API /v5/{project_id}/baseline/risk-configs. Constraints N/A Range The value can contain 0 to 255 characters. Default Value N/A |
check_rule_id | Yes | String | Definition Check item ID, which can be obtained from the return data of the API /v5/{project_id}/baseline/risk-config/{check_name}/check-rules. Constraints N/A Range The value can contain 0 to 255 characters. Default Value N/A |
standard | Yes | String | Definition Standard type. Constraints N/A Range Default Value N/A |
host_id | No | String | Definition Server ID. Constraints N/A Range The value can contain 0 to 64 characters. Default Value N/A |
Request Parameters
Parameter | Mandatory | Type | Description |
|---|---|---|---|
X-Auth-Token | Yes | String | Definition User token, which contains user identity and permissions. The token can be used for identity authentication when an API is called. For details about how to obtain the token, see Obtaining a User Token. Constraints N/A Range The value can contain 1 to 32,768 characters. Default Value N/A |
Response Parameters
Status code: 200
Parameter | Type | Description |
|---|---|---|
description | String | Definition Description of the current check item (check rule). Range N/A |
reference | String | Definition Basis for the check item (rule) setting. Range N/A |
audit | String | Definition Audit description of the check item (rule). Range N/A |
remediation | String | Definition Modification suggestions for the check item (rule). Range N/A |
check_info_list | Array of CheckRuleCheckCaseResponseInfo objects | Definition Test case information. Range N/A |
Example Requests
This API is used to query the report of the configuration check items whose baseline name is SSH, check item ID is 1.12, check standard is cloud security practice standard, and enterprise project ID is xxx.
GET https://{endpoint}/v5/{project_id}/baseline/check-rule/detail?standard=hw_standard&enterprise_project_id=xxx&check_name=SSH&check_type=SSH&check_rule_id=1.12 Example Responses
Status code: 200
Request succeeded.
{
"audit" : "Run the following commands and verify that ClientAliveInterval is smaller than 300 and ClientAliveCountMax is 3 or less:\n#grep '^ClientAliveInterval' /etc/ssh/sshd_config\nClientAliveInterval 300(default is 0)\n#grep '^ClientAliveCountMax' /etc/ssh/sshd_config\nClientAliveCountMax 0(default is 3)",
"description" : "The two options ClientAliveInterval and ClientAliveCountMax control the timeout of SSH sessions. The ClientAliveInterval parameter sets a timeout interval in seconds after which if no data has been received from the client, sshd will send a message through the encrypted channel to request a response from the client. The ClientAliveCountMax parameter sets the number of client alive messages which may be sent without sshd receiving any messages back from the client. For example, if the ClientAliveInterval is set to 15s and the ClientAliveCountMax is set to 3, unresponsive SSH clients will be disconnected after approximately 45s.",
"reference" : "",
"remediation" : "Edit the /etc/ssh/sshd_config file to set the parameter as follows:\nClientAliveInterval 300\nClientAliveCountMax 0"
} Status Codes
Status Code | Description |
|---|---|
200 | Request succeeded. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot
