企业主机安全 HSS
企业主机安全 HSS
- 最新动态
- 功能总览
- 服务公告
- 技术画册
- 产品介绍
- 计费说明
- 快速入门
- 用户指南
- 最佳实践
-
API参考
- 使用前必读
- 如何调用API
-
API说明
-
资产管理
- 统计资产信息,账号、端口、进程等
- 查询账号信息列表
- 查询开放端口统计信息
- 呈现某一端口详细信息
- 查询进程列表
- 查询软件列表
- 查询自启动项信息
- 查询账号的服务器列表
- 查询单服务器的开放端口列表
- 查询软件的服务器列表
- 查询自启动项的服务列表
- 获取账户变动历史信息
- 获取软件信息的历史变动记录
- 获取自启动项的历史变动记录
- 资产指纹-进程-服务器列表
- 资产指纹-端口-服务器列表
- 查询指定中间件的服务器列表
- 查询中间件列表
- 查询资产全局扫描任务状态
- 创建全局资产扫描任务
- 资产管理-资产指纹-内核模块的服务器列表
- 资产管理-资产指纹-Web框架的服务器列表
- 资产管理-资产指纹-Web站点的服务器列表
- 查询单主机资产指纹采集状态
- 采集单主机资产指纹
- 资产管理-资产指纹-内核模块左侧树
- 资产管理-资产指纹-Web框架左侧树
- 资产管理-资产指纹-Web站点左侧树
- 资产管理-资产指纹-左侧WebAppAndService名称树信息
- 资产管理-资产指纹-右侧WebAppAndService资产信息
- 勒索防护
- 基线管理
- 配额管理
- 容器管理
- 事件管理
- 入侵检测
- 主机管理
- 容器镜像
- 策略管理
- 漏洞管理
- 网页防篡改
- 标签管理
- 病毒查杀
- 应用防护
- 白名单管理
- 容器安装与配置
- 动态端口蜜罐
- 安装配置
- 集群管理
- 主机安装与配置
- 安全运营
- 集群防护
- 容器网络隔离信息
- 容器资产
-
资产管理
- 附录
- SDK参考
- 场景代码示例
-
常见问题
- 产品咨询
-
Agent相关
- 购买HSS会自动安装Agent吗?
- Agent是否和其他安全软件有冲突?
- 如何卸载Agent?
- Agent安装失败应如何处理?
- Agent状态异常应如何处理?
- Agent的默认安装路径是什么?
- Agent运行时占用多少CPU、内存和磁盘资源?
- 购买不同版本HSS,可以共用同一Agent吗?
- 如何查看未安装Agent的主机?
- 企业主机安全升级失败怎么处理?
- 服务器安装Agent后会访问哪些资源?
- 如何使用镜像批量安装Agent?
- 无法访问Windows或Linux版本Agent下载链接?
- 升级Agent失败,提示“替换文件失败”
- 批量安装Agent失败,提示“网络不通”
- 如何验证主机与HSS服务端的网络是否打通成功?
- 防护相关
- 漏洞管理
- 检测与响应
- 异常登录
- 账户暴力破解
- 基线检查
- 网页防篡改
- 容器安全
- 勒索防护
- 区域和可用区
- 安全配置
- 防护配额
- 其他
- 视频帮助
- 文档下载
- 通用参考
链接复制成功!
获取多云集群的代理安装脚本
功能介绍
获取多云集群的代理安装脚本
调用方法
请参见如何调用API。
URI
GET /v5/{project_id}/container/kubernetes/multi-cloud/clusters/{cluster_id}/agent/install-script
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
project_id |
是 |
String |
参数解释: 项目ID,可通过我的凭证,项目id获取 约束限制: 不涉及 取值范围: 字符长度1-256位 默认取值: 不涉及 |
cluster_id |
是 |
String |
集群id |
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
enterprise_project_id |
否 |
String |
参数解释: 主机所属的企业项目ID。 企业项目ID默认取值为“0”,表示默认企业项目。如果需要查询所有企业项目下的主机,请传参“all_granted_eps”。如果您只有某个企业项目的权限,则需要传递该企业项目ID,查询该企业项目下的主机,否则会因权限不足而报错。 约束限制: 开通企业项目功能后才需要配置企业项目。 取值范围: 字符长度1-256位 默认取值: 0 |
请求参数
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
X-Auth-Token |
是 |
String |
用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值) |
响应参数
状态码:200
参数 |
参数类型 |
描述 |
---|---|---|
install_script |
String |
代理安装脚本 |
请求示例
获取多云集群的代理安装脚本
GET https://{endpoint}/v5/{project_id}/container/kubernetes/multi-cloud/clusters/1257efb7-4f64-4f7f-9be8-fdaabbbf77b5/agent/install-script?enterprise_project_id=all_granted_eps
响应示例
状态码:200
请求已成功
{
"install_script" : "{\"metadata\":{\"namespace\":\"hss\",\"name\":\"hssRole\"},\"apiVersion\":\"rbac.authorization.k8s.io/v1\",\"kind\":\"Role\",\"rules\":[{\"resources\":[\"configmaps\"],\"verbs\":[\"create\",\"delete\",\"deletecollection\",\"get\",\"list\",\"patch\",\"update\",\"watch\"],\"apiGroups\":[\"\"]},{\"resources\":[\"daemonsets\",\"deployments\",\"deployments/rollback\",\"replicasets\"],\"verbs\":[\"create\",\"delete\",\"deletecollection\",\"get\",\"list\",\"patch\",\"update\",\"watch\"],\"apiGroups\":[\"apps\"]},{\"resources\":[\"cronjobs\",\"jobs\"],\"verbs\":[\"create\",\"delete\",\"deletecollection\",\"get\",\"list\",\"patch\",\"update\",\"watch\"],\"apiGroups\":[\"batch\"]},{\"resources\":[\"ingresses\"],\"verbs\":[\"create\",\"delete\",\"deletecollection\",\"get\",\"list\",\"patch\",\"update\",\"watch\"],\"apiGroups\":[\"extensions\"]},{\"resources\":[\"ingresses\"],\"verbs\":[\"create\",\"delete\",\"deletecollection\",\"get\",\"list\",\"patch\",\"update\",\"watch\"],\"apiGroups\":[\"networking.k8s.io\"]}]}{\"metadata\":{\"namespace\":\"hss\",\"name\":\"hssRoleBinding\"},\"apiVersion\":\"rbac.authorization.k8s.io/v1\",\"kind\":\"RoleBinding\",\"subjects\":[{\"kind\":\"ServiceAccount\",\"name\":\"hss-user\",\"namespace\":\"hss\"}],\"roleRef\":{\"apiGroup\":\"rbac.authorization.k8s.io\",\"kind\":\"Role\",\"name\":\"hssRole\"}}{\"metadata\":{\"name\":\"hssClusterRole\"},\"apiVersion\":\"rbac.authorization.k8s.io/v1\",\"kind\":\"ClusterRole\",\"rules\":[{\"resources\":[\"namespaces\",\"pods\",\"nodes\",\"services\",\"endpoints\",\"configmaps\",\"events\",\"persistentvolumeclaims\",\"persistentvolumes\",\"podtemplates\",\"repli\"],\"verbs\":[\"get\",\"list\"],\"apiGroups\":[\"\"]},{\"resources\":[\"pods/status\"],\"verbs\":[\"update\"],\"apiGroups\":[\"\"]},{\"resources\":[\"daemonsets\",\"deployments\",\"replicasets\",\"statefulsets\"],\"verbs\":[\"get\",\"list\"],\"apiGroups\":[\"apps\"]},{\"resources\":[\"horizontalpodautoscalers\"],\"verbs\":[\"get\",\"list\"],\"apiGroups\":[\"autoscaling\"]},{\"resources\":[\"cronjobs\",\"jobs\"],\"verbs\":[\"get\",\"list\"],\"apiGroups\":[\"batch\"]},{\"resources\":[\"endpointslices\"],\"verbs\":[\"get\",\"list\"],\"apiGroups\":[\"discovery.k8s.io\"]},{\"resources\":[\"events\"],\"verbs\":[\"get\",\"list\"],\"apiGroups\":[\"events.k8s.io\"]},{\"resources\":[\"ingresses\"],\"verbs\":[\"get\",\"list\"],\"apiGroups\":[\"extensions\"]},{\"resources\":[\"ingressclasses\",\"ingresses\",\"networkpolicies\"],\"verbs\":[\"create\",\"delete\",\"update\",\"get\",\"list\"],\"apiGroups\":[\"networking.k8s.io\"]},{\"resources\":[\"clusterrolebindings\",\"clusterroles\",\"rolebindings\",\"roles\"],\"verbs\":[\"create\",\"delete\",\"deletecollection\",\"patch\",\"update\",\"watch\"],\"apiGroups\":[\"rbac.authorization.k8s.io\"]},{\"resources\":[\"clusterrolebindings\",\"clusterroles\",\"rolebindings\",\"roles\"],\"verbs\":[\"get\",\"list\"],\"apiGroups\":[\"rbac.authorization.k8s.io\"]},{\"resources\":[\"storageclasses\",\"volumeattachments\"],\"verbs\":[\"get\",\"list\"],\"apiGroups\":[\"storage.k8s.io\"]}]}{\"metadata\":{\"name\":\"hssClusterRoleBinding\"},\"apiVersion\":\"rbac.authorization.k8s.io/v1\",\"kind\":\"ClusterRoleBinding\",\"subjects\":[{\"kind\":\"ServiceAccount\",\"name\":\"hss-user\",\"namespace\":\"hss\"}],\"roleRef\":{\"apiGroup\":\"rbac.authorization.k8s.io\",\"kind\":\"ClusterRole\",\"name\":\"hssClusterRole\"}}{\"apiVersion\":\"v1\",\"kind\":\"Secret\",\"metadata\":{\"name\":\"proxy-agent-cert\",\"namespace\":\"hss\"},\"type\":\"Opaque\",\"data\":{\"ca.crt\":\"LxxxCg==\",\"proxy-agent.crt\":\"Q2VydxxxxLQo=\",\"proxy-agent.key\":\"MxxxBGMA==\",\"common_shared.key\":\"AQdxxxxH+g==\",\"root.key\":\"xxxxk4w==\"}}{\"apiVersion\":\"apps/v1\",\"kind\":\"Deployment\",\"metadata\":{\"labels\":{\"app\":\"proxy-agent\",\"version\":\"0.0.2\"},\"name\":\"proxy-agent\",\"namespace\":\"hss\"},\"spec\":{\"replicas\":2,\"selector\":{\"matchLabels\":{\"app\":\"proxy-agent\"}},\"strategy\":{\"rollingUpdate\":{\"maxSurge\":1,\"maxUnavailable\":1},\"type\":\"RollingUpdate\"},\"template\":{\"metadata\":{\"labels\":{\"app\":\"proxy-agent\"}},\"spec\":{\"affinity\":{\"podAntiAffinity\":{\"requiredDuringSchedulingIgnoredDuringExecution\":[{\"labelSelector\":{\"matchExpressions\":[{\"key\":\"app\",\"operator\":\"In\",\"values\":[\"proxy-agent\"]}]},\"topologyKey\":\"kubernetes.io/hostname\"}]}},\"containers\":[{\"command\":[\"/proxy-agent\"],\"args\":[\"--logtostderr=true\",\"--ca-cert=/var/certs/agent/ca.crt\",\"--agent-cert=/var/certs/agent/proxy-agent.crt\",\"--agent-key=/var/certs/agent/proxy-agent.key\",\"--proxy-server-host=hss-anp.cn-north-7.myhuaweicloud.com\",\"--proxy-server-port=8091\",\"--agent-id=6f2b5593-7855-4dbd-aebe-4f736708b8db\",\"--agent-identifiers=host=lb.kubesphere.local\"],\"image\":\"swr.cn-north-7.myhuaweicloud.com/scc_hss_container/proxy-agent:0.0.2\",\"imagePullPolicy\":\"IfNotPresent\",\"name\":\"proxy-agent\",\"env\":[{\"name\":\"PAAS_CRYPTO_PATH\",\"value\":\"/home/certs\"}],\"resources\":{\"requests\":{\"cpu\":\"40m\",\"memory\":\"50Mi\"},\"limits\":{\"cpu\":\"300m\",\"memory\":\"300Mi\"}},\"securityContext\":{\"readOnlyRootFilesystem\":true,\"allowPrivilegeEscalation\":false},\"livenessProbe\":{\"exec\":{\"command\":[\"/bin/sh\",\"-ec\",\"status=$(curl -k -m 5 -s -o /dev/null -w \\\"%{http_code}\\\" http://127.0.0.1:8093/healthz);[ $status -ge 200 ] && echo $status\"]},\"initialDelaySeconds\":15,\"timeoutSeconds\":60},\"volumeMounts\":[{\"mountPath\":\"/var/certs/agent/ca.crt\",\"name\":\"cert\",\"subPath\":\"ca.crt\"},{\"mountPath\":\"/var/certs/agent/proxy-agent.crt\",\"name\":\"cert\",\"subPath\":\"proxy-agent.crt\"},{\"mountPath\":\"/var/certs/agent/proxy-agent.key\",\"name\":\"cert\",\"subPath\":\"proxy-agent.key\"},{\"mountPath\":\"/home/certs/common_shared.key\",\"name\":\"cert\",\"subPath\":\"common_shared.key\"},{\"mountPath\":\"/home/certs/root.key\",\"name\":\"cert\",\"subPath\":\"root.key\"}]}],\"dnsPolicy\":\"Default\",\"hostNetwork\":true,\"volumes\":[{\"name\":\"cert\",\"secret\":{\"secretName\":\"proxy-agent-cert\"}}]}}}}"
}
状态码
状态码 |
描述 |
---|---|
200 |
请求已成功 |
错误码
请参见错误码。
父主题: 容器安装与配置