mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-22 23:42:16 +00:00
# Which Problems Are Solved For existing customers it could be hard to understand the new aligned terms we have defined, if they are already used to the "old term" # How the Problems Are Solved Adding notes at the top of docs pages to state clearliy new and old terms.
60 lines
2.6 KiB
Plaintext
60 lines
2.6 KiB
Plaintext
---
|
|
title: ZITADEL Roles and Role Assignments
|
|
description: "Define custom roles and manage user role assignments within your ZITADEL projects."
|
|
sidebar_label: Roles and Role Assignments
|
|
---
|
|
|
|
<TerminologyUpdate
|
|
newTerm="Role Assignment"
|
|
oldTerms={["User Grant", "Authorization"]}
|
|
/>
|
|
|
|
If you built out the [POS use case example](./projects-overview#example-scenario), you would probably need an application for administration.
|
|
In this application you would probably have somebody accessing as an accountant and somebody as an administrator, who is somebody with enhanced rights.
|
|
To achieve this, you would have to add this distinction as roles.
|
|
To add roles, jump to the section **Roles** and create those new roles with the following values
|
|
|
|
- Key: admin
|
|
- Display Name: Administrator
|
|
- Group: Administration
|
|
|
|
and
|
|
|
|
- Key: account
|
|
- Display Name: Accountant
|
|
- Group: Administration
|
|
|
|
<img src="/docs/img/guides/console/addrole.png" alt="Add roles" />
|
|
|
|
The **Key** is used for coding (can then, for example, be requested in the ID Token).
|
|
|
|
The **Display Name** is just for you to remember its use case
|
|
|
|
The **Group** is to make it easier to assign multiple roles at once.
|
|
|
|
<img src="/docs/img/guides/console/roles.png" width="750px" alt="Roles" />
|
|
|
|
> The role client is for another application of the project `POS`, as all possible roles from your POS applications are defined in your project.
|
|
|
|
## Role Assignments
|
|
|
|
Now, to make use of these roles, add a role assignment.
|
|
A role assignment combines a user of your organization with one or multiple roles.
|
|
|
|
> You can also add users of other organizations. Click on the hint below the username field to create an [external user role assignment](/concepts/features/external-user-grant).
|
|
|
|
<img src="/docs/img/guides/console/authusers.png" width="500px" alt="Auth users" />
|
|
|
|
If you want to test your application with your own user, navigate to the **Role Assignments** section under your project and click on **new**.
|
|
|
|
Type your username, hit "Continue," select the roles you want your user to have, and save. If you want to add all roles of the Administration group, you can click on the group to select all.
|
|
|
|
<img
|
|
src="/docs/img/guides/console/authorization.png"
|
|
width="750px"
|
|
alt="RoleAssignments"
|
|
/>
|
|
|
|
Now you can retrieve those roles in your application. ZITADEL has [multiple settings](./projects-overview#project-settings) for you to access them more easily. Navigate to the **General** section of your project for more settings.
|
|
|
|
> Note: We set up the role assignments from projects, but this can be achieved from multiple locations in the console. You can view and assign roles from the organization, the projects, or from the users page. |