Docs
Role-Based Database Credentials

Role-Based Database Credentials

Role-based credentials can be used to restrict access to certain tables, or even certain rows or columns within a table, based on a user's role.

All Hashboard data connections can be optionally configured to use additional credentials which can be assigned to users on a per-role basis. This enables you to control what data Hashboard users can access when viewing models, saved explorations, and dashboards built from the same data connection.

Adding credentials

  1. First, create a database connection. The credential specified in the top-level of the database connection form is the default credential.
💡

If a user doesn't have any specified credentials within their roles, they will use the default credential for the data connection. Default credentials are also used in public links.

We recommend making your default credential the most restrictive credential. Make sure your default credential doesn't allow access to sensitive data that you would not want accessible to all users in your organization.

  1. At the bottom of the data connection form, in the section for Role-based credentials, click Add credential.

  2. Give the credential a unique and descriptive name, as it will be used to assign to roles later on.

  3. Fill out the credential fields.

  4. Make sure to Test the credentials before saving to ensure they are connecting properly. If your credentials connect, you'll see a check mark. Otherwise, you'll see an error message.

  5. Finally, click Save.

Credential fields

The fields for a role-based credential depend on which data warehouse you're connecting to.

Assigning credentials to roles

Once you've created your credentials, you can assign them to a Hashboard role. For information about how to set up and assign roles, see Users and Permissions.

  1. Navigate to the People page.

  2. Scroll down to Roles and find the role you want to assign a credential to.

  3. Click the Edit icon. You'll see a list of Permission Rules.

  4. Click to edit the Permission Rule you'd like to add the credential to, or click Add Permission Rule to create a new one.

  5. In the Permission Rule editor, you'll see a section for Role-based credentials. Click the Add button to the right.

  6. Select the data connection you want to assign a credential to. You'll see a list of credentials you've created for that data connection.

  7. Select the credential you want to assign.

⚠️

Users cannot have multiple credentials for the same data connection. Assigning a user multiple roles that specify different credentials for the same data connection will result in an error.