Skip to content

Automatic translation — the Portuguese version is the reference. View in Portuguese

Row-level security (RLS / ABAC)

On this page (10)

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)#

  1. Define the member attributes (e.g., filial = "Campinas") in the profile, under Users & permissions. The attributes live inside the member's permissionsJson, in atributos — no new column in the database.
  2. Create the RLS grant on the dashboard/model:
    • static: {column: "filial", values: ["Campinas"]}; or
    • by attribute: {column: "filial", memberAttribute: "filial"}.
  3. 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"]) becomes IN with 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 filial attribute 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 viewPII and PII governance.

Troubleshooting#

SymptomLikely causeWhat to do
Person sees zero rowsmissing/empty attribute (denyAll)define the attribute in the member's profile
Person sees too many rowsgrant not configured on the dashboardcreate the {column, memberAttribute} grant
Attribute "doesn't take"case difference/typothe key is normalized; check the name
RLS doesn't apply in the emailsubscription without per-recipient RLSset up the per-recipient filter

Next steps: Plans and Consumption and quotas.

Related links