火山引擎上的权限管理主要是通过访问控制 IAM实现,主账号(或有相关权限的用户)通常会根据团队成员的职责、工作内容为不同的成员创建子账号(子用户),并通过对子账号赋予相应的权限策略实现细粒度的访问控制。本文主要介绍如何在 VikingDB 的向量库和知识库上进行用户管理。
火山引擎的权限资源管理主要通过访问控制 IAM实现,允许主账号将资源按照项目进行组织。可以根据团队成员的职责、工作内容为不同的成员创建子账号(子用户),并可以基于资源、项目、标签进行更细粒度的权限划分,提升资源的安全性和管理的灵活性。
本文将介绍如何在 VikingDB 中进行项目和用户的管理。
火山引擎提供了【用户】模块管理该账号下的所有子用户,在该模块下能够对子用户进行创建、删除、配置权限等操作。
使用前提
以主账号或者拥有【访问控制】权限的用户登录。
操作步骤
登录火山引擎控制台,单击顶部右上角的用户名称下的【访问控制】 进入对应页面。
在左侧的导航栏依次单击【用户】-【新建用户】进入基本信息设置页面。
单击【通过用户名创建】,在【基本信息设置】页签下填写该子账号的名称。关键字段如下:
字段名称 | 字段说明 |
---|---|
用户名 |
|
控制台登录 |
|
编程访问 |
|
【基本信息设置】页签填写完成后单击【下一步】,进入【权限设置】页签。在搜索框搜索策略名称,查找向量数据库 VikingDB 当前的权限策略,为新建用户勾选对应权限。当选择的策略为自定义策略时,可以指定项目进行授权。
目前支持的策略类型包括:
当子账号成员未设置访问策略时,该子账号没有访问权限,可通过如下操作步骤配置系统预设的策略。
火山引擎主账号或拥有访问控制管理权限的子用户进行授权时,若系统预设策略无法满足需求,可通过自定义策略精细化定义权限。包括:
{ "Statement": [ { "Effect": "Allow", "Action": [ "ml_platform:IsVikingdbOpened", "ml_platform:HandleVikingdbTradeCallback", "ml_platform:Ping", "ml_platform:CreateCollection", "ml_platform:FieldTypeList", "ml_platform:ListFieldTypes", "ml_platform:ListPipelines", "ml_platform:DeleteIndex", "ml_platform:CreateIndex", "ml_platform:DeleteCollection", "ml_platform:CollectionList", "ml_platform:ListCollections", "ml_platform:CollectionInfo", "ml_platform:GetCollectionInfo", "ml_platform:IndexList", "ml_platform:ListIndexes", "ml_platform:TerminateVikingdbInstance", "ml_platform:IndexInfo", "ml_platform:GetIndexInfo", "ml_platform:GetVikingdbInstanceDetail", "ml_platform:SearchDebug", "ml_platform:GetSearchData", "ml_platform:UpdateCollection", "ml_platform:TccConfig", "ml_platform:GetTccConfig", "ml_platform:UpdateIndex", "ml_platform:VikingDBAPIRead", "ml_platform:VikingDBAPIWrite", "ml_platform:CollectionAliasInfo", "ml_platform:GetCollectionAliasInfo", "ml_platform:CloseVikingDBService", "ml_platform:GetPreSignedUrl", "ml_platform:UpsertData", "ml_platform:FetchDataByCollection", "ml_platform:FetchDataByIndex", "ml_platform:UpdateData", "ml_platform:DeleteData", "ml_platform:ListIndexesByCollection", "ml_platform:UpdateTask", "ml_platform:DeleteTask", "ml_platform:ListTask", "ml_platform:FindTask", "ml_platform:CreateTask", "ml_platform:ListTasks", "ml_platform:IsVikingdbOpenedBp", "ml_platform:CloseVikingDBServiceBp", "ml_platform:PreviewDataByCollection", "ml_platform:TagResource", "ml_platform:UntagResource", "tag:GetTagValues", "tag:GetTagKeys", "vikingdb:*" ], "Resource": [ "trn:vikingdb:cn-beijing:账号ID:vikingdbcollection/resource ID", "trn:vikingdb:cn-beijing:账号ID:vikingdbcollection/resource ID" ] } ] }
{ "Statement": [ { "Effect": "Allow", "Action": [ "ml_platform:IsVikingdbOpened", "ml_platform:IsKnowledgeBaseOpened", "ml_platform:HandleVikingdbTradeCallback", "ml_platform:Ping", "ml_platform:FieldTypeList", "ml_platform:ListFieldTypes", "ml_platform:ListPipelines", "ml_platform:CollectionList", "ml_platform:ListCollections", "ml_platform:CollectionInfo", "ml_platform:GetCollectionInfo", "ml_platform:IndexList", "ml_platform:ListIndexes", "ml_platform:IndexInfo", "ml_platform:GetIndexInfo", "ml_platform:GetVikingdbInstanceDetail", "ml_platform:SearchDebug", "ml_platform:GetSearchData", "ml_platform:TccConfig", "ml_platform:GetTccConfig", "ml_platform:DocList", "ml_platform:ListDocs", "ml_platform:DocInfo", "ml_platform:GetDocInfo", "ml_platform:ProcessingResultList", "ml_platform:ListChunks", "ml_platform:VikingDBAPIRead", "ml_platform:CollectionAliasInfo", "ml_platform:GetCollectionAliasInfo", "ml_platform:CreateSearchConfig", "ml_platform:GetKnowledgeBaseOpened", "ml_platform:GetKnowledgeBaseServiceInfo", "ml_platform:GetPreSignedUrl", "ml_platform:GetKnowledgeBasePreSignedUrl", "ml_platform:DeleteKnowledgeBaseTosObject", "ml_platform:CreateConversation", "ml_platform:DocQuery", "ml_platform:GetLarkDocInfoByLink", "ml_platform:GetLarkFileTree", "ml_platform:GetUnbindLarkAccount", "ml_platform:GetBindLarkAccount", "ml_platform:FetchDataByCollection", "ml_platform:FetchDataByIndex", "ml_platform:ListIndexesByCollection", "ml_platform:GetBatchToPipeline", "ml_platform:GetReProcessDoc", "ml_platform:GetPipelineInfo", "ml_platform:ListPipelines", "ml_platform:ListSearchConfigs", "ark:ListEndpoints", "ark:ListCustomModels", "ark:ListFoundationModels", "ark:ListFoundationModelVersions", "ark:GetApiKey", "ml_platform:ListTask", "ml_platform:FindTask", "ml_platform:ListTasks", "ml_platform:IsVikingdbOpenedBp", "ml_platform:PreviewDataByCollection", "tag:GetTagValues", "tag:GetTagKeys", "vikingdb:Get*", "vikingdb:List*", "vikingdb:Read*" ], "Resource": [ "trn:vikingdb:cn-beijing:账号ID:vikingdbcollection/resource ID" ] } ] }
搜索框内输入策略名称,查找向量数据库 VikingDB 当前的权限策略,为新建用户勾选对应权限。点击提交权限生效
当选择的策略是自定义策略时,支持限制项目资源。
完成上述配置后,回到用户列表,可通过点击用户名或操作列中的「管理」按钮对用户权限进行管理。
登录设置
在【登录设置】tab页,可以再次管理控制台登录的开关/密码。
权限设置
主账号创建子账号后,需要为子账号绑定策略,子账号才会有权限访问向量数据库。
在【权限】tab页,点击「添加权限」,在策略列表中勾选相应的策略即可快速地为用户组中的所有用户授予对应的权限。
密钥设置
在【密钥】tab页,点击「新建密钥」,即可创建Access Key ID和Secret Access Key。
说明
在控制台左上角显示了当前所在的项目,下拉可以切换不同项目,默认会在【default】项目下。
点击【管理项目】,进入访问控制页面,可以看到更详细的项目信息并进行更精细的项目权限管理。
点击某个具体项目,可以看到该项目下不同类型的资源和权限策略
说明
详细的资源项目管理可参考帮助文档
不同数据集可标识不同标签,便于后续分类管理,标签以键值(key - value)形式呈现。
在费用中心的【分账账单】中,可以分项目和标签查看账单