Skip to main content

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#

ConceptWhat it does
App RoleNames an app-specific access relationship. It can have parent and descendant roles.
Role membershipGives a user an App Role or a Site Role.
Resource policySays which roles may perform which actions on one resource.
ConditionNarrows 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#

TaskStart hereExpected outcome
Test your first access decisionVerify an access decisionOne allowed and one denied decision
Create a reusable roleCreate app rolesA role ready for an access policy
Give a user a roleAssign user accessA site user receives the intended app membership
Verify automatic synchronizationAutomatic policiesBoth policy levels are present and tested
Change a policy definitionManage policies in the ConsoleAn updated policy
Restrict rowsUse Database policy filtersServer-side policy filtering
Validate decisions before releaseTest decisionsRecorded ALLOW and DENY cases
Check a caller in codeCheck access at runtime, the JavaScript Policy client, or Refine access controlA caller-bound decision
Resolve a failureTroubleshootingA reconciled policy or a stopped release