指引 (Reference)
用户和角色(Users_and_roles)

用户和角色

本主题介绍了基于角色的访问控制(RBAC)中用户、角色、对象和权限的定义。

  • 对象: 要授予或拒绝访问权限的对象。对象可以是集合、分区等。

  • 用户: 具有用户名和相应密码的用户标识。

  • 权限: 权限定义了可以执行的操作和可以访问的资源。不能直接将权限授予用户,必须首先将其授予角色。

  • 角色: 角色定义了用户对某些对象具有的权限。将角色绑定到用户后,用户将继承授予此角色的所有权限。

下图说明了对象、权限、角色和用户之间的关系。

users_and_roles

对象、权限、角色和用户之间的关系。

Milvus 默认创建了一个名为 root 的用户,密码为 Milvusroot 用户被授予了 admin 权限,这意味着 root 用户可以访问所有资源和执行所有操作。

如果用户绑定了 public 角色,则该用户有权访问 DescribeCollectionShowCollectionsIndexDetail 的权限。

下表列出了在 启用 RBAC 时可以选择的值。

对象名称权限名称客户端端相关 API 描述
集合CreateIndexCreateIndex
集合DropIndexDropIndex
集合IndexDetailDescribeIndex/GetIndexState/GetIndexBuildProgress
集合LoadLoadCollection/GetLoadingProgress/GetLoadState
集合GetLoadingProgressGetLoadingProgress
集合GetLoadStateGetLoadState
集合ReleaseReleaseCollection
集合InsertInsert
集合DeleteDelete
集合UpsertUpsert
集合SearchSearch
集合FlushFlush/GetFlushState
集合GetFlushStateGetFlushState
集合QueryQuery
集合GetStatisticsGetCollectionStatistics
集合CompactionCompact
集合ImportBulkInsert/Import
集合LoadBalanceLoadBalance
集合CreatePartitionCreatePartition
集合DropPartitionDropPartition
集合ShowPartitionsShowPartitions
集合HasPartitionHasPartition
全局All本表中的所有 API 操作权限
全局CreateCollectionCreateCollection
全局DropCollectionDropCollection
全局DescribeCollectionDescribeCollection
全局ShowCollectionsShowCollections
全局RenameCollectionRenameCollection
全局FlushAllFlushAll
全局CreateOwnershipCreateUser CreateRole
全局DropOwnershipDeleteCredential DropRole
全局SelectOwnershipSelectRole/SelectGrant
全局ManageOwnershipOperateUserRole OperatePrivilege
全局CreateResourceGroupCreateResourceGroup
全局DropResourceGroupDropResourceGroup
全局DescribeResourceGroupDescribeResourceGroup
全局ListResourceGroupsListResourceGroups
全局TransferNodeTransferNode
全局TransferReplicaTransferReplica
全局CreateDatabaseCreateDatabase
全局DropDatabaseDropDatabase
全局ListDatabasesListDatabases
全局CreateAliasCreateAlias
全局DropAliasDropAlias
全局DescribeAliasDescribeAlias
全局ListAliasesListAliases
用户UpdateUserUpdateCredential
用户SelectUserSelectUser

下一步操作