Editing a role
If you have a ClickHouse® role, you can edit role inheritance and permission blocks.
Once a role is created, you cannot edit role name (spec.name) and cluster name (spec.cluster).
Using the CLI
- Get the list of roles in the project:
kubectl get clickhouserole -n <project_name>. - Open the resource for editing:
kubectl edit clickhouserole <resource_name> -n <project_name>. - Edit the
spec.membershipandspec.grantsfields and save the file.
Each time a resource is edited, grants are recreated in ClickHouse®: the current set of privileges is revoked and a new one from spec.grants is applied. Role inheritance is synchronized based on spec.membership.
For a full list of allowed privileges for each block type, see Allowed privileges.
Using the management console
-
If you have not opened a project yet, select one.
-
In the left-hand menu, select ClickHouse® Clusters.
-
Select a cluster.
-
Navigate to the Roles tab.
-
Click the role name to open the card. The General tab shows inheritance, permission blocks, and status. To view the resource manifest, go to the YAML tab.
-
Click Edit.
-
Edit the roles in the Inherit roles from field and the permission blocks in the Access permissions section:
- To add a permission block, click Add.
- To delete a permission block, click Delete next to the block.
- To change the block type, select a different value in the Permissions for switch. Fields not belonging to the new type get cleared.
-
Click Save.