- DPDPA (India’s Digital Personal Data Protection Act)
- FERPA (Family Educational Rights and Privacy Act in the USA), which governs student education records
- GDPR (General Data Protection Regulation in the EU)
Key Features of CRBAC
- Hierarchical Access Control: Supports parent-child relationships in data access, enabling fine-grained permissions.
- Context-Aware Policies: Defines access based on specific attributes like user roles, organizational structures, and compliance requirements.
- Dynamic Consent Enforcement: Incorporates consent management for accessing PII.
- Group-Based Roles: Databunker supports groups of users, where each member within a group can have distinct roles. For instance, in an educational group, roles like Teacher and Student can be assigned, or in a family group, roles such as Parent and Child.
- Similar to AWS IAM Policies: Uses a declarative approach to grant or deny access based on conditions.
Policy Structure
CRBAC policies resemble AWS IAM policies, defining who (principale) can perform what (actions) on which (resources) under which conditions.Example Policy: Parent-Child Relationship Enforcement
In Databunker Pro, you can create a custom group for family members. Within this group, parents will have read and write access to their child’s information. You can use the following policy to grant parents access to their child’s PII and consent information.Example Policy: Teacher-Parent Access
This policy will grant to a teacher entity access to the student’s parent information.Passing runtime context with request_metadata
Most Databunker Pro API endpoints accept an optional request_metadata object on the request body. The caller (application code, an API gateway, or a tokenisation proxy) uses it to pass runtime context — values like the calling environment, the purpose of the request, the originating IP address, a ticket number — that the access-control engine can evaluate at policy time.
CRBAC Condition blocks can reference request_metadata values directly, so the same policy can grant or deny access based on why and where the request is coming from, not just who is making it. This is purpose-of-use enforcement.
Example: caller-supplied context
Example: policy that evaluates request_metadata
This policy allows a security-analyst role to read full user records only when the request is tagged with purpose: fraud-investigation and originates from the production environment:
What to put in request_metadata
request_metadata is free-form, so the keys are conventions you adopt for your deployment. Typical keys we see in production:
| Key | Purpose |
|---|---|
environment | production / staging / dev — scopes policies per environment. |
purpose | A business-domain purpose-of-use code (e.g., fraud-investigation). |
caller_ip | Client IP — useful for IP-range conditions. |
ticket_id | Linking the access to a ticket / case for accountability. |
app_name | Calling application — useful when multiple apps share a role. |
request_metadata is recorded in the audit event for the request, so it doubles as accountability metadata even when no policy references it.
Field-Level Masking in Responses
When a policy grants access to a subset of a user’s profile fields, Databunker Pro applies the policy at response time. The original record stays untouched in the vault; the API response is filtered for the calling principal. The masking strategy is asymmetric by type so that strongly-typed clients (TypeScript, Python type-hints, Java, generated SDKs) do not encounter silent type mismatches:- String fields that the caller is not authorized to read are replaced with the literal
"***". The field stays in the response so the client can detect that the field exists. - All other types (
number,boolean, array, nested object) are omitted from the response entirely when masked. This avoids type-corruption bugs likeprofile.age + 1evaluating to"***1"because the engine had substituted a string for a number.
Example
Suppose asales user has a policy allowing only ${target_group_members:role/lead}.profile.email. A lead’s stored profile is:
UserGet with the sales user’s token returns:
emailis visible because the policy granted it.login,name,phoneare strings — present in the response with value"***".age(number),verified(boolean),tags(array),address(object) are absent from theprofileobject entirely.
TypeScript example
Why Choose CRBAC?
- Compliance-Ready: CRBAC ensures organizations meet legal and regulatory requirements, including FERPA and DPDPA.
- Dynamic Access Control: Unlike static RBAC, CRBAC adapts access rights based on real-time conditions.
- Fine-Grained Permissions: Allows precise control over PII data access, reducing the risk of unauthorized exposure.
Implementing CRBAC with Databunker Pro
Databunker Pro simplifies CRBAC implementation by providing:- Built-in support for conditional access policies
- Secure PII storage with compliance enforcement
- A developer-friendly API for managing role-based conditions