CBH实例权限及授权项
如果您需要对您所拥有的云堡垒机(Cloud Bastion Host,CBH)服务进行精细的权限管理,您可以使用统一身份认证服务(Identity and Access Management,IAM),如果华为云账号已经能满足您的要求,不需要创建独立的IAM用户,您可以跳过本章节,不影响您使用CBH实例的其它功能。
默认情况下,新建的IAM用户没有任何权限,您需要将其加入用户组,并给用户组授予策略或角色,才能使用户组中的用户获得相应的权限,这一过程称为授权。授权后,用户就可以基于已有权限对云服务进行操作。
权限根据授权的精细程度,分为角色和策略。角色以服务为粒度,是IAM最初提供的一种根据用户的工作职能定义权限的粗粒度授权机制。策略授权更加精细,可以精确到某个操作、资源和条件,能够满足企业对权限最小化的安全管控要求。
支持的授权项
策略包含系统策略和自定义策略,如果系统策略不满足授权要求,管理员可以创建自定义策略,并通过给用户组授予自定义策略来进行精细的访问控制。
- 权限:允许或拒绝某项操作。
- 授权项:自定义策略中支持的Action,在自定义策略中的Action中写入授权项,可以实现授权项对应的权限功能。
权限 |
对应API接口 |
授权项 |
IAM项目 |
企业项目 |
---|---|---|---|---|
查询ECS配额 |
GET /v2/{project_id}/cbs/instance/ecs-quota |
cbh:instance:getEcsQuota |
√ |
× |
查看云堡垒机可用区 |
GET /v2/{project_id}/cbs/available-zone |
cbh:instance:getAvailableZones |
√ |
× |
登录云堡垒机 |
POST /v2/{project_id}/cbs/instance/login |
cbh:instance:login |
√ |
× |
关闭云堡垒机 |
POST /v2/{project_id}/cbs/instance/stop |
cbh:instance:stop |
√ |
× |
重启云堡垒机 |
POST /v2/{project_id}/cbs/instance/reboot |
cbh:instance:reboot |
√ |
× |
升级云堡垒机软件版本 |
POST /v2/{project_id}/cbs/instance/upgrade |
cbh:instance:upgrade |
√ |
× |
修改堡垒机admin用户密码 |
PUT /v2/{project_id}/cbs/instance/password |
cbh:instance:resetPassword |
√ |
× |
启动云堡垒机 |
POST /v2/{project_id}/cbs/instance/start |
cbh:instance:start |
√ |
× |
扩容云堡垒机规格 |
PUT /v2/{project_id}/cbs/instance |
cbh:instance:alterSpec |
√ |
× |
创建云堡垒机 |
POST /v2/{project_id}/cbs/instance |
cbh:instance:create |
√ |
√ |
绑定或解绑EIP |
|
cbh:instance:eipOperate |
√ |
× |
委托授权给CBH |
POST /v2/{project_id}/cbs/agency/authorization |
cbh:agency:authorize |
√ |
× |
查询云堡垒机列表 |
GET /v2/{project_id}/cbs/instance/list |
cbh:instance:list |
√ |
× |
权限 |
对应API接口 |
授权项 |
依赖权限 |
IAM项目 |
企业项目 |
---|---|---|---|---|---|
授予查询ECS资源配额的权限。 |
GET /v2/{project_id}/cbs/instance/ecs-quota |
cbh::getEcsQuota |
ecs:cloudServerFlavors:get |
√ |
× |
授予查询堡垒机实例配额的权限。 |
GET /v2/{project_id}/cbs/instance/quota |
cbh::getQuota |
- |
√ |
× |
授予查询堡垒机状态的权限。 |
GET /v2/{project_id}/cbs/instance/{server_id}/status |
cbh:instance:getInstanceStatus |
- |
√ |
× |
授予获取堡垒机内资产运维链接的权限。 |
GET /v2/{project_id}/cbs/instance/get-om-url |
cbh:instance:getOmUrl |
- |
√ |
× |
授予获取租户给堡垒机服务委托授权信息的权限。 |
GET /v2/{project_id}/cbs/agency/authorization |
cbh::getAuthorization |
|
√ |
× |
授予查询堡垒机实例资源的标签信息的权限。 |
GET /v2/{project_id}/cbs/instance/{resource_id}/tags |
cbh:instance:getInstanceTags |
- |
√ |
× |
授予启动堡垒机的权限。 |
POST /v2/{project_id}/cbs/instance/start |
cbh:instance:startInstance |
- |
√ |
× |
授予关闭堡垒机的权限。 |
POST /v2/{project_id}/cbs/instance/stop |
cbh:instance:stopInstance |
- |
√ |
× |
授予重启堡垒机的权限。 |
POST /v2/{project_id}/cbs/instance/reboot |
cbh:instance:rebootInstance |
- |
√ |
× |
授予升级堡垒机的权限。 |
POST /v2/{project_id}/cbs/instance/upgrade |
cbh:instance:upgradeInstance |
- |
√ |
× |
授予回滚堡垒机的权限。 |
POST /v2/{project_id}/cbs/instance/rollback |
cbh:instance:rollbackInstance |
- |
√ |
× |
授予以IAM用户登录堡垒机的权限。 |
POST /v2/{project_id}/cbs/instance/login |
cbh:instance:loginInstance |
- |
√ |
× |
授予重置堡垒机密码的权限。 |
PUT /v2/{project_id}/cbs/instance/password |
cbh:instance:resetInstancePassword |
- |
√ |
× |
授予切换堡垒机实例虚拟私有云的权限。 |
PUT /v2/{project_id}/cbs/instance/vpc |
cbh:instance:switchInstanceVpc |
vpc:subnets:get |
√ |
× |
授予重置堡垒机登录方式的权限。 |
PUT /v2/{project_id}/cbs/instance/login-method |
cbh:instance:resetInstanceLoginMethod |
- |
√ |
× |
授予删除故障堡垒机的权限。 |
DELETE /v2/{project_id}/cbs/instance |
cbh:instance:deleteInstance |
- |
√ |
× |
授予变更堡垒机的权限。 |
PUT /v2/{project_id}/cbs/instance |
cbh:instance:alterInstance |
- |
√ |
× |
授予创建堡垒机的权限。 |
POST /v2/{project_id}/cbs/instance |
cbh:instance:createInstance |
|
√ |
√ |
授予为堡垒机绑定EIP的权限。 |
POST /v2/{project_id}/cbs/instance/{server_id}/eip/bind |
cbh:instance:bindInstanceEip |
|
√ |
× |
授予为堡垒机解绑EIP的权限。 |
POST /v2/{project_id}/cbs/instance/{server_id}/eip/unbind |
cbh:instance:unbindInstanceEip |
|
√ |
× |
授予更新堡垒机安全组的权限。 |
PUT /v2/{project_id}/cbs/instance/{server_id}/security-groups |
cbh:instance:updateInstanceSecurityGroup |
|
√ |
× |
授予创建或取消堡垒机服务委托授权的权限。 |
POST /v2/{project_id}/cbs/agency/authorization |
cbh::operateAuthorization |
|
√ |
× |
授予用户登录堡垒机admin控制台的权限。 |
GET /v2/{project_id}/cbs/instances/{server_id}/admin-url |
cbh:instance:loginInstanceAdmin |
- |
√ |
× |
授予用户修改单机堡垒机实例类型的权限。 |
PUT /v2/{project_id}/cbs/instance/type |
cbh:instance:changeInstanceType |
|
√ |
× |
授予查询全部可用区的权限。 |
GET /v2/{project_id}/cbs/available-zone |
cbh::listAvailableZones |
- |
√ |
× |
授予查询堡垒机规格的权限。 |
GET /v2/{project_id}/cbs/instance/specification |
cbh::listSpecifications |
- |
√ |
× |
授予查询堡垒机列表的权限。 |
GET /v2/{project_id}/cbs/instance/list |
cbh:instance:listInstances |
eps:enterpriseProjects:list |
√ |
× |
授予查询全部标签的权限。 |
GET /v2/{project_id}/cbs/instance/tags |
cbh::listTags |
- |
√ |
× |
授予使用标签过滤实例的权限。 |
POST /v2/{project_id}/cbs/instance/filter |
cbh:instance:listInstancesByTag |
- |
√ |
× |
授予统计符合标签条件的实例数量的权限。 |
POST /v2/{project_id}/cbs/instance/count |
cbh:instance:countInstancesByTag |
- |
√ |
× |
授予操作堡垒机实例资源标签的权限。 |
POST /v2/{project_id}/cbs/instance/{resource_id}/tags/action |
cbh:instance:operateInstanceTags |
- |
√ |
× |