← Documentation

Database row-level security and role grants

Table-by-table read attempt as an anonymous client, plus grants and privileged functions when connected.

Check method

Table-by-table read attempt as an anonymous client, plus grants and privileged functions when connected.

Possible evidence type

Live observation when the check is compatible and authorized. This description does not mean your platform has been tested.

Access and limitations

Website address. Actual results and checks not run appear in your report. A check with no finding does not guarantee the absence of risk.

Concrete scenario

A policy permits every signed-in user to read rows rather than only the owner’s rows.

What to inspect

Review grants and each policy command, including USING for access and WITH CHECK for writes.

Remediation approach

Express the intended ownership or sharing rule explicitly and test permitted and denied operations in isolation.

Understand grants, policies and identity

Database grants determine whether a role can reach a table or function; row-level security determines which rows it can access. Enabling RLS without a usable policy can block legitimate users, while a broad policy can expose every tenant. A privileged server credential may bypass these protections and must never be shipped to the browser.

  1. Identify the role making the request and the identity used by the policy.
  2. Review both table grants and policies for each read or write operation.
  3. Check owner access to private, draft and archived rows separately from public access.

Validate without changing production data

Catalog-only inspection can show policy definitions and privilege configuration, but does not prove every application-level access path. Two-account isolation exercises provide stronger behavioral evidence when separately authorized. Backup availability is also different from a successful restore test.

  1. Review definitions and grants in the supported read-only audit.
  2. Use isolated test records for any owner-approved behavioral exercise.
  3. Retest the expected owner access and denied cross-account access after changes.

References

OWASP A01

Sources and further reading

These publications describe related practices and standards. They do not certify your platform or imply that Hackaiz executes every documented method.