Custom Policy Builder
Custom Policy Builder¶
Build enforcement policies tailored to your organization's needs. The policy engine supports six built-in types and a composite type for complex AND/OR logic. All types are available in the Authorisation Layer UI under Control Plane → Add Policy.
Content Pattern Policy¶
Block or escalate actions whose content matches regex patterns. Useful for PII detection, insider trading keywords, or prohibited content.
{
"name": "PII Detection",
"policy_type": "content_pattern",
"decision": "escalate",
"action_types": ["send_email", "export_data"],
"conditions": {
"patterns": [
"\\b\\d{3}-\\d{2}-\\d{4}\\b",
"\\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,}\\b",
"password|secret|credential|api[_-]?key"
]
}
}
Temporal Policy¶
Restrict actions to specific hours or days. Blocked hours are in UTC (0-23), blocked days use ISO format (1=Monday, 7=Sunday).
{
"name": "After-Hours Lockout",
"policy_type": "temporal",
"decision": "block",
"action_types": ["execute_trade", "wire_transfer"],
"conditions": {
"blocked_hours": [0, 1, 2, 3, 4, 5, 22, 23],
"blocked_days": [6, 7]
}
}
Chain of Custody Policy¶
Limit agent delegation depth and block specific agents from chains.
{
"name": "Max Delegation Depth",
"policy_type": "chain_of_custody",
"decision": "escalate",
"conditions": {
"max_chain_depth": 3,
"forbidden_agents": ["agent_untrusted_001"],
"required_agents": ["agent_compliance_reviewer"]
}
}
Success
Dashboard support: All policy types can be created from the Authorisation Layer UI under Control Plane → Add Policy, with dynamic condition fields that appear based on the selected type.