Permissions close to the data
Define database roles and table access alongside the records they protect.
Roles and grantsAuthentication & access control
Connect applications as database users, then define what those users can read.
Roles, row policies and column masks determine which records and fields a database user can read.
The source table stays intact.
A restricted view of the same data.
A database-user key identifies the caller so requests can use that user's roles and grants.
Grant table access, filter eligible rows and mask sensitive columns. A support role could read assigned customers while their private fields remain hidden.
Use a service-enforced read-only token when an application must not write.
Explore row policiesDefine database roles and table access alongside the records they protect.
Roles and grantsFilter rows and mask columns without maintaining a separate copy of each table for every role.
Policies and maskingRotate or revoke a personal token independently of the shared database bearer.
Credential lifecyclesStart with the job each caller needs to do. Give support a view of assigned customers; give an analyst the records needed for reporting.
This example combines table read access, row filtering and field masking. The roles are illustrative, not built-in defaults.
Build a row policy| Role | Rows returned | Email field |
|---|---|---|
| Support reader | Assigned customers | Masked |
| Regional analyst | Customers in their region | Masked |
| Contact manager | Assigned customers | Visible |
Check the result as the intended database user. An administrative bearer is not a test of restricted access.
Keep each credential tied to its purpose and owner, from the first connection through offboarding.
Choose the identity and credential type for the application or person.
Save a newly issued secret in your secret manager when it is shown.
Update clients using a shared bearer. Personal-token changes affect that token independently.
Removing an organization member does not itself delete their personal tokens. Review database users and shared credentials as part of offboarding.
Read the offboarding guidanceOrganization membership and database identity are separate. Adding someone to your team does not grant permission to query records.
Understand identitiesCheck how each query path applies the user's roles and policies. Recorded write grants alone do not prevent writes.
Review enforcement