How Buster Manages Users
Now that you’ve onboarded your datasource, it’s time to figure out how to add users to your project. Depending on your database architecture that was selected at the beginning, this will look a little different. Similar to services like Stripe, you will need to create ‘Buster users’ if you’d like to give each user their own personal and secure experience. Currently, all user management is done programmatically via the Buster API. You can find your API Key in the ‘Settings’ page of your account.How do I Create a Buster User?
Currently, you can only create a Buster user through our API: Request:This is the identifier you would like to refer to the user with. Typically this is a unique identifier for a user that you use within your own system.
This is the identifier of the project you would like to assign the user to.
This is the name that you will search your user by. This can be a username, full name, email, etc.
This is the name that you group users by. This can be a company, account, group name, etc.
This is the name of the tenant you have created
Key value pairs of the access variables that will be used in your row level policies
Multi-Tenant User Management

Writing Row Level Policies

How do these policies work?
We do not depend on an LLM to apply security measures for us. We tested this and found it extremely unreliable. Instead Buster generates a query, we parse that query, then apply the filters as Common Table Expressions (CTEs). These filtered queries are built after the query has been validated and just before the query is sent to the database/warehouse. Every external user has the queries applied with the Access Variables you assign during user creation.How To Write a Policy
Here are steps to write a perfect row level policy:- All policies must start with
SELECT * FROM table_name_here
.- We do not actually use a
SELECT *
this is just a placeholder for us and makes it easier to understand the policy you’re writing.
- We do not actually use a
- Do not use aliases for columns or tables in the policy.
- You are free to write any policy that is syntactically correct for the datasource you are onboarding.
- Wrap your access variables with the
{ }
curly braces in the query.
Example of User Access Variables and Policy
If I had a table calledcustomers
and each user should only see the rows where their unique identifier matches the id
column, then you would go about creating a user and writing a policy as follows:
-
Define the row level policy for the
customers
table: -
Create your user:
-
User can then start asking questions and the row level policies will automatically applied! Here is an example if a user asked a questions related to the
customers
table:
👤 User asks:
Can you show me all of my new customers from the last 3 months?
🤖 Buster Generates:Buster applies filter for Buster responds according to the data.
customers
table:Single-Tenant User Management

Creating a Tenant
After onboarding your data source, you can start onboarding individual tenants! Here is an example of me creating a new Postgres tenant.This is the name of the data source you just onboarded, not the tenant.
-
Where can I find the parent_name?
In the ‘Data Sources’ tab, you will find it under the Name field.
Postgres
Postgres
BigQuery
BigQuery