mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-29 15:38:52 +00:00
chore: rename authorization to role assignment (#11588)
# Which Problems Are Solved As part of the naming consistency initiative, the terms Authorization, User grants, internal authorization and other similar terms that are used in the context of assigning project roles to users are replaced by Role Assignments in the UI, API docs, and documentation. # How the Problems Are Solved By replacing the following terms with Role Assignments in API docs, Console UI, and guides. - Authorization - internal authorization - external authorization - User Grant - Roles and Authorizations By adding a note in the API docs to make it clear that Authorization within the context of Authorization Service API refers to role assignments, not to OAuth authorization as it is still used in the APIs. By updating some screenshots in documentation / guides to show "Role Assignments" instead of "Authorizations" in the UI. # Additional Changes N/A # Additional Context - Closes https://github.com/zitadel/zitadel/issues/11289 --------- Co-authored-by: Copilot <[email protected]>
This commit is contained in:
co-authored by
Copilot
parent
fa5e76661a
commit
93a4ed8857
@@ -5,8 +5,8 @@ sidebar_label: Retrieve User Roles
|
||||
|
||||
This guide explains all the possible ways of retrieving user roles across different organizations and projects using ZITADEL's APIs.
|
||||
|
||||
## What are roles/authorizations/grants in ZITADEL?
|
||||
User roles, user grants, or authorizations refer to the roles that are assigned to a user. These terms are used interchangeably to mean the roles assigned to the user, e.g., the ZITADEL Management Console refers to the pairing of roles and users as authorizations, whereas the APIs refer to them as grants. This guide will use the term roles for application-specific roles (e.g., `admin`, `accountant`, `employee`, `hr`, etc.) and ZITADEL-specific administrator roles (e.g., `IAM_OWNER`, `ORG_OWNER`, `PROJECT_OWNER`, etc.).
|
||||
## What are roles and role assignments in ZITADEL?
|
||||
User role assignments or authorizations refer to the roles that are assigned to a user. These terms are used interchangeably to mean the roles assigned to the user, e.g., the ZITADEL Console refers to the pairing of roles and users as role assignments, whereas the APIs refer to them as authorizations or user grants. This guide will use the term roles for application-specific roles (e.g., `admin`, `accountant`, `employee`, `hr`, etc.) and ZITADEL-specific manager roles (e.g., `IAM_OWNER`, `ORG_OWNER`, `PROJECT_OWNER`, etc.).
|
||||
|
||||
Roles are critical to managing permissions in a single-tenant or multi-tenant application. It can, however, be tricky to retrieve them, especially when spanning multiple organizations and projects.
|
||||
|
||||
@@ -18,8 +18,8 @@ Follow the links below to assign roles to your users.
|
||||
|
||||
- [Add application roles via the ZITADEL Management Console](/guides/manage/console/roles)
|
||||
- [Add administrator roles via the ZITADEL Management Console](/guides/manage/console/administrators)
|
||||
- [Add application roles via the ZITADEL Management API](/reference/api/project)
|
||||
- [Add administrator roles to users via the ZITADEL Management API](/reference/api/management)
|
||||
- [Add application roles via the Project Service API](/reference/api/project/zitadel.project.v2.ProjectService.AddProjectRole)
|
||||
- [Add administrator roles to users via the Internal Permission Service API](/reference/api/internal_permission/zitadel.internal_permission.v2.InternalPermissionService.CreateAdministrator)
|
||||
|
||||
## Retrieve roles
|
||||
|
||||
@@ -34,7 +34,7 @@ How to generate a token:
|
||||
- [Generate tokens for users](/guides/integrate/login/oidc/login-users)
|
||||
- [Generate tokens for service accounts](/guides/integrate/service-accounts/authenticate-service-accounts)
|
||||
|
||||
In order to access role information via the token, you must include the right audience and the necessary role claims in the scope and/or select the required role settings in the ZITADEL management console before requesting the token.
|
||||
To access role information via the token, you must include the right audience and the necessary role claims in the scope and/or select the required role settings in the ZITADEL management console before requesting the token.
|
||||
|
||||
### Determine the audience
|
||||
|
||||
@@ -212,11 +212,10 @@ https://github.com/zitadel/actions/blob/main/examples/custom_roles.js
|
||||
|
||||
### Retrieve roles using the auth API
|
||||
|
||||
Now we will use the auth API to retrieve roles from a logged in user using the user’s token
|
||||
Now we will use the auth API to retrieve roles from a logged-in user using the user’s token
|
||||
The base URL is: **https://`${CUSTOM_DOMAIN}`/auth/v1**
|
||||
|
||||
Let’s start with a user who has multiple roles in different organizations in a multi-tenanted set up. You can use the logged in user’s token or the service account’s token to retrieve the authorizations using the [APIs listed under user authorizations/grants in the auth API](/reference/api/authorization).
|
||||
|
||||
Let’s start with a user who has multiple roles in different organizations in a multi-tenanted setup. You can use the logged-in user’s token or the service account’s token to retrieve the roles assigned to this user using the [APIs listed under user authorizations/grants in the auth API](/reference/api/authorization/zitadel.authorization.v2.AuthorizationService.ListAuthorizations).
|
||||
**Scope used:** `openid urn:zitadel:iam:org:project:id:zitadel:aud`
|
||||
|
||||
#### **1. [List my project roles](/reference/api/auth/zitadel.auth.v1.AuthService.ListMyProjectPermissions)**
|
||||
@@ -290,9 +289,9 @@ curl -L -X POST 'https://${CUSTOM_DOMAIN}/auth/v1/permissions/zitadel/me/_search
|
||||
}
|
||||
```
|
||||
|
||||
#### **[3. List my authorizations/grants](/reference/api/auth/zitadel.auth.v1.AuthService.ListMyUserGrants)**
|
||||
#### **[3. List my role assignments](/reference/api/auth/zitadel.auth.v1.AuthService.ListMyUserGrants)**
|
||||
|
||||
Returns a list of user grants the authenticated user has. User grants consist of an organization, a project and roles.
|
||||
Returns a list of roles the authenticated user has been assigned. Role assignments (referred to as user grants in the APIs) consist of an organization, a project, and roles.
|
||||
|
||||
**URL: https://`${CUSTOM-DOMAIN}`/auth/v1/usergrants/me/_search**
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ import AppType from "./_application-types.mdx";
|
||||
Applications are the entry point to your [Project Overview](/guides/manage/console/projects-overview)
|
||||
. Users either login into one of your applications (Frontend) and interact with them directly, or use one of your APIs (Backend).
|
||||
|
||||
All applications within a project share the same **Roles** and **Authorizations**. This means you define a role once (e.g., `admin`) on the Project level, and it applies across all your web, mobile, and API applications.
|
||||
All applications within a project share the same **Roles** and **Role Assignments**. This means you define a role once (e.g., `admin`) on the Project level, and it applies across all your web, mobile, and API applications.
|
||||
|
||||
To access your applications, navigate to your Project in the Management Console and select your application.
|
||||
|
||||
@@ -117,13 +117,13 @@ When disabled, ZITADEL enforces strict security and only allows `https`.
|
||||
**Glob Patterns:**
|
||||
Development mode allows the use of glob patterns in Redirect URIs for flexibility:
|
||||
|
||||
| Special Terms | Meaning |
|
||||
| :--- | :--- |
|
||||
| `*` | Matches any sequence of **non-path-separators**. |
|
||||
| `/**/` | Matches zero or more directories. |
|
||||
| `?` | Matches any single non-path-separator character. |
|
||||
| `[class]` | Matches any single character against a class of characters (e.g., `[a-z]`). |
|
||||
| `{alt1,...}` | Matches a sequence if one of the comma-separated alternatives matches. |
|
||||
| Special Terms | Meaning |
|
||||
|:--------------|:----------------------------------------------------------------------------|
|
||||
| `*` | Matches any sequence of **non-path-separators**. |
|
||||
| `/**/` | Matches zero or more directories. |
|
||||
| `?` | Matches any single non-path-separator character. |
|
||||
| `[class]` | Matches any single character against a class of characters (e.g., `[a-z]`). |
|
||||
| `{alt1,...}` | Matches a sequence if one of the comma-separated alternatives matches. |
|
||||
|
||||
<Callout type="note">
|
||||
Double stars (`**`) should appear surrounded by path separators (e.g., `/**/`). A pattern like `path/to/**.txt` is invalid; use `path/to/**/*.txt`.
|
||||
|
||||
@@ -40,7 +40,7 @@ The Management Console enables administrators to perform the following critical
|
||||
2. **Resource Management:** Create, update, and delete essential resources such as [Organizations](./organizations-overview), [Projects](./projects-overview), and [Applications](./applications-overview).
|
||||
3. **User Management:** Manage the lifecycle of [User accounts](./users-overview). This includes creating new users, updating profiles, resetting passwords, and deactivating accounts.
|
||||
4. **Access Control:** Define and manage permissions. Administrators can assign [Roles](/guides/manage/console/roles) to users and configure fine-grained access controls for specific resources.
|
||||
5. **Manager Assignment:** Delegate administrative tasks by assigning **Administrator** roles (e.g., Org Owner, Project Owner) to specific users, ensuring proper oversight and segregation of duties.
|
||||
5. **Administrator Assignment:** Delegate administrative tasks by assigning **Administrator** roles (e.g., Org Owner, Project Owner) to specific users, ensuring proper oversight and segregation of duties.
|
||||
6. **Customization and Branding:** Customize the look and feel of ZITADEL. You can upload custom logos, select color schemes, and apply [branding](/guides/manage/customize/branding) to match your corporate identity.
|
||||
7. **Audit Logging:** Access [Audit Logs](/concepts/features/audit-trail) to track user activity and configuration changes. This is essential for monitoring security events and maintaining regulatory compliance.
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ A Project is the vessel that holds your Applications and Roles. It defines the s
|
||||
Imagine you are building a **Point of Sales (POS)** platform. In ZITADEL, you would create one Project (e.g., named `POS`).
|
||||
* **Applications:** Your web portal for administration, your iOS app, and your Android app would all be defined as **Applications** within this single Project.
|
||||
* **Roles:** You would create **Roles** (e.g., `admin`, `cashier`, `viewer`) inside this Project.
|
||||
* **Authorization:** All applications in this project share these roles, allowing you to create unified authorizations for your users across all platforms.
|
||||
* **Role assignment:** All applications in this project share these roles, allowing you to create unified role assignments for your users across all platforms.
|
||||
|
||||

|
||||
|
||||
@@ -28,7 +28,7 @@ At the moment, we support OIDC and almost every OAuth2 client. We'll be expandin
|
||||
Go to [Applications](./applications-overview) for more details.
|
||||
|
||||
### Roles
|
||||
A role consists of different attributes, but only the **Key** is relevant to the authorization and must be unique within the project.
|
||||
A role consists of different attributes, but only the **Key** is relevant to the role assignment and must be unique within the project.
|
||||
* **Key:** The identifier used in code (e.g., `role.admin`).
|
||||
* **Display Name:** A human-readable name for the UI.
|
||||
* **Group:** Enables better handling in the ZITADEL Management Console (e.g., giving a user all roles of a specific group).
|
||||
@@ -65,7 +65,7 @@ To create a project:
|
||||
A powerful feature of ZITADEL is the ability to **Grant** a project to other organizations. This is essential for B2B scenarios where you sell your software to business partners.
|
||||
|
||||
* **The Concept:** You enable another organization to use your Project.
|
||||
* **Delegation:** The granted organization can manage the authorizations of *their own users* for your project. They can assign the roles you defined to their employees without your intervention.
|
||||
* **Delegation:** The granted organization can manage the role assignments of *their own users* for your project. They can assign the roles you defined to their employees without your intervention.
|
||||
* **Isolation:** You can select specifically which roles are available to the granted organization. This allows you to restrict features (e.g., "Premium" roles) per customer.
|
||||
|
||||
Using the POS example above: You could grant the `POS` project to a partner organization. That partner can then log in with their own domain, use their own branding, and manage their own cashier users, all while using your underlying application structure.
|
||||
@@ -79,7 +79,7 @@ Using the POS example above: You could grant the `POS` project to a partner orga
|
||||
### How to Grant a Project
|
||||
|
||||
1. Navigate to the Project you want to share (e.g., `POS`).
|
||||
2. In the **Grants** section, click **New**.
|
||||
2. In the **Project Grants** section, click **New**.
|
||||
|
||||
<img src="/docs/img/guides/console/grantsmenu.png" alt="Grants" width="170px" />
|
||||
|
||||
@@ -101,11 +101,11 @@ If you have different designs for your organizations (Private Labeling), you can
|
||||
width="400px"
|
||||
/>
|
||||
|
||||
| Setting | Description |
|
||||
| :--- | :--- |
|
||||
| **Unspecified** | If nothing is specified, the system default settings will trigger. |
|
||||
| Setting | Description |
|
||||
|:-----------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| **Unspecified** | If nothing is specified, the system default settings will trigger. |
|
||||
| **Enforce project's policy** | This forces the branding of the organization that *owns* the project throughout the entire login process. Useful if you want your users to always see *your* brand, even if they belong to a partner org. |
|
||||
| **Allow login user policy** | The login starts with the project's branding. However, as soon as the user is identified (e.g., by entering their email), the branding switches to match the user's organization. |
|
||||
| **Allow login user policy** | The login starts with the project's branding. However, as soon as the user is identified (e.g., by entering their email), the branding switches to match the user's organization. |
|
||||
|
||||
In a B2B use case, you would typically use **Allow login user policy**. If you want to skip the detection step, you can preselect an organization using the [primary domain scope](/apis/openidoauth/scopes#reserved-scopes) (e.g., `urn:zitadel:iam:org:domain:primary:{domainname}`).
|
||||
|
||||
@@ -119,7 +119,7 @@ You can configure strict security checks regarding roles during authentication.
|
||||
/>
|
||||
|
||||
* **Assert Roles on Authentication:** Role information is sent from the Userinfo endpoint (and in tokens, depending on app settings).
|
||||
* **Check authorization on Authentication:** Users are **only** allowed to login if they have at least one role assigned for this project. If they have no roles, access is denied immediately.
|
||||
* **Check Role Assignment on Authentication:** Users are **only** allowed to log in if they have at least one role assigned for this project. If they have no roles, access is denied immediately.
|
||||
* **Check for Project on Authentication:** Checks if the user's organization actually has a grant for this project. If not, the user cannot be authenticated.
|
||||
|
||||
### Roles in Tokens
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
---
|
||||
title: ZITADEL Roles and Authorizations
|
||||
sidebar_label: Roles and Authorizations
|
||||
title: ZITADEL Roles and Role Assignments
|
||||
sidebar_label: Roles and Role Assignments
|
||||
---
|
||||
|
||||
If you would build out the [POS use case example](./projects-overview#example-scenario) you would probably need an application for administration.
|
||||
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 build this out, you would have to add this distinction as roles.
|
||||
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
|
||||
@@ -20,35 +20,35 @@ and
|
||||
|
||||
<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 **Key** is used for coding (can then, for example, be requested in the ID Token).
|
||||
|
||||
The **Display Name** is just for you remembering its use case
|
||||
The **Display Name** is just for you to remember its use case
|
||||
|
||||
The **Group** is for making multiple roles selectable more easy.
|
||||
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.
|
||||
|
||||
## Authorizations
|
||||
## Role Assignments
|
||||
|
||||
Now to make use of this roles, add an authorization.
|
||||
An authorization combines a user of your organization with one or multiple roles.
|
||||
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 grant](/concepts/features/external-user-grant).
|
||||
> 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 your wanted to test your application with your own user, navigate to the **Authorizations** section under your project and click on **new**.
|
||||
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.
|
||||
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="Authorization"
|
||||
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 and check your needed ones.
|
||||
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 did set up our authorizations from projects, but this can be achieved from multiple locations in console. You can view and add authorizations from your organization, your projects, or from your users page.
|
||||
> 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.
|
||||
@@ -93,11 +93,11 @@ Metadata can be requested via the Auth and Management APIs, the Userinfo endpoin
|
||||
alt="ID Token settings"
|
||||
/>
|
||||
|
||||
### Authorizations
|
||||
User authorizations (roles) are displayed on user profile pages.
|
||||
### Role Assignments
|
||||
The roles assigned to a user are displayed on user profile pages.
|
||||
|
||||
To access these roles in your application:
|
||||
* **Userinfo Endpoint:** Check the **Assert roles on authentication** box in your [Project Settings](./roles#authorizations).
|
||||
* **Userinfo Endpoint:** Check the **Assert roles on authentication** box in your [Project Settings](./roles#role-assignments).
|
||||
* **ID Token:** Toggle **User roles inside ID Token** in your [Application Settings](./applications-overview).
|
||||
|
||||
## References
|
||||
|
||||
@@ -11,72 +11,74 @@ B2B describes the situation where an organization interacts with other organizat
|
||||
This **multi-tenancy architecture** usually adds some form of complexity to an Identity and Access Management System.
|
||||
In ZITADEL an [organization](/guides/manage/console/organizations-overview) can represent a business partner or partner who typically has its own branding and has different access settings like an additional federated login for its users.
|
||||
|
||||
B2B can be a simple scenario where an organization only shares one of its projects with another organization or have a more complex case where an organization is offering a portal application to all its partners with included (self)administration.
|
||||
B2B can be a simple scenario where an organization only shares one of its projects with another organization or has a more complex case where an organization is offering a portal application to all its partners with included (self)administration.
|
||||
|
||||
## Sample scenario
|
||||
|
||||
Octagon is a fictitious company which is used throughout this guide to explain the details and key concepts of such a B2B scenario.
|
||||
Octagon is a fictitious company used throughout this guide to explain the details and key concepts of such a B2B scenario.
|
||||
Octagon tries to solve multiple tasks in the banking field. Its portfolio includes several applications for their employees, customers, and partners. Some of which are web-based, some of which are used by service accounts only.
|
||||
|
||||
### Portal Application
|
||||
|
||||
Octagon has a **Portal application** where its employees can access their account and list all applications they are allowed to use.
|
||||
Employees work for a department within Octagon or for Octagon itself.
|
||||
Some of the users have enhanced features because they supervise certain teams. Those can onboard new employees and manage their roles and features.
|
||||
Some users have enhanced features because they supervise certain teams. Those can onboard new employees and manage their roles and features.
|
||||
Target groups of the application can be split into:
|
||||
|
||||
- **Employees:** users who are using the application as a starting point for their work.
|
||||
- **Supervisors:** users who are mainly using the application to manage users and their access of their department.
|
||||
- **Administrators:** this users are able to grant additional organizations or departments and elect supervisors.
|
||||
- **Administrators:** users who can grant additional organizations or departments and elect supervisors.
|
||||
|
||||
### Planning considerations
|
||||
|
||||
In order to define the need of the **Portal Application** some planning considerations about organizations have to be made:
|
||||
To define the need of the **Portal Application**, some planning considerations about organizations have to be made:
|
||||
|
||||
- **Login and Access:** Does a user have a preset organization to login? Does the application show the default login page or does each organization use its own branding?
|
||||
- **Organizations:** Does a user have access in multiple organizations? Is a user required to use a different federated login for those organizations?
|
||||
- **Login and Access:** Does a user have a preset organization to login? Does the application show the default login page, or does each organization use its own branding?
|
||||
- **Organizations:** Does a user have access to multiple organizations? Is a user required to use a different federated login for those organizations?
|
||||
- **Roles** Does the application need users to have specific roles assigned within their organizations? Which roles are needed to enable certain features of the application?
|
||||
|
||||
### Login
|
||||
|
||||
You can decide whether a organization is preselected for the login or if the user is redirected to the default login screen. Using OpenID Connect, you can send the user to a specific organization by defining the organization in a [reserved scope](/apis/openidoauth/scopes#reserved-scopes) (primary domain).
|
||||
You can decide whether an organization is preselected for the login or if the user is redirected to the default login screen. Using OpenID Connect, you can send the user to a specific organization by defining the organization in a [reserved scope](/apis/openidoauth/scopes#reserved-scopes) (primary domain).
|
||||
Settings to the branding or the login options of the organization can be made from the organization section in [Console](/guides/manage/console/console-overview).
|
||||
The behavior of the login branding can be set in your projects detail page. You can choose the branding of the selected organization, the user's organization, or the project's organization.
|
||||
The behavior of the login branding can be set in your project detail page. You can choose the branding of the selected organization, the user's organization, or the project's organization.
|
||||
|
||||
### Organizations
|
||||
|
||||
Generally a user belongs to and is managed by one organization, however the user can receive authorizations from multiple other organizations (delegated authorizations). Anyways, a user should be able to use the same identity to switch between organizations.
|
||||
Generally a user belongs to and is managed by one organization, however, a user can be authorized to access projects in other organizations via role assignments. A user should be able to use the same identity to switch between organizations.
|
||||
If this feature is not desired, a separate user for each organization should be created.
|
||||
|
||||
Adding a user from a different organization to the audience of a project can be as easy as adding a new user authorization (user grant). A user grant combines a user from any organization with a project and 0-N roles.
|
||||
Adding a user from a different organization to the audience of a project can be as easy as assigning a new role to a user. A role assignment combines a user from any organization with a project and 0-N roles.
|
||||
|
||||
In our sample scenario, we assume to have the following users:
|
||||
Our sample scenario includes the following users:
|
||||
|
||||
- **Dimitri:** a team leader who is employed by Pentagon, an Octagon department. Dimitri uses his Microsoft Account in combination with his one time password to access the portal. Pentagon therefore has set up Microsoft as Identity Provider. Pentagon also requires its users to secure their accounts with additional factors.
|
||||
- **Michael:** a trainee of Pentagon only using the portal to access his workspace apps. Michael uses his Google Account in combination with his laptops fingerprint.
|
||||
- **Bill:** is employed at Octagon as Administrator of the Portal Application. Bill also uses a Microsoft Account in combination with a Security Key to secure his account.
|
||||
- **Dimitri:** a team leader who is employed by the Pentagon, an Octagon department. Dimitri uses his Microsoft Account in combination with a One Time Password to access the portal. Pentagon therefore has set up Microsoft as their Identity Provider. Pentagon also requires its users to secure their accounts with additional factors.
|
||||
- **Michael:** a trainee of the Pentagon who uses the portal to access his workspace apps. Michael uses his Google Account in combination with biometrics (e.g., his fingerprint on his Laptop).
|
||||
- **Bill:** is employed at Octagon as an Administrator of the Portal Application. Bill also uses a Microsoft Account in combination with a Security Key to secure his account.
|
||||
|
||||
After having determined the constellation of the organizations and its users, all the necessary data (Portal project with roles and app, users, login requirements, identity providers, branding) should be set up in [Console](https://${CUSTOM_DOMAIN}.zitadel.cloud/ui/console/org).
|
||||
A B2B [sample application](https://github.com/zitadel/zitadel-nextjs-b2b). for NextJS can be found [here](../../examples/login/nextjs-b2b).
|
||||
A B2B [sample application](https://github.com/zitadel/zitadel-nextjs-b2b) for NextJS can be found [here](../../examples/login/nextjs-b2b).
|
||||
|
||||
To allow another organization to use a project, a project grant has to be created. Upon creation, roles for a grant can be limited to a subset of the total project roles.
|
||||
|
||||
In our scenario, Octagon creates a project grant for Pentagon. Pentagon is limited to use `writer` and `reader` role. The `admin` role is reserved for the Octagon organization itself.
|
||||
In our scenario, the Octagon creates a project grant for the Pentagon. Pentagon is limited to use `writer` and `reader` role. The `admin` role is reserved for the Octagon organization itself.
|
||||
|
||||
<B2B></B2B>
|
||||
|
||||
### Roles
|
||||
|
||||
In this scenario, Dimitri and Michael share the same organization Pentagon, where as Bill belongs to Octagon. Octagon is owner of the Portal project with its Web App, having Bill configured as user grant with `admin` role. Dimitri owns the `writer` role, whereas Michael only is `reader`.
|
||||
This scenario involves two organizations: Octagon and Pentagon.
|
||||
Bill, a user from the Octagon organization, is assigned the admin role for the Portal project.
|
||||
Dimitri and Michael are both part of the Pentagon organization and have been assigned the `writer` and `reader` roles, respectively.
|
||||
|
||||
> Note: Roles are meant for internal business logic and therefore need to be validated separately, none of the users described are allowed to create user grants, at least if they do not own a ZITADEL administrator role.
|
||||
> Note: Roles are intended for your application's internal business logic and require separate validation.
|
||||
The users in this example cannot manage role assignments for other users unless they have an appropriate ZITADEL administrator role.
|
||||
|
||||
If you made a dashboard where some users are able to create user grants, the Management API to do such operations should be triggered with the personal access token of the users, not with a token of a service account, to create a meaningful audit log.
|
||||
If you had such a use case, ZITADEL administrator roles must be assigned to those users.
|
||||
If you build a dashboard for users to assign roles, you must use the Management API with the user's personal access token and not with a machine user's token. This ensures that all actions are properly recorded in the audit log. To enable this, the users performing these actions must be granted a ZITADEL manager role.
|
||||
|
||||
### Noteworthy
|
||||
|
||||
Due to the fact that ZITADEL includes unlimited users, projects, and applications and comes with all security features in the FREE tier, ZITADEL can be considered a great alternative to other SaaS IAM systems such as Auth0 or Okta.
|
||||
As ZITADEL includes unlimited users, projects, and applications and comes with all security features in the FREE tier, ZITADEL can be considered a great alternative to other SaaS IAM systems such as Auth0 or Okta.
|
||||
In such a case with this high potential of scalability where user counts can grow explosively, ZITADEL does not become the bottleneck and therefore is the valid choice. You can learn more on ZITADELs benefits and the pricing [here](https://zitadel.com/pricing).
|
||||
|
||||
### Learn more
|
||||
|
||||
@@ -17,35 +17,35 @@ This means that the users and also their authorizations will be managed within Z
|
||||
|
||||
## Organization
|
||||
|
||||
An organization is the ZITADEL resource which contains users, projects, applications, policies and so on.
|
||||
In an organization projects and users are managed by the organization.
|
||||
You need at least one organization for your own company in our case "The Timing Company".
|
||||
An organization is the ZITADEL resource that contains users, projects, applications, policies and so on.
|
||||
The organization manages the projects and users.
|
||||
You need at least one organization for your own company, in our case "The Timing Company."
|
||||
Your next step is to create an organization for each of your customers.
|
||||
|
||||
## Project
|
||||
|
||||
The idea of projects is to have a vessel for all components who are closely related to each other.
|
||||
|
||||
In this use case we would have two different projects, for each environment one. So lets call it "Time Dev" and "Time Prod".
|
||||
These projects should be created in "The Timing Company" organization, because it is the owner of the project.
|
||||
In this use case, we would have two different projects, one each for the Development and Production environments.
|
||||
Let us call them "Time Dev" and "Time Prod". These projects should be created in "The Timing Company" organization.
|
||||
|
||||
In the project you will configure all your roles and applications (clients and APIs).
|
||||
|
||||
### Project Settings
|
||||
|
||||
You can configure `check roles on authentication` on the project, if you want to restrict access to users that have the correct authorization for the project.
|
||||
Enable the `check roles on authentication` setting on the project, if you want to restrict access to users that do not have the correct access for the project.
|
||||
|
||||
### Project Grant
|
||||
|
||||
To give a customer permissions to a project, a project grant to the customers organization is needed (search the granted organization by its domain).
|
||||
To grant a customer permission to a project, a project grant to the customer's organization is needed (search the granted organization by its domain).
|
||||
It is also possible to delegate only specific roles of the project to a certain customer.
|
||||
As soon as a project grant exists, the customer will see the project in the granted projects section of their organization and will be able to authorize their own users to the given project.
|
||||
As soon as a project grant exists, the customer will see the project in the granted projects section of their organization and will be able to assign roles to their own users to the given project.
|
||||
|
||||
## Authorizations
|
||||
## Role Assignments
|
||||
|
||||
To give a user permission to a project an authorization is needed.
|
||||
All organizations which own the project or received a grant are able to authorize users.
|
||||
It is also possible to authorize users outside the own company if the exact login name of the user is known.
|
||||
To give a user permission to a project, a role assignment is needed.
|
||||
All organizations that own projects or received a grant can assign roles to users to have access to projects.
|
||||
It is also possible to assign roles to users outside the own company if the exact login name of the user is known.
|
||||
|
||||
## Project Login
|
||||
|
||||
@@ -53,7 +53,7 @@ There are some different use cases how the login should behave and look like:
|
||||
|
||||
1. Restrict Organization
|
||||
|
||||
With the primary domain scope the organization will be restricted to the requested domain, this means only users of the requested organization will be able to login.
|
||||
With the primary domain scope the organization will be restricted to the requested domain; this means only users of the requested organization will be able to log in.
|
||||
The private labeling (branding) and the login policy of the requested organization will be set automatically.
|
||||
|
||||
<Callout>
|
||||
@@ -65,7 +65,7 @@ More about the [Scopes](/apis/openidoauth/scopes)
|
||||
You can configure on project-level which branding should be shown to users.
|
||||
In the default the design of the instance will be shown, but as soon as the user is identified, the policy of the users organization (if specified) will be triggered.
|
||||
If the setting is set to `Ensure Project Resource Owner Setting`, the private labeling of the project organization will always be triggered.
|
||||
The last possibility is to show the private labeling of the project organization and as soon as the user is identified the user organization settings will be triggered.
|
||||
The last possibility is to show the private labeling of the project organization, and as soon as the user is identified, the user organization settings will be triggered.
|
||||
For this the Allow User Resource Owner Setting should be set.
|
||||
<Callout>
|
||||
More about [Private Labeling](/guides/manage/customize/branding)
|
||||
|
||||
@@ -53,7 +53,7 @@ Follow these steps to deploy your first instance:
|
||||
### 4. Create your Project and Application
|
||||
|
||||
In ZITADEL, [**Applications**](/guides/manage/console/applications-overview) are grouped into [**Projects**](/guides/manage/console/projects-overview).
|
||||
This allows multiple applications (like a React frontend and a Go backend) to share the same roles and authorizations.
|
||||
This allows multiple applications (like a React frontend and a Go backend) to share the same roles and role assignments.
|
||||
|
||||
#### Launch the Management Console
|
||||
|
||||
|
||||
Reference in New Issue
Block a user