diff --git a/v2.5.x/assets/privilege_group_illustrated.png b/v2.5.x/assets/privilege_group_illustrated.png new file mode 100644 index 000000000..03378f93a Binary files /dev/null and b/v2.5.x/assets/privilege_group_illustrated.png differ diff --git a/v2.5.x/assets/users_roles_privileges.png b/v2.5.x/assets/users_roles_privileges.png new file mode 100644 index 000000000..f1d51ca08 Binary files /dev/null and b/v2.5.x/assets/users_roles_privileges.png differ diff --git a/v2.5.x/site/en/adminGuide/drop_users_roles.md b/v2.5.x/site/en/adminGuide/drop_users_roles.md new file mode 100644 index 000000000..b56181e79 --- /dev/null +++ b/v2.5.x/site/en/adminGuide/drop_users_roles.md @@ -0,0 +1,232 @@ +--- +id: drop_users_roles.md +related_key: enable RBAC +summary: To ensure data security, it is recommend that you drop users and roles that are no longer in use. This guide introduces how to drop users and roles. +title: Drop Users & Roles +--- + +# Drop Users & Roles + +To ensure data security, it is recommend that you drop users and roles that are no longer in use. This guide introduces how to drop users and roles. + +## Drop a user + +The following example demonstrates how to drop the user `user_1`. + +
Level + + | Resource + + | Grant Method + + | Notes + + |
---|---|---|---|
Collection + + + + | A specific collection + + + + | client.grant_privilege_v2(role_name="roleA", privilege="CollectionAdmin", collection_name="col1", db_name="db1") + + | Input the name of your target collection and the name of the database to which the target collection belongs. + + + + |
All collections under a specific database + + | client.grant_privilege_v2(role_name="roleA", privilege="CollectionAdmin", collection_name="*", db_name="db1") + + | Input the name of your target database and a wildcard | |
**Database** + + | A specific database + + | client.grant_privilege_v2(role_name="roleA", privilege="DatabaseAdmin", collection_name="*", db_name="db1") + + | Input the name of your target database and a wildcard |
+ + | All databases under the current instance + + | client.grant_privilege_v2(role_name="roleA", privilege="DatabaseAdmin", collection_name="*", db_name="*") + + | Input |
**Instance** + + | The current instance + + | client.grant_privilege_v2(role_name="roleA", privilege="ClusterAdmin", collection_name="*", db_name="*") + + | Input |
**Type ** + + | **Privilege** + + | **Description** + + | **Relevant API description on the client side** + + |
---|---|---|---|
Database Privileges + + | ListDatabases + + | View all databases in the current instance + + | [ListDatabases](https://milvus.io/docs/manage_databases.md) + + |
DescribeDatabase + + | View the details of a database + + | [DescribeDatabase](https://milvus.io/docs/manage_databases.md) + + | |
CreateDatabase + + | Create a database + + | [CreateDatabase](https://milvus.io/docs/manage_databases.md) + + | |
DropDatabase + + | Drop a database + + | + + | |
AlterDatabase + + | Modify the properties of a database + + | [AlterDatabase](https://milvus.io/docs/manage_databases.md) + + | |
Collection Privileges + + + + | GetFlushState + + | Check the status of the collection flush operation + + | [GetFlushState](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/Collection/flush.md) + + |
GetLoadState + + | Check the load status of a collection + + | + + | |
GetLoadingProgress + + | Check the loading progress of a collection + + | + + | |
ShowCollections + + | View all collections with collection privileges + + | [ShowCollections](https://milvus.io/docs/view-collections.md) + + | |
ListAliases + + | View all aliases of a collection + + | + + | |
DescribeCollection + + | View the details of a collection + + | + + | |
DescribeAlias + + | View the details of an alias + + | + + | |
GetStatistics + + | Obtain the statistics of a collection (eg. The number of entities in a collection) + + | + + | |
CreateCollection + + | Create a collection + + | [CreateCollection](https://milvus.io/docs/create-collection.md) + + | |
DropCollection + + | Drop a collection + + | [DropCollection](https://milvus.io/docs/drop-collection.md) + + | |
Load + + | Load a collection + + | [LoadCollection](https://milvus.io/docs/load-and-release.md)/[GetLoadingProgress](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/utility/loading_progress.md)/[GetLoadState](https://milvus.io/api-reference/restful/v2.5.x/v2/Collection%20(v2)/Get%20Load%20State.md) + + | |
Release + + | Release a collection + + | [ReleaseCollection](https://milvus.io/docs/load-and-release.md) + + | |
Flush + + + + | Persist all entities in a collection to a sealed segment. Any entity inserted after the flush operation will be stored in a new segment. + + | [Flush](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/Collection/flush.md)/[GetFlushState](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/Collection/flush.md) + + | |
Compaction + + | Manually trigger compaction + + | + + | |
RenameCollection + + | Rename a collection + + | [RenameCollection](https://milvus.io/docs/modify-collection.md) + + | |
CreateAlias + + | Create an alias for a collection + + | + + | |
DropAlias + + | Drop the alias of a collection + + | + + | |
FlushAll + + | Flush all collections in a database + + | [FlushAll](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/utility/flush_all.md) + + | |
Partition Privileges + + | HasPartition + + | Check whether a partition exists + + | [HasPartition](https://milvus.io/docs/manage-partitions.md) + + |
ShowPartitions + + | View all partitions in a collection + + | [ShowPartitions](https://milvus.io/docs/manage-partitions.md) + + | |
CreatePartition + + | Create a partition + + | [CreatePartition](https://milvus.io/docs/manage-partitions.md) + + | |
DropPartition + + | Drop a partition + + | [DropPartition](https://milvus.io/docs/manage-partitions.md) + + | |
Index Privileges + + | IndexDetail + + | View the details of an index + + + + | + + |
CreateIndex + + | Create an index + + | [CreateIndex](https://milvus.io/docs/index-vector-fields.md?tab=floating) + + | |
DropIndex + + | Drop an index + + | [DropIndex](https://milvus.io/docs/index-vector-fields.md?tab=floating) + + | |
Resource Management Privileges + + + + | LoadBalance + + | Achieve load balance + + | + + |
CreateResourceGroup + + | Create a resource group + + | + + | |
DropResourceGroup + + | Drop a resource group + + | [DropResourceGroup](https://milvus.io/docs/resource_group.md) + + | |
UpdateResourceGroups + + | Update a resource group + + | [UpdateResourceGroups](https://milvus.io/docs/resource_group.md) + + | |
DescribeResourceGroup + + | View the details of a resource group + + | [DescribeResourceGroup](https://milvus.io/docs/resource_group.md) + + | |
ListResourceGroups + + | View all resource groups of the current instance + + | [ListResourceGroups](https://milvus.io/docs/resource_group.md) + + | |
TransferNode + + | Transfer nodes between resource groups + + | + + | |
TransferReplica + + | Transfer replicas between resource groups + + | [TransferReplica](https://milvus.io/docs/resource_group.md) + + | |
BackupRBAC + + | Create a backup for all RBAC related operations in the current instance + + | BackupRBAC + + | |
RestoreRBAC + + | Restore a backup of all RBAC related operations in the current instance + + | RestoreRBAC + + | |
Entity Privileges + + + + | Query + + | Conduct a query + + | + + |
Search + + | Conduct a search + + | + + | |
Insert + + | Insert entities + + | + + | |
Delete + + | Delete entities + + | + + | |
Upsert + + | Upsert entities + + | + + | |
Import + + | Bulk insert or import entities + + | + + | |
RBAC Privileges + + | CreateOwnership + + | Create a user or a role + + | [CreateUser/CreateRole](https://zilliverse.feishu.cn/wiki/CnzkwQBW3i7bE3kVtLzcqQLtn9d) + + |
UpdateUser + + | Update the password of a user + + | [UpdateCredential](https://zilliverse.feishu.cn/wiki/CnzkwQBW3i7bE3kVtLzcqQLtn9d) + + | |
DropOwnership + + | Drop a user password or a role + + | [DeleteCredential/DropRole](https://zilliverse.feishu.cn/wiki/OqZnwJHrJilLPukfvp5cSgnmnTh) + + | |
SelectOwnership + + | View all users that are granted a specific role + + | [SelectRole/SelectGrant](https://zilliverse.feishu.cn/wiki/ZsNZwn1MkiOtH9kFU35cyRgVnue) + + | |
ManageOwnership + + | Manage a user or a role or grant a role to a user + + | + + | |
SelectUser + + | View all roles granted to a user + + | [SelectUser](https://zilliverse.feishu.cn/wiki/ZsNZwn1MkiOtH9kFU35cyRgVnue) + + | |
CreatePrivilegeGroup + + | Create a privilege group + + | [CreatePrivilegeGroup](https://zilliverse.feishu.cn/wiki/FpV8wdWcZiDwnQkBloucYF7wnUg) + + | |
DropPrivilegeGroup + + | Drop a privilege group + + | [DropPrivilegeGroup](https://zilliverse.feishu.cn/wiki/FpV8wdWcZiDwnQkBloucYF7wnUg) + + | |
ListPrivilegeGroups + + | View all privilege groups in the current instance + + | [ListPrivilegeGroups](https://zilliverse.feishu.cn/wiki/FpV8wdWcZiDwnQkBloucYF7wnUg) + + | |
OperatePrivilegeGroup + + | Add privileges to or remove privileges from a privilege group + + | [OperatePrivilegeGroup](https://zilliverse.feishu.cn/wiki/FpV8wdWcZiDwnQkBloucYF7wnUg) + + |
**Privilege** + + | **CollectionReadOnly** + + | **CollectionReadWrite** + + | **CollectionAdmin** + + |
---|---|---|---|
Query + + | ✔️ + + | ✔️ + + | ✔️ + + |
Search + + | ✔️ + + | ✔️ + + | ✔️ + + |
IndexDetail + + | ✔️ + + | ✔️ + + | ✔️ + + |
GetFlushState + + | ✔️ + + | ✔️ + + | ✔️ + + |
GetLoadState + + | ✔️ + + | ✔️ + + | ✔️ + + |
GetLoadingProgress + + | ✔️ + + | ✔️ + + | ✔️ + + |
HasPartition + + | ✔️ + + | ✔️ + + | ✔️ + + |
ShowPartitions + + | ✔️ + + | ✔️ + + | ✔️ + + |
ListAliases + + | ✔️ + + | ✔️ + + | ✔️ + + |
DescribeCollection + + | ✔️ + + | ✔️ + + | ✔️ + + |
DescribeAlias + + | ✔️ + + | ✔️ + + | ✔️ + + |
GetStatistics + + | ✔️ + + | ✔️ + + | ✔️ + + |
CreateIndex + + | ❌ + + | ✔️ + + | ✔️ + + |
DropIndex + + | ❌ + + | ✔️ + + | ✔️ + + |
CreatePartition + + | ❌ + + | ✔️ + + | ✔️ + + |
DropPartition + + | ❌ + + | ✔️ + + | ✔️ + + |
Load + + | ❌ + + | ✔️ + + | ✔️ + + |
Release + + | ❌ + + | ✔️ + + | ✔️ + + |
Insert + + | ❌ + + | ✔️ + + | ✔️ + + |
Delete + + | ❌ + + | ✔️ + + | ✔️ + + |
Upsert + + | ❌ + + | ✔️ + + | ✔️ + + |
Import + + | ❌ + + | ✔️ + + | ✔️ + + |
Flush + + | ❌ + + | ✔️ + + | ✔️ + + |
Compaction + + | ❌ + + | ✔️ + + | ✔️ + + |
LoadBalance + + | ❌ + + | ✔️ + + | ✔️ + + |
CreateAlias + + | ❌ + + | ❌ + + | ✔️ + + |
DropAlias + + | ❌ + + | ❌ + + | ✔️ + + |
**Privilege** + + | **DatabaseReadOnly** + + | **DatabaseReadWrite** + + | **DatabaseAdmin** + + |
---|---|---|---|
ShowCollections + + | ✔️ + + | ✔️ + + | ✔️ + + |
DescribeDatabase + + | ✔️ + + | ✔️ + + | ✔️ + + |
CreateCollection + + | ❌ + + | ❌ + + | ✔️ + + |
DropCollection + + | ❌ + + | ❌ + + | ✔️ + + |
AlterDatabase + + | ❌ + + | ✔️ + + | ✔️ + + |
**Privilege** + + | **ClusterReadOnly** + + | **ClusterReadWrite** + + | **ClusterAdmin** + + |
---|---|---|---|
ListDatabases + + | ✔️ + + | ✔️ + + | ✔️ + + |
RenameCollection + + | ❌ + + | ❌ + + | ✔️ + + |
CreateOwnership + + | ❌ + + | ❌ + + | ✔️ + + |
UpdateUser + + | ❌ + + | ❌ + + | ✔️ + + |
DropOwnership + + | ❌ + + | ❌ + + | ✔️ + + |
SelectOwnership + + | ✔️ + + | ✔️ + + | ✔️ + + |
ManageOwnership + + | ❌ + + | ❌ + + | ✔️ + + |
SelectUser + + | ✔️ + + | ✔️ + + | ✔️ + + |
BackupRBAC + + | ❌ + + | ❌ + + | ✔️ + + |
RestoreRBAC + + | ❌ + + | ❌ + + | ✔️ + + |
CreateResourceGroup + + | ❌ + + | ❌ + + | ✔️ + + |
DropResourceGroup + + | ❌ + + | ❌ + + | ✔️ + + |
UpdateResourceGroups + + | ❌ + + | ✔️ + + | ✔️ + + |
DescribeResourceGroup + + | ✔️ + + | ✔️ + + | ✔️ + + |
ListResourceGroups + + | ✔️ + + | ✔️ + + | ✔️ + + |
TransferNode + + | ❌ + + | ✔️ + + | ✔️ + + |
TransferReplica + + | ❌ + + | ✔️ + + | ✔️ + + |
CreateDatabase + + | ❌ + + | ❌ + + | ✔️ + + |
DropDatabase + + | ❌ + + | ❌ + + | ✔️ + + |
FlushAll + + | ❌ + + | ✔️ + + | ✔️ + + |
CreatePrivilegeGroup + + | ❌ + + | ❌ + + | ✔️ + + |
DropPrivilegeGroup + + | ❌ + + | ❌ + + | ✔️ + + |
ListPrivilegeGroups + + | ❌ + + | ❌ + + | ✔️ + + |
OperatePrivilegeGroup + + | ❌ + + | ❌ + + | ✔️ + + |