湖仓构建 LAKEFORMATION-创建用户并授权使用LakeFormation:LakeFormation服务权限

时间:2024-08-27 14:14:52

LakeFormation服务权限

默认情况下,管理员创建的 IAM 用户没有任何权限,需要将其加入用户组,并给用户组授予策略或角色,才能使得用户组中的用户获得对应的权限,这一过程称为授权。授权后,用户就可以基于被授予的权限对云服务进行操作。

权限根据授权精细程度分为角色和策略。

  • 角色:IAM最初提供的一种根据用户的工作职能定义权限的粗粒度授权机制。该机制以服务为粒度,提供有限的服务相关角色用于授权。由于各服务之间存在业务依赖关系,因此给用户授予角色时,可能需要一并授予依赖的其他角色,才能正确完成业务。角色并不能满足用户对精细化授权的要求,无法完全达到企业对权限最小化的安全管控要求。
    • IAM项目只读授权指导:当租户管理员需要给某个子用户分配LakeFormation服务在某个IAM项目下的只读权限。可以给该用户创建一个用户组,同时在用户组将LakeFormation ReadOnlyAccess系统策略授权给指定IAM项目即可。
    • 企业项目授权指导:当租户管理员需要给某个子用户分配LakeFormation服务在某个企业项目下的所有操作权限。可以给该用户创建一个用户组,同时在用户组中将LakeFormation CommonAccess授权给全局,将LakeFormation FullAccess授权给指定企业项目即可。
  • 策略:IAM最新提供的一种细粒度授权的能力,可以精确到具体服务的操作、资源以及请求条件等。基于策略的授权是一种更加灵活的授权方式,能够满足企业对权限最小化的安全管控要求。多数细粒度策略以API接口为粒度进行权限拆分,LakeFormation的自定义IAM策略操作可参考创建LakeFormation自定义IAM策略
表1 LakeFormation系统策略

系统角色/策略名称

描述

类别

依赖关系

LakeFormation FullAccess

LakeFormation管理员权限,拥有该权限的用户可以操作并使用所有LakeFormation服务功能。

系统策略

  • IAM AgencyFullAccess
  • OBS OperateAccess
  • VPC FullAccess
  • VPCEndpoint FullAccess

LakeFormation ReadOnlyAccess

LakeFormation只读权限,拥有该权限的用户可以执行LakeFormation所有查询类功能。

系统策略

  • IAM ReadOnlyAccess
  • OBS ReadOnlyAccess
  • VPC ReadOnlyAccess
  • VPCEndpoint ReadOnlyAccess

LakeFormation CommonOperations

LakeFormation基础权限,包含LakeFormation服务协议查看/授权/取消,以及OBS、TMS等周边依赖服务的基础权限集合。

系统策略

  • IAM ReadOnlyAccess
  • OBS ReadOnlyAccess
  • VPC FullAccess
  • VPCEndpoint FullAccess
表2 LakeFormationIAM权限列表

操作类型

操作项

描述

只读

lakeformation:access:describe

查询接入客户端。

lakeformation:accessAgency:describe

查询接入委托信息。

lakeformation:accessService:describe

查看接入服务。

lakeformation:agency:describe

查询委托。

lakeformation:agreement:describe

查询服务协议授权。

lakeformation:catalog:describe

查询Catalog元数据。

lakeformation:configuration:describe

查询配置。

lakeformation:credential:describe

查询认证信息。

lakeformation:database:describe

查询数据库元数据。

lakeformation:dataset:describe

查询数据集元数据。

lakeformation:dataset:describeFile

查询数据集文件元数据。

lakeformation:dataset:describeFileGroup

查询数据集文件组元数据。

lakeformation:function:describe

查询函数元数据。

lakeformation:group:describe

查询用户组信息。

lakeformation:instance:describe

查询实例。

lakeformation:instance:listAuthorizedLocation

查询授权资源。

lakeformation:instanceJob:describe

查询任务。

lakeformation:model:describe

查询模型元数据。

lakeformation:model:describeFile

查询模型文件元数据。

lakeformation:obs:describe

查询OBS桶列表。

lakeformation:policy:describe

查询权限策略。

lakeformation:policy:export

批量查询权限策略。

lakeformation:role:describe

查询角色。

lakeformation:table:describe

查询表元数据。

lakeformation:tableFileGroup:describe

查询表文件组元数据。

lakeformation:tag:describe

查询资源标签。

lakeformation:user:describe

查询用户以及关联角色关系。

lakeformation:access:create

创建接入客户端。

lakeformation:access:delete

删除接入客户端。

lakeformation:agency:create

创建委托。

lakeformation:agency:drop

删除委托。

lakeformation:catalog:alter

修改Catalog元数据。

lakeformation:catalog:create

创建Catalog元数据。

lakeformation:catalog:drop

删除Catalog元数据。

lakeformation:database:alter

修改数据库元数据。

lakeformation:database:create

创建数据库元数据。

lakeformation:database:drop

删除数据库元数据。

lakeformation:dataset:alter

修改数据集元数据。

lakeformation:dataset:alterFile

修改数据集文件元数据。

lakeformation:dataset:alterFileGroup

修改数据集文件组元数据。

lakeformation:dataset:create

创建数据集元数据。

lakeformation:dataset:createFile

创建数据集文件元数据。

lakeformation:dataset:createFileGroup

创建数据集文件组元数据。

lakeformation:dataset:drop

删除数据集元数据。

lakeformation:dataset:dropFile

删除数据集文件元数据。

lakeformation:dataset:dropFileGroup

删除数据集文件组元数据。

lakeformation:function:alter

修改函数元数据。

lakeformation:function:create

创建函数元数据

lakeformation:function:drop

删除函数元数据。

lakeformation:group:alter

修改用户组信息。

lakeformation:instance:access

申请接入服务。

lakeformation:instance:alter

修改实例。

lakeformation:instance:create

创建实例。

lakeformation:instance:drop

删除实例。

lakeformation:instanceJob:alter

修改任务。

lakeformation:instanceJob:create

创建任务。

lakeformation:instanceJob:drop

删除任务。

lakeformation:instanceJob:exec

执行任务。

lakeformation:model:alter

修改模型元数据。

lakeformation:model:alterFile

修改模型文件元数据。

lakeformation:model:create

创建模型元数据。

lakeformation:model:createFile

创建模型文件元数据。

lakeformation:model:drop

删除模型元数据。

lakeformation:model:dropFile

删除模型文件元数据。

lakeformation:policy:create

创建权限策略。

lakeformation:policy:drop

删除权限策略。

lakeformation:role:alter

修改角色。

lakeformation:role:create

创建角色。

lakeformation:role:drop

删除角色。

lakeformation:table:alter

修改表元数据。

lakeformation:table:create

创建表元数据。

lakeformation:table:drop

删除表元数据。

lakeformation:tableFileGroup:create

创建表文件组元数据。

lakeformation:tableFileGroup:drop

删除表文件组元数据。

lakeformation:transaction:operate

操作事务。

lakeformation:user:alter

修改用户以及关联角色关系。

权限管理

lakeformation:accessService:grant

授权接入服务。

lakeformation:accessTenant:grant

授权接入租户。

lakeformation:agreement:cancel

取消服务协议授权。

lakeformation:agreement:grant

授权服务协议授权。

lakeformation:instance:authorizeLocation

授权OBS路径。

lakeformation:instance:cancelAuthorizeLocation

取消授权OBS路径。

support.huaweicloud.com/usermanual-lakeformation/lakeformation_03_00004.html