Assign a role
Assign a role to give a user permissions: for the whole cluster or in one VDC (virtual data center). For how roles and scopes relate to each other, see Roles and access.
Before you begin
- You need the Cluster master role or a custom role with the Assign User Role privilege.
- The user exists — Create a user and set a password. Roles cannot be assigned to the built-in
superadminaccount. - The role is chosen: built-in or custom — Create a custom role.
- For a role in a VDC, the VDC already exists — Create a VDC.
Assign the role
-
In the left menu, select Provider Data Center → Users & Roles.
-
Click the user row in the table on the Users tab. The user page opens.
-
Select Actions → Assign a role. The Are you sure want to assign a role to user <name>? window opens.
-
Select the role in the User role field. Built-in roles in this list are named differently — see the mapping in the table below.
The Cluster master role gives full access to the cluster, including users and the security policy. Assign it only to cluster administrators.
-
Select the VDC in the VDC field. Cluster-wide roles — Cluster master, Security Admin, Resource viewer — do not have this field.
-
Click Assign. The button is unavailable until a role is selected, or if this role is already assigned in this VDC. The web interface shows User <name> (id: <number>) is now <role> in <VDC>.
How built-in roles are named in the User role field:
| In the User role field | Role |
|---|---|
Cluster Master | Cluster master |
Security Admin | Security Admin |
Resource Viewer | Resource viewer |
vDC Admin | VDC admin |
VM Developer | Vm Developer |
vDC User | VDC user |
vDC Viewer | VDC viewer |
Custom roles appear in the list under the names they were given at creation.
Check the result
Open the Assigned roles section on the user page. A role in a VDC appears in the Roles column in the row of that VDC. A cluster-wide role is in the row where VDC ID is 0.
The server applies the role to the user's next request: the user does not need to sign in again. The user sees the menu items and actions of the new role after refreshing the web interface page: the web interface loads permissions at sign-in and when a page opens.
More
-
You can assign one role to a user in several VDCs: repeat the steps for each VDC.
-
You grant roles in a VDC only here, on the user page. On the VDC page, the VDC roles block only shows them — Assign roles within a VDC.
-
To remove a role, click ⋯ in the VDC row of the Assigned roles section and select Deassign a Role — the role name is shown next to the item — then Deassign in the confirmation window. The same works through Actions → Deassign a Role on the user page: select VDC and User role and click Deassign. If you remove your own last Cluster master role, the web interface warns Your session will be interrupted and ends your session.
Next
- Restrict sign-in by address (CIDR) and virtual host
- Roles and access — scopes and built-in roles.
- Roles and privileges — the full set of privileges in each role.
API methods: user-role-assign, user-role-deassign — in the API reference.