Policy Structure
Overview
BlueRock protection policies are configured using a JSON-based policy definition. This JSON file defines the runtime enforcement behavior for:
MCP connection controls
Tool, prompt, and resource restrictions
Pattern-based detection
Execution controls
Optional sandbox and network settings
All runtime behavior is determined by this policy configuration.
Policies are generated and signed using the TREX tool before being uploaded to S3 and consumed by the BlueRock Control Plane.
High-Level Policy Structure
A typical policy contains the following top-level sections:
{
"mcp": {},
"exec": {},
"options": {},
"network": {}
}mcp
MCP client-server protection policies
exec
Execution control configuration
options
Sandbox and namespace settings
network
Firewall enforcement configuration
MCP Protection Configuration
Enable MCP Protection
enable
Activates MCP policy evaluation
remediate: true
Enforce mode (block violations)
remediate: false
Observe mode (log violations only)
HTTP / SSE Connection Control
deny_http
Block HTTP transport
deny_sse
Block SSE transport
exception_list
Allow specific URLs
force_authentication
Require authenticated HTTP connections
stdio Transport Control
Blocks stdio-based MCP server connections. Allows only explicitly listed command/argument combinations.
Tool Execution Policies
Deny Specific Tool
Blocks execution of specific tools from a defined MCP server.
Tool Argument Pattern Detection
If a tool argument matches these patterns:
Enforce mode → Execution blocked
Observe mode → Execution allowed, violation logged
Tool Response Pattern Detection
Prevents sensitive or high-risk content in tool output.
Resource Access Control
Restricts file-based or URI-based resource access.
Prompt Execution Policies
Deny Specific Prompt
Prompt Argument Pattern Detection
Prompt Response Pattern Detection
Execution and Sandbox Configuration
The following sections configure execution and sandbox enforcement. Detailed runtime behavior is documented separately under BRACE runtime documentation.
Execution Policy (exec)
Controls binary execution behavior.
enable
Enables execution control
remediate
Enforce or observe mode
is_deny_list
true → block listed binaries
match_list
Binaries to allow or deny
Sandbox Options (options)
Defines namespace and bind mount settings.
Controls filesystem isolation and namespace configuration.
Network Firewall Configuration (network)
Defines network firewall enforcement rules used by runtime policies.
Complete Example Policy
Below is a minimal production-style policy configuration:
Last updated