Short questions

How to restrict data access per customer in an embedded dashboard?

To restrict data access per customer in an embedded dashboard, use Draxlr's row-level security (RLS). You set the rules up once, and they apply to every dashboard you embed.

Here's how it works:

  1. Create a permission that chooses which tables the embed can use and adds a row rule, such as account_id equals the accountId attribute.
  2. Attach the permission to an RLS group, for example Customers.
  3. When a signed-in customer opens the page, your backend requests the embed token and sends the group name and that customer's values, such as "rlsGroup": "Customers" and "attributes": { "accountId": 42 }.

Draxlr applies the rule to every query behind the embed, including filters, drill-downs, and exports. Tables the permission doesn't allow aren't available at all. Because the values come from your server in a signed token, a customer can't change them in the browser to see another customer's data.

Row-level security for embeds is included on the Power plan and above. The RLS guide covers setting up permissions and groups.

For how this row-level security pattern compares with schema-per-tenant and tenant-object approaches in other tools, see our comparison of row, schema and database isolation models.

For the underlying patterns, see how PostgreSQL row-level security works for multi-tenant analytics and how to sign embed tokens without leaking tenant data.

Start free today

Every piece of your analytics, in one place.

Connect your database and the rest falls into place. Your first dashboard is minutes away.

No credit card required

This website uses cookies to ensure you get the best experience.