Apache Superset Row Level Security

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up apache superset row level security by linking filter clauses to user roles. The app then injects these filters into chart queries before they run. Most teams build one shared dashboard and use role rules to slice the view. This saves time because admins do not need to copy charts for each team. Still, broad roles or shared database logins can still expose private rows to users. How apache superset row level security works The native filter system sits between the visual chart build

Row-Level Security: the complete guide

Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.

Free white paper. No spam. Unsubscribe anytime.

You set up apache superset row level security by linking filter clauses to user roles. The app then injects these filters into chart queries before they run. Most teams build one shared dashboard and use role rules to slice the view. This saves time because admins do not need to copy charts for each team. Still, broad roles or shared database logins can still expose private rows to users.

How apache superset row level security works

The native filter system sits between the visual chart builder and your database. Admins create a filter rule and link it to a specific table. Then they assign that rule to one or more user roles in the app. When a user opens a dashboard, the app checks their assigned roles first.

Next, the app adds the matching filter clause into the chart query statement. The database runs the altered query and returns only the allowed rows. You can set up regular filters that apply to chosen roles right away. You can also set up base filters that block all rows by default. With base filters, users must hold an explicit role to read any rows.

Teams often use dynamic templates to read the logged-in user profile during query generation. This lets one rule filter rows by matching the viewer username or email address. As a result, sales reps only read rows that match their own region.

What native filters solve and where gaps remain

Native rules work well when users only view pre-built charts and dashboards. They stop business users from seeing data meant for other departments or clients. Admins can manage dashboard views from one screen instead of building ten separate dashboards.

Still, this setup only governs queries that the chart engine builds for dashboards. It does not always control what happens inside the raw query editor. If a user has query editor access, they might bypass table filters through joins. Also, the app usually talks to the database using one shared service account.

Row-Level Security: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Because of this shared login, the database cannot tell which human ran a query. Database logs only show the shared app account rather than the real user identity. Also, row filters cannot mask sensitive columns inside the allowed rows. If a user can read a customer row, they see the whole record. Native row filters do not rewrite emails, phone numbers, card numbers, or national IDs.

Managing query editor access and sensitive fields

To reduce risk, teams must split dashboard viewers from query editor users. Give standard viewers roles that only allow chart viewing on curated tables. Never grant raw SQL editor permissions to roles that rely on row filters.

When analysts need direct query access, shared service accounts create a major blind spot. Native app rules decide who logs in, not what individual statements do in flight. You also need a way to handle private fields inside approved rows. Masking rewrites matched fields in results so analysts can work without reading raw secrets. Combining strict role separation with statement checks keeps both dashboards and raw queries safe.

Check database and API queries on the wire

Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.

Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.

Frequently asked questions

Do row filters apply to queries inside SQL Lab?

Native row filters attach to specific datasets used by charts and dashboards. In the raw query editor, users query tables directly and can bypass dataset rules.

What is the difference between regular and base filters?

Regular filters restrict data only for the specific roles you attach to the rule. Base filters restrict data for everyone unless a user holds an exempt role.

Can row level rules hide specific columns like phone numbers?

No, row rules only filter horizontal records based on a condition. They cannot mask vertical columns like emails, card numbers, or national IDs in results.

Save the open-source gateway.

hoop is MIT-licensed infrastructure for controlling how AI agents reach production data. Star hoophq/hoop so you can inspect it, deploy it, or share it when your team starts governing agent access.