RBAC Role Mapping
Role-Based Access Control (RBAC) role mapping allows automatic assignment of specific permissions to Airbyte users based on existing roles in your organization. It ensures users have appropriate Airbyte access without manual oversight. RBAC functionality is only available in Airbyte Teams and Self-Managed Enterprise.
Enabling role mapping in Airbyte requires use of the Airbyte API. The Airbyte API exposes endpoints that allow you to retrieve and update user permissions. These endpoints can be used to build automation that manages user access to different workspaces. This functionality is currently limited to the Airbyte API, and is not available in the Terraform Provider.
To enable the Airbyte API in Airbyte Teams or Self-Managed Enterprise, follow these prerequisites.
Relevant API Endpoints
Organization-wide permissions and each set of workspace permissions each count as their own permission object. For example, if an Airbyte user is an 'Organization Member' and has 'Workspace Editor' access in 3 distinct workspaces, this user has 4 permissions in total.
- Get a list of current Airbyte users.
- Get a list of current Airbyte workspaces.
- Provide an Airbyte user with access to a new workspace.
- Get a list of a user's current permissions.
- Modify permission scope or level of access.
- Delete a permmission.
Script Example
Prerequisites
- A mapping of user emails to your company-specific roles (e.g.
finance-team
,security-team
,us-employee
, etc.):
{
"user1@company.com": ["companyGroup1", "companyGroup2"],
"user1@company.com": ["companyGroup2", "companyGroup3"]
}
- A mapping of your company-specific roles to desired Airbyte permissions:
{
"companyGroup1": [
{
"scope": "workspace", ## Must be set to either 'workspace' or 'organization'.
"scopeId": "workspace1",
"permissionType": "workspace_admin" ## Must be set to valid value, listed https://github.com/airbytehq/airbyte-api-python-sdk/blob/main/src/airbyte_api/models/publicpermissiontype.py.
},
{
"scope": "workspace",
"scopeId": "workspace2",
"permissionType": "workspace_reader"
}
],
"companyGroup2": [
{
"scope": "workspace",
"scopeId": "workspace1",
"permissionType": "workspace_reader"
}
]
}
Complete Python Script
Below is an example Python script using the above prerequisite files and the airbyte-api
Python package to set user roles programmatically:
RBAC Role Mapping Python Example
With the script enabled, you are free to configure it on a CRON job to run at the frequency of your choice.