Skip to main content

Cluster Resource Privileges & Privilege Groups

A privilege refers to the permission of specific operations on certain Zilliz Cloud resources such as clusters, databases, and collections. Privileges are assigned to roles, which are then granted to users, defining the operations users can perform on the resources. An example of a privilege could be the permission to insert data into a collection named collection_01.

A privilege group is a combination of individual privileges. You can create a privilege group of commonly used privileges to simplify the role granting process. For ease-of-use, Zilliz Cloud provides a total of 9 built-in privilege groups on the collection, database, and cluster level.

The following figure illustrates the different granting process of privileges and a privilege group.

SsW6w8kaNhz4iQbEMYmcbUzsnOc

This topic details the built-in privilege groups and privileges that are available in Zilliz Cloud.

Privilege group

Built-in privilege groups

Zilliz Cloud offers a total of 9 built-in privilege groups on the collection, database, and cluster level that you can directly grant when creating roles.

📘Notes

The three levels of built-in privilege groups do not have a cascading relationship. Setting a privilege group at the cluster level does not automatically set permissions for all databases and collections under that instance. Privileges at the database and collection levels need to be set manually.

Collection level privilege groups

  • CollectionReadOnly (COLL_RO): includes privileges to read collection data

  • CollectionReadWrite (COLL_RW): includes privileges to read and write collection data

  • CollectionAdmin (COLL_ADMIN): includes privileges to read and write collection data and manage collections.

The table below lists the specific privileges included in the three built-in privilege groups at the collection level:

PrivilegeCollectionReadOnlyCollectionReadWriteCollectionAdmin
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
AddCollectionField

Database level privilege groups

  • DatabaseReadOnly (DB_RO): includes privileges to read database data

  • DatabaseReadWrite (DB_RW): includes privileges to read and write database data

  • DatabaseAdmin (DB_Admin): includes privileges to read and write database data and manage databases.

The table below lists the specific privileges included in the three built-in privilege groups at the database level:

PrivilegeDatabaseReadOnlyDatabaseReadWriteDatabaseAdmin
ShowCollections
DescribeDatabase
CreateCollection
DropCollection
AlterDatabase

Cluster level privilege groups

  • ClusterReadOnly (Cluster_RO): includes privileges to read instance data

  • ClusterReadWrite (Cluster_RW): includes privileges to read and write instance data

  • ClusterAdmin (Cluster_Admin): includes privileges to read and write instance data and manage instances.

The table below lists the specific privileges included in the three built-in privilege groups at the cluster level:

PrivilegeClusterReadOnlyClusterReadWriteClusterAdmin
ListDatabases
RenameCollection
CreateOwnership
UpdateUser
DropOwnership
SelectOwnership
ManageOwnership
SelectUser
BackupRBAC
RestoreRBAC
CreateResourceGroup
DropResourceGroup
UpdateResourceGroups
DescribeResourceGroup
ListResourceGroups
TransferNode
TransferReplica
CreateDatabase
DropDatabase
FlushAll
CreatePrivilegeGroup
DropPrivilegeGroup
ListPrivilegeGroups
OperatePrivilegeGroup

Custom privilege groups

Private Preview

If the built-in privileges do not meet your needs, you can create custom privilege groups and add specified privileges to the privilege groups using the SDKs.

📘📘 Notes

This is a feature in Private Preview. To request this feature, create a support ticket so we can enable it for you.

Create a custom privilege group

The following example demonstrates how to create a privilege group named privilege_group_1.

python
from pymilvus import MilvusClient
client.create_privilege_group(group_name='privilege_group_1'

Once a custom privilege group is created, you can add privileges to the privilege group.

Add privileges to a custom privilege group

The following example demonstrates how to add privileges PrivilegeBackupRBAC and PrivilegeRestoreRBAC to the privilege group privilege_group_1 that is just created. For details about all the privileges available in Zilliz Cloud, refer to All privileges.

python
from pymilvus import MilvusClient
client.add_privileges_to_group(group_name='privilege_group_1', privileges=['Query', 'Search'])

Once the privileges are added to a privilege group, you can grant the privilege group to a role. For details, refer to Manage Cluster Roles (SDK).

Remove privileges from a custom privilege group

The following example demonstrates how to remove the privilege PrivilegeRestoreRBAC from the privilege group privilege_group_1.

python
from pymilvus import MilvusClient
client.remove_privileges_from_group(group_name='privilege_group_1', privileges='Search')

List privilege groups

The following example demonstrates how to list all existing privilege groups.

python
from pymilvus import MilvusClient
client.list_privilege_groups()

Below is an example output.

bash
PrivilegeGroupItem: <privilege_group:privilege_group_1>, <privileges:('Search', 'Query')>

Drop a custom privilege group

The following example demonstrates how to drop the privilege group privilege_group_1.

python
from pymilvus import MilvusClient
client.drop_privilege_group(group_name='privilege_group_1')

All privileges

The followings are all the privileges available on Zilliz Cloud.

If you need to create your own privilege group with the privileges listed below or create custom roles with privileges, please contact us.

Database privileges

PrivilegeDescription
ListDatabasesView all databases in the current instance
DescribeDatabaseView the details of a database
CreateDatabaseCreate a database
DropDatabaseDrop a database
AlterDatabaseModify the properties of a database

Collection privileges

PrivilegeDescription
GetFlushStateCheck the status of the collection flush operation
GetLoadStateCheck the load status of a collection
GetLoadingProgressCheck the loading progress of a collection
ShowCollectionsView all collections with collection privileges
ListAliasesView all aliases of a collection
DescribeCollectionView the details of a collection
DescribeAliasView the details of an alias
GetStatisticsObtain the statistics of a collection (eg. The number of entities in a collection)
CreateCollectionCreate a collection
DropCollectionDrop a collection
LoadLoad a collection
ReleaseRelease a collection
FlushPersist all entities in a collection to a sealed segment. Any entity inserted after the flush operation will be stored in a new segment.
CompactionManually trigger compaction
RenameCollectionRename a collection
CreateAliasCreate an alias for a collection
DropAliasDrop the alias of a collection
FlushAllFlush all collections in a database
AddCollectionFieldAdd a field to an existing collection

Partition privileges

PrivilegeDescription
HasPartitionCheck whether a partition exists
ShowPartitionsView all partitions in a collection
CreatePartitionCreate a partition
DropPartitionDrop a partition

Index privileges

PrivilegeDescription
IndexDetailView the details of an index
CreateIndexCreate an index
DropIndexDrop an index

Resource management privileges

PrivilegeDescription
LoadBalanceAchieve load balance
CreateResourceGroupCreate a resource group
DropResourceGroupDrop a resource group
UpdateResourceGroupsUpdate a resource group
DescribeResourceGroupView the details of a resource group
ListResourceGroupsView all resource groups of the current instance
TransferNodeTransfer nodes between resource groups
TransferReplicaTransfer replicas between resource groups
BackupRBACCreate a backup for all RBAC related operations in the current instance
RestoreRBACRestore a backup of all RBAC related operations in the current instance

Entity privileges

PrivilegeDescription
QueryConduct a query
SearchConduct a search
InsertInsert entities
DeleteDelete entities
UpsertUpsert entities
ImportBulk insert or import entities

RBAC privileges

PrivilegeDescription
CreateOwnershipCreate a user or a role
UpdateUserUpdate the password of a user
DropOwnershipDrop a user password or a role
SelectOwnershipView all users that are granted a specific role
ManageOwnershipManage a user or a role or grant a role to a user
SelectUserView all roles granted to a user
CreatePrivilegeGroupCreate a privilege group
DropPrivilegeGroupDrop a privilege group
ListPrivilegeGroupsView all privilege groups in the current instance
OperatePrivilegeGroupAdd privileges to or remove privileges from a privilege group
Ctrl I