查询镜像配置检查项检测报告
功能介绍
查询镜像配置检查项检测报告
URI
GET /v5/{project_id}/image/baseline/check-rule/detail
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
project_id |
是 |
String |
租户项目ID |
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
enterprise_project_id |
否 |
String |
租户企业项目ID,查询所有企业项目时填写:all_granted_eps |
image_type |
是 |
String |
镜像类型,包含如下:
|
namespace |
否 |
String |
组织名称(没有镜像相关信息时,表示查询所有镜像) |
image_name |
否 |
String |
镜像名称 |
image_version |
否 |
String |
镜像版本名称 |
check_name |
是 |
String |
基线名称 |
check_type |
是 |
String |
基线类型 |
check_rule_id |
是 |
String |
检查项id |
standard |
是 |
String |
标准类型,包含如下:
|
instance_id |
否 |
String |
企业仓库实例ID,swr共享版无需使用该参数 |
请求参数
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
x-auth-token |
是 |
String |
用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值) |
响应参数
状态码:200
参数 |
参数类型 |
描述 |
---|---|---|
description |
String |
检查项描述 |
reference |
String |
参考 |
audit |
String |
审计描述 |
remediation |
String |
修改建议 |
check_info_list |
Array of ImageCheckRuleCheckCaseResponseInfo objects |
检测用例信息 |
请求示例
查询所属组织为aaa,镜像名称为centos7,镜像版本为common的私有镜像、基线名称为SSH、检测项id为1.12并且标准类型为云规范的配置检查项检测报告。
GET https://{endpoint}/v5/{project_id}/image/baseline/check-rule/detail?image_type=private_image&namespace=aaa&image_name=centos7&image_version=common&check_rule_id=1.12&standard=hw_standard&check_type=SSH&check_name=SSH&enterprise_project_id=all_granted_eps
响应示例
状态码:200
配置检查项检测报告
{"audit":"检查配置文件/etc/pam.d/system","check_info_list":[{"check_description":"检查配置文件/etc/pam.d/system-auth"},{"current_value":""},{"suggest_value":"每个文件都配置auth required "}],"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: ClientAliveInterval 300 ClientAliveCountMax 0"}
状态码
状态码 |
描述 |
---|---|
200 |
配置检查项检测报告 |
错误码
请参见错误码。