Access policies
Access policies are the TaruviBase policy engine's rules for deciding whether an authenticated caller may perform an action on a resource. Authentication proves who the caller is; authorization evaluates the caller, resource, action, and allow/deny decision.
Start with access decisions, then choose a
Console workflow for roles, policies, conditions, and decision testing. Check
access from code with the Python SDK (client.policy), the JavaScript SDK
(Policy), or the Refine accessControlProvider.
How a decision is made#
Each decision looks at four things: who the caller is and which roles they have, which resource they want to use, which action they want to take, and any condition the policy sets. The result for each action is either allow or deny.
Anything a policy does not allow is denied. A site user with no App Role, an explicit deny, or an error while evaluating a policy is also denied.
The building blocks#
| Concept | What it does |
|---|---|
| App Role | Names an app-specific access relationship. It can have parent and descendant roles. |
| Role membership | Gives a user an App Role or a Site Role. |
| Resource policy | Says which roles may perform which actions on one resource. |
| Condition | Narrows a rule using facts about the caller or the resource. |
Creating an App Role does not give anyone access by itself. A user receives access only after you assign them a membership. For the full list of policy types, see Roles, policies, and conditions.
Defaults to know about#
- When you create a supported resource, TaruviBase tries to create a policy for it that you can edit in the Console. Review it straight away and grant each role only the actions it needs. See Automatic policies.
- Policy synchronization can fail even when the resource is created, so confirm the policy exists before you assign users or release the resource.
- Policies are managed in the Console only.
What the checks do and do not do#
TaruviBase enforces your policies on every request. Checks in your own code, in the Python SDK, the JavaScript SDK, or the Refine access control provider, help you decide what to show, but they never replace that enforcement. Before you release a change, run one check you expect to be allowed and one you expect to be denied. Security and limits covers the cases that need extra care, including row filtering in the Database.
Choose a task#
| Task | Start here | Expected outcome |
|---|---|---|
| Test your first access decision | Verify an access decision | One allowed and one denied decision |
| Create a reusable role | Create app roles | A role ready for an access policy |
| Give a user a role | Assign user access | A site user receives the intended app membership |
| Verify automatic synchronization | Automatic policies | Both policy levels are present and tested |
| Change a policy definition | Manage policies in the Console | An updated policy |
| Restrict rows | Use Database policy filters | Server-side policy filtering |
| Validate decisions before release | Test decisions | Recorded ALLOW and DENY cases |
| Check a caller in code | Check access at runtime, the JavaScript Policy client, or Refine access control | A caller-bound decision |
| Resolve a failure | Troubleshooting | A reconciled policy or a stopped release |