​
User permissions and RBAC

Under Settings > Users and roles, you can view the roles associated with each user, as well as whether those roles are granted directly or via SCIM. When adding new users to your Chalk environment, you can assign them roles that determine their permissions in the environment. The available roles in order of increasing permissions are:

  • Viewer: Read the web portal.
  • Data Scientist: Run queries, create charts and alerts, branch deploy, and create, edit, and run hosted notebooks, plus everything that a Viewer can do.
  • Developer: Run queries and migrations, plus everything that a Data Scientist can do.
  • Admin: Create deployments, service tokens, and secrets, plus everything that a Developer can do.
  • Owner: Manage team members, plus everything that an Admin can do.

Team Manager is a team-wide role: manage environments, plus everything that an Owner can do, in every environment of the team. You assign it on the team’s Permissions page, which you open from the team navigation (click the Chalk logo in the top left of the page). When you sign up and create a Chalk team, you are given the Team Manager role.

The Permissions page lists every permission and the built-in roles that include it.

To give users a set of permissions that no built-in role matches, create a custom role.

​
Custom roles

A custom role has the permissions you select. Custom roles belong to your team, so you can assign a custom role in any environment of the team. To create, edit, or delete a custom role, you need the team.admin permission, which the Owner and Team Manager roles include.

If the Add a custom role button is not under Settings > Users and roles, contact Chalk to turn on custom roles for your environment.

​
Create a custom role

  1. Go to Settings > Users and roles.
  2. Under Custom roles, click Add a custom role.
  3. Enter a Role name and a Description.
  4. Select the permissions for the role. To start from the permissions of an existing role, select that role in Use permissions from, then add or remove permissions.
  5. Click Create.

The Permissions page describes every permission you can select.

​
Assign a custom role

Assigning a role needs the team.add permission. You assign a custom role the same way as a built-in role:

  • To assign the role to a user, select it in the user’s row on the Users tab.
  • To assign the role to a SCIM group, select it in the group’s row on the Groups (SCIM) tab.
  • To assign the role from the CLI, run chalk user set-role with the role’s ID.

Chalk generates a custom role’s ID when you create the role. Run chalk user roles to list the IDs of all roles you can assign, then pass the ID to chalk user set-role:

chalk user roles
chalk user set-role alice@example.com <role-id>

​
Edit or delete a custom role

To edit a custom role, click the edit icon next to the role under Custom roles, change its name, description, or permissions, and click Save. Renaming a role does not change its ID.

To delete a custom role:

  1. Assign another role to each user and SCIM group that has the custom role.
  2. Click the delete icon next to the role under Custom roles.
  3. Click Delete Role to confirm.

​
Data source and feature permissions

Customers with Enterprise Features can also configure datasource-level and feature-level role-based access control (RBAC). Under Settings > Access tokens, you can create service tokens that carry tag permissions. At the datasource level, a token can access only the data sources whose tags it permits. At the feature level, a token can block tagged features in two ways: AllowInternal tags let the feature values feed the computation of other features but keep them out of the query results, and Deny tags block the features entirely.

​
Denylisting vs allowlisting tags

The Default permission setting in a token’s Permission tags section decides whether the token uses a denylist or an allowlist:

  • Denylist: Set the default permission to Allow and list the tags to restrict in Denied permission tags. The token can query every tag except the ones in the denylist.
  • Allowlist: Set the default permission to Deny and list the tags to permit in Allowed permission tags. The token cannot query any tag except the ones in the allowlist.

The Authentication page describes the default permission and each tag list in detail.

​
Deactivating and reactivating users

Deactivate a user to remove their access to your Chalk team. Deactivating and reactivating users requires the Owner or Team Manager role.

To deactivate a user:

  1. Go to Settings > Users and roles.
  2. On the user’s row, click Options, then click Deactivate team member.
  3. Click Deactivate to confirm.

Deactivating a user has these effects:

  • The user can no longer access the Chalk dashboard.
  • Chalk removes all of the user’s roles, in every environment and at the team level.
  • Chalk revokes the credentials that chalk login created for the user.
  • You cannot invite the user’s email address again until you reactivate the user.

Deactivated users stay in the user list. To see them, turn on Show deactivated above the list.

To reactivate a user:

  1. Go to Settings > Users and roles and turn on Show deactivated.
  2. On the user’s row, click Options, then click Reactivate team member.
  3. Click Reactivate to confirm.

Reactivation does not restore the user’s roles. To give the user access again, assign a role with Options > Change role. The user also needs to run chalk login again to use the CLI.