Skip to content

Role-based access control

Basin Catalog supports object-level role-based access control (RBAC). Instead of granting access to every catalog in an account, you can scope access to specific catalogs, namespaces, tables, and views.

Use object-level access to follow the principle of least privilege. For example, you can give an analytics team read access to a single namespace, or give an ingestion pipeline write access to only the tables it updates.

You can assign object-level access to account members through permission policies, and to Account API tokens through the token permission editor. User API tokens do not support object-level Basin Catalog access.

Roles and permissions

Object-level access uses two roles for account members. Account API tokens use a single permission with Read and Edit levels.

Account member role Account API token permission Access granted
Basin Catalog Object Reader Basin Catalog Object > Read Read catalog metadata for the selected objects. For example, list namespaces and load tables.
Basin Catalog Object Editor Basin Catalog Object > Edit Read and write catalog metadata for the selected objects. For example, create or drop tables and commit transactions.

Object hierarchy and inheritance

Basin Catalog organizes objects in a hierarchy:

  • Catalog — The top level. Each catalog belongs to one R2 bucket.
  • Namespace — A group of tables and views inside a catalog.
  • Table — An Apache Iceberg table inside a namespace.
  • View — An Apache Iceberg view inside a namespace.

Access is inherited down the hierarchy. When you select a catalog or namespace, the grant also covers every namespace, table, and view inside it.

When you select a catalog or namespace in the object picker, the dashboard marks the objects inside it as inherited. If you had already selected any of those objects individually, the dashboard removes them from the selection because the parent grant already covers them.

You can select objects from more than one catalog in the same policy or token.

R2 storage permissions

An object-level Basin Catalog grant authorizes catalog metadata operations only. To read or write table data, the member or token also needs R2 storage permissions on the bucket that stores the catalog.

The dashboard does not add R2 storage permissions to a policy or token automatically. Add them in a separate policy. For more information about the R2 storage permissions that Iceberg engines need, refer to Authenticate your Iceberg engine.

Grant access to an account member

To grant an account member access to specific Basin Catalog objects:

  1. In the Cloudflare dashboard, go to the Members page.

    Go to Members ↗
  2. On the member row, select ... and select View & Edit permission policies.

  3. On the Permission policies tab, select Create a policy.

  4. Under roles, select Basin Catalog Object Reader or Basin Catalog Object Editor.

  5. For the scope, select Individual Basin Catalog objects.

  6. Select the catalogs, namespaces, tables, or views to include. You can browse catalogs as a tree or a list, or search inside a catalog by full name, for example sales.orders.

  7. Select Create policy.

To grant access to a new member, choose the same role and scope when you add the account member.

Grant access to an Account API token

To create an Account API token with access to specific Basin Catalog objects:

  1. In the Cloudflare dashboard, go to the Account API tokens page.

    Go to Account API tokens ↗
  2. Select Create Token, then enter a token name.

  3. For the resource scope, select Specified Basin Catalog Objects.

  4. Select the catalogs, namespaces, tables, or views to include.

  5. In the permissions list, find Basin Catalog Object and select Read or Edit.

  6. Select Continue to summary. Review the token summary to confirm that it lists the objects you selected.

  7. Select Create Token, then copy the token value to a secure place.

For more information about Account API tokens, refer to Account API tokens.

Browse permissions for the object picker

To browse objects in a catalog with the object picker, you need Basin Catalog read access to that catalog. A grant on a namespace or table alone does not let you browse its parent catalog. If you cannot read a catalog, the picker shows an error for that catalog and continues to list your other catalogs.

Deleted and unavailable objects

If you delete an object that a policy or token grants access to, the grant remains in place. The dashboard shows it as Deleted object. If the dashboard cannot load the details of an object, for example because you cannot read its catalog, it shows Unavailable object.

You can remove deleted and unavailable objects from a policy or token in the object picker.

Was this helpful?