CLOUD CONCEPT

Row-Level Security

Row-level security restricts which records a user or application can access within a shared dataset according to centrally enforced authorization rules.

Cloud Concepts Hub →

What is Row-Level Security

Row-level security allows multiple users or tenants to share tables and dashboards while seeing only the records they are authorized to access. It combines identity or trusted session attributes with data attributes, such as tenant, department, or region, to enforce access without maintaining separate datasets for every audience.

Row-level security is an authorization mechanism that controls access to individual records rather than granting access to an entire table or dataset. A regional sales manager might be allowed to query a shared sales table but receive only records for the regions they manage. Another manager can run the same query or open the same dashboard and receive different results because the security policy evaluates their identity and entitlements.

A typical implementation associates each record with an authorization attribute, such as a tenant identifier or business unit. A policy compares that attribute with the authenticated user's permitted values, often through an entitlement table or a trusted session context. For example, an order is visible only when its tenant identifier matches the tenant assigned to the current application session. The session attribute must come from trusted authentication and authorization logic, not an editable browser parameter.

In cloud architectures, enforcement can occur in a database, data warehouse, governed query layer, or business intelligence dataset. Database enforcement protects supported queries that reach the database under the relevant security context. Visualization-layer enforcement protects access through that analytical dataset, but does not automatically restrict separate access to its underlying database or object storage. Engineers must identify every route to the data and apply appropriate controls at each boundary.

For visualization scenarios, row-level security enables one dashboard to serve many departments, customers, or geographic teams. Instead of publishing a separate dashboard for each audience, the visualization service filters the accessible records according to the viewer's permissions. Aggregations should reflect those authorized records, so a regional manager's revenue total represents their permitted regions rather than the entire company. Ordinary dashboard filters are not a substitute: a viewer-controlled region selector changes presentation, not authorization.

Identity propagation is a critical design decision. If a dashboard uses one shared database account, a database policy based only on that account cannot distinguish individual dashboard viewers. The architecture must either propagate a supported, trusted viewer context or enforce viewer-specific restrictions in the visualization layer. Imported analytical datasets also require care: source policies may restrict the identity performing the import, but do not automatically create different permissions for subsequent viewers of that imported copy.

The main trade-offs are policy complexity, performance, and operational overhead. Large entitlement mappings, joins, and complex predicates can increase query cost or latency; suitable indexing, data layout, and representative load tests help assess the impact. Centralized policies reduce duplicated application logic, but incorrect mappings can expose records or unexpectedly hide them. Design missing or unrecognized entitlements to deny access, and explicitly test how multiple grants, groups, null values, and privileged roles interact.

Row-level security is not column masking, encryption, or complete tenant isolation. A user authorized to see a record may still need separate restrictions on sensitive fields. Some privileged roles can bypass policies, and authorized exports create copies outside the original enforcement boundary. Validate dashboard totals, drill-through paths, exports, pooled connections, and cache behavior using different identities, and audit both entitlement changes and privileged access.

Key aspects of Row-Level Security

Effective row-level security combines trusted identity, record-level policies, complete access-path coverage, and testing of both authorization behavior and query performance.

Record-level authorization

Access rules select the records a principal may access within a shared table or dataset. Common policy attributes include tenant identifiers, regions, departments, and record ownership.

Trusted identity and entitlement mapping

Policies depend on authenticated identities, group memberships, or securely established session attributes. Never let a client directly choose the tenant or entitlement used for authorization without server-side validation.

Enforcement at the correct boundary

Database policies and visualization-dataset policies protect different access paths. Restrict direct source access when relying on visualization-layer enforcement, and verify how viewer identity reaches the enforcement layer.

Reusable, audience-specific visualizations

A shared dashboard can display different records and aggregates for different viewers. Security rules must remain effective regardless of dashboard filter selections or navigation.

Policy correctness and performance

Test entitlement combinations, unmatched users, privileged roles, and query execution costs. Entitlement joins and complex predicates can affect latency, so benchmark realistic data volumes and concurrency.

Controlled downstream access

Verify that exports, cached results, imported datasets, and alternate query interfaces preserve the intended restrictions. Copies of authorized results require their own access controls once they leave the enforcement boundary.

Cloud services for Row-Level Security

Amazon QuickSight can apply viewer-specific restrictions to a shared analytical dataset, while Amazon Redshift or Amazon RDS for PostgreSQL can enforce row policies at the database layer. AWS Lake Formation provides row filtering for supported governed data-lake queries. These controls can complement one another, but policies do not automatically transfer between layers. A visualization service using a shared source identity needs its own viewer-aware enforcement or supported identity propagation. Restrict alternate storage and database access, and test imports, query results, and exports to confirm that the intended audience sees only authorized records.

Amazon QuickSight image Amazon QuickSight

Amazon QuickSight Enterprise Edition supports dataset row-level security using rules that associate users or groups with permitted data values. This allows a shared dashboard to display viewer-specific records; tag-based row-level security is also available for supported embedded analytics scenarios.

Open Amazon QuickSight →
Amazon Redshift image Amazon Redshift

Amazon Redshift supports row-level security policies that restrict rows available through warehouse queries. Policies can use database identity or trusted session context, but privileged bypass permissions and shared connection identities must be considered.

Open Amazon Redshift →
AWS Lake Formation image AWS Lake Formation

AWS Lake Formation supports data filters that define row-level restrictions on Data Catalog tables for supported integrated query engines. Effective protection also requires controlling direct access to the underlying storage so users cannot bypass the governed query path.

Open AWS Lake Formation →