Prerequisites
The prerequisites for this guide depend on the interface that you use.- Web console
- CLI
Make sure you are in a group that has the
admin role within your tenant; for example, the default admins group. You can check this in the Administration → IAM section of the web console.Setting up custom groups
To create a group and set up its permissions, go through the following steps:- Web console
- CLI
-
Create a group within your tenant or project:
- In the sidebar, go to
Administration → IAM.
- Click Create entity and select Group.
- In the window that opens, specify the group name and define its scope by selecting either your tenant or a specific project in the tenant.
- Click Create to finish creating the group.
- In the sidebar, go to
-
Create an access permit for the group:
- Open the newly created group and switch to the Access permits tab.
- Click Manage permits.
-
In the window that opens, select the resource that you want the group to have access to. The available resources depend on the scope of the group:
- A group created in a tenant can have permits for the tenant, any projects and resources within it.
- A group created in a project can only have permits for this project and resources within it.
- Select roles to assign to the group. These roles define the permissions of the group members.
- Click Save to apply your changes.
- Add members to the group.
Examples
- CLI
Project resources editors
Project resources editors
In this example, you will create a group within a project that gives its members permissions to create, read, update or delete any resources in this project. However, the members of this group will not be able to manage groups and permissions. This set of permissions is provided by the After the operation is completed, use the group ID in the
editor role.Run the following command to create the group and an access permit, and save the group ID to an environment variable:PROJECT_EDITOR_GROUP_ID variable to add members to this group.Granular permissions within a tenant
Granular permissions within a tenant
In this example, you will create a group within a tenant that gives its members permissions to view all resources in the tenant but only manage one specific MysteryBox secret. This set of permissions is provided by the After the operation is completed, use the group ID in the
viewer and editor roles for various resources.Run the following command to create the group and access permits, and save the group ID to an environment variable:SECRET_EDITOR_GROUP_ID variable to add members to this group.Revoking role assignments
To revoke the role that you previously assigned to a group:- Web console
- CLI
Remove the access permit that assigned this role:
- In the sidebar, go to
Administration → IAM.
- Switch to the Groups tab and select the group you want to update.
- On the group page, switch to the Access permits tab.
- Click
→ Manage permits next to the name of the resource.
- In the window that opens, deselect individual permits or click Delete permits to remove all access permits from the group.