RBAC
Configure this policy as rbac. It uses roles from the resolved policy identity.
It can also examine verdictan.data_sensitivity and PHI-like request text.
The gateway must authenticate the caller and resolve its identity before this
policy runs. The RBAC evaluator does not use a raw X-User-Role header as a
production role claim.
Phase and verdicts
- Phase: input
- Verdicts:
alloworblock
Configuration
pack:
name: rbac-example-1
version: "1.0.0"
enabled: true
policies:
chain:
- rbac
policy:
rbac:
require_auth: true
roles:
analyst:
allowed_tools:
- search
- summarize
- report_*
denied_tools:
- dangerous_*
admin:
allowed_tools:
- "*"
denied_tools: []
data_access:
analyst:
max_sensitivity: confidential
admin:
max_sensitivity: restricted
minimum_necessary:
enabled: true
allowed_phi_roles:
- clinician
- admin
Supported fields
| Field | Type | Default | Notes |
|---|---|---|---|
deny_if_missing | string[] | [] | Missing or empty listed headers cause rbac.missing_identity. This check is different from identity resolution. |
require_auth | boolean | runtime default: true | A resolved policy identity is necessary. Set this field explicitly because the active lint schema shows a different default. |
roles | object | {} | Keys are role names matched against roles in the resolved policy identity. A configured role table blocks requests that have no resolved role. |
roles.<role>.allowed_tools | string[] | [] | Supports specified names and * wildcards. |
roles.<role>.denied_tools | string[] | [] | Deny rules override allow rules. |
data_access | object | {} | Role-specific limits for verdictan.data_sensitivity. |
data_access.<role>.max_sensitivity | string | public | One of public, internal, confidential, restricted. |
minimum_necessary.enabled | boolean | false | Enables PHI gating based on message content. |
minimum_necessary.allowed_phi_roles | string[] | [] | Roles allowed to continue when PHI-like content is detected. |
What the policy checks
- The gateway resolves the caller to a policy identity.
require_auth: trueblocks the request when that identity is not available.- A configured
rolestable must match a minimum of one resolved role. - Tool restrictions apply to names in
request.tools[*].function.nameorrequest.tools[*].name. - A specified deny rule overrides an allow rule across the resolved roles.
data_accesscomparesverdictan.data_sensitivitywith each applicable role limit.minimum_necessarychecksmessages[].contentfor PHI-like text.- It blocks PHI-like text when no resolved role is in
allowed_phi_roles.
If you configure deny_if_missing, the gateway also examines those raw request
headers. Identity headers can contain ASCII letters, numbers, -, _, and ..
Do not use this header-presence check as authentication proof.
Important behavior notes
- The RBAC evaluator gets roles from the resolved policy identity.
- Raw
X-User-Rolevalues do not directly select a production role. - A role that has a specified deny pattern blocks the matching tool.
- A tool must be allowed by a minimum of one resolved role.
require_auth: falsecan allow a request without identity only when no role rule must have a role.- HeaderSoft identity is for specified self-hosted development only. Hosted, connected, CJIS, and release deployments reject this unverified mode.
Minimal correct example
policy:
rbac:
require_auth: true
Use the Identity and Access overview to configure the identity source that supplies roles.