Row-level security (RLS) lets two people open the same dashboard and see different rows. ingestia.io offers two forms: static RLS and RLS by member attribute (ABAC).
Concepts#
- Static RLS (
{column, values}): the grant fixes the allowed values. Simple, but requires one grant per person — it doesn't scale beyond a few dozen. - RLS by attribute / ABAC (
{column, memberAttribute}, rowFilter v3): the grant says where the allowed value comes from, and the value lives in the member attribute. One grant{column: "filial", memberAttribute: "filial"}serves 200 salespeople, each one seeing their own branch.
Availability#
- Plans: Row-level security (RLS) from Growth up (Starter doesn't include RLS). PII governance/policy tags from Business up.
- How it works: fail-closed — when in doubt, access is denied. The logic is covered by automated tests.
Permissions#
- Setting up RLS and member attributes requires the admin/owner role (actions
member.manage/ dashboard management). - The fine-grained permission See PII data (
viewPII) controls the display of sensitive columns — orthogonal to row-level RLS.
Setup (step by step)#
- Define the member attributes (e.g.,
filial = "Campinas") in the profile, under Users & permissions. The attributes live inside the member'spermissionsJson, inatributos— no new column in the database. - Create the RLS grant on the dashboard/model:
- static:
{column: "filial", values: ["Campinas"]}; or - by attribute:
{column: "filial", memberAttribute: "filial"}.
- static:
- Publish. RLS is applied in the dashboard's secure read and when reports are sent.
Per-member ceilings: up to 20 attributes, key up to 60 characters, value up to 200
characters, up to 50 values per attribute (multi-value becomes an IN clause).
Validation (golden rule: FAIL-CLOSED)#
- Member without the attribute, an empty attribute, or an identity with no member → no rows pass (denyAll). Never "no filter".
- Multi-value (e.g.,
regiao = ["Sul", "Sudeste"]) becomesINwith the same ceiling as the rowFilter. - Confirm by opening the dashboard as each profile: each one sees only their own slice.
Example#
At Comércio Aurora, the "Vendas por filial" dashboard has an attribute-based grant
{column: "filial", memberAttribute: "filial"}:
- the Campinas manager (
filial = "Campinas") sees only Campinas; - the Sorocaba manager (
filial = "Sorocaba") sees only Sorocaba; - an analyst without the
filialattribute sees zero rows (fail-closed).
The same rule applies when sending reports (the subscription filters by recipient).
Cost#
- Setting up/applying RLS: R$ 0 (it's a filter on read; no extra cost beyond the query itself).
Security#
- Fail-closed in every gap (missing/anonymous/external → denyAll).
- Values are sanitized (type allowlist; normalized case) and the ceilings applied — discarding only narrows access, never widens it.
- RLS is applied at the dashboard's single source of secure reads and respected by the AI.
Limits#
- Static RLS doesn't scale (one grant per person) — prefer ABAC for many users.
- Each workspace has its own datalake; one customer never reads another's data. The design is fail-closed.
- RLS filters rows; to hide sensitive columns, use
viewPIIand PII governance.
Troubleshooting#
| Symptom | Likely cause | What to do |
|---|---|---|
| Person sees zero rows | missing/empty attribute (denyAll) | define the attribute in the member's profile |
| Person sees too many rows | grant not configured on the dashboard | create the {column, memberAttribute} grant |
| Attribute "doesn't take" | case difference/typo | the key is normalized; check the name |
| RLS doesn't apply in the email | subscription without per-recipient RLS | set up the per-recipient filter |
Next steps: Plans and Consumption and quotas.