> For the complete documentation index, see [llms.txt](https://docs.pipekit.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pipekit.io/organizations-and-access/rbac/set-up.md). Agents can also search and read this documentation through its [MCP server](https://docs.pipekit.io/~gitbook/mcp).

# Set Up Multi-tenant RBAC

Switch your organization from basic permissions to multi-tenant RBAC, then add teams.

{% hint style="warning" %}
Your first RBAC policy changes access to everything your organization has today. Permissions on the `Users` tab stop applying. Pipes and templates created before the switch belong to no workspace, and nobody can open them until they move into one. Plan the switch with Pipekit before you publish. Ask your Pipekit account contact or email `hello@pipekit.io`, and Pipekit works with you to move your existing pipes and templates into workspaces.
{% endhint %}

This page takes your organization from basic permissions to multi-tenant RBAC. For what multi-tenant RBAC is, refer to [Multi-tenant RBAC](https://docs.pipekit.io/organizations-and-access/rbac.md).

## What changes at the first publish

The first publish switches your organization from basic permissions to multi-tenant RBAC. From that moment, the policy alone decides who can do what:

* The permissions you granted on the `Users` tab no longer apply.
* A user whose email and groups match no binding has no access. Pipekit tells them to ask their Org Admin.
* The `orgAdmin` role covers organization settings and clusters only. An Org Admin sees no runs, pipes, or templates without a workspace role.
* Only Org Admins can open the `Org` page and the `Clusters` list.
* Users see a workspace switcher, and pages carry the workspace in their URL. For what users see, refer to [Workspaces](https://docs.pipekit.io/using-pipekit/workspaces.md) in Using Pipekit.

## Set up your organization

{% hint style="warning" %}
On a self-hosted control plane, multi-tenant RBAC needs OpenFGA. Before step 1, install OpenFGA, then set `openfga.enabled` to `true` and `openfga.apiUrl` to your OpenFGA API in your Helm values. For the values, refer to [Helm Install](https://docs.pipekit.io/self-hosting-pipekit/dependencies/helm-install.md). Do not publish a policy while `openfga.enabled` is `false`, the default. Pipekit then switches off basic permissions but allows every RBAC check, so every user gets full access.
{% endhint %}

1. **Configure SSO and SCIM.** Connect your identity provider, as described for [Okta](https://docs.pipekit.io/organizations-and-access/sso/okta.md) and [Microsoft Entra](https://docs.pipekit.io/organizations-and-access/sso/entra.md). Assign your groups to the Pipekit app in your identity provider. By default, your identity provider syncs only the groups you assign to the Pipekit app, not every group in your directory. Check that the groups appear on the `Groups` tab under `People & Access`.
2. **Connect your clusters.** Refer to [Clusters](https://docs.pipekit.io/using-pipekit/clusters.md).
3. **Plan your workspaces.** Decide which `{cluster, namespace}` pairs each team works in. Each pair can belong to one workspace only.
4. **Write the policy.** Bind your admin group to `orgAdmin` and each team group to its workspace. Use a `user:` binding for one person only when no group fits, for example a CI account. For the file format, refer to [Publish RBAC Policy](https://docs.pipekit.io/organizations-and-access/rbac/publish-rbac-policy.md#create-a-policy-file).
5. **Check the policy before you publish.**
   * Grant `orgAdmin` to yourself, to at least one other person, and to your CI account. Pipekit rejects a policy unless an `orgAdmin` grant names a `user:` email or an IdP group that exists. Pipekit does not check that the `user:` email belongs to a Pipekit account, so check the CI email for typos. If every `orgAdmin` grant goes to an IdP group with no members, Pipekit only warns. That publish locks out every Org Admin until a member syncs to one of those groups.
   * Give every Org Admin who works with runs a workspace role as well.
   * Confirm that each `idp:team:` name matches a group on the `Groups` tab. A binding to a group that has not synced yet is a warning, and it starts to work when the group appears.
6. **Run a dry run and read the plan.** Refer to [Validate Without Publishing](https://docs.pipekit.io/organizations-and-access/rbac/publish-rbac-policy.md#validate-without-publishing).
7. **Publish the policy.** Your first publish needs the basic admin permission from the `Users` tab. Refer to [Publish a Policy](https://docs.pipekit.io/organizations-and-access/rbac/publish-rbac-policy.md#publish-a-policy).
8. **Check the access each user has.** Open `Users` under `People & Access`. Refer to [Viewing access under a multi-tenant RBAC policy](https://docs.pipekit.io/organizations-and-access/members.md#viewing-access-under-a-multi-tenant-rbac-policy).

Invite a user by email only when your identity provider does not provision them through SCIM.

## Set up a team

1. **Add the team's workspace to the policy.** Give it a name and bind the relevant `{cluster, namespace}` pairs.
2. **Bind the team's groups to roles.** For example, `team-data-engineers` gets Editor in dev and Viewer in prod, and `team-data-leads` gets Editor in both.
3. **Assign the groups to the Pipekit app in your identity provider, so that they sync.**
4. **Publish the new policy version.**
5. **Add users to the groups in your identity provider.** Their access follows their group membership, with no change in Pipekit.

To check who can do what in the workspace, open `Users` under `People & Access` and filter by that workspace.
