Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Write fine-grained authorization policies that control which agent processes can access which services.
Agent → Envoy → OPA (allow/deny?) → Service
{ "spiffe_id": "spiffe://hexr.cloud/agent/acme-corp/content-crew/researcher", "tenant": "acme-corp", "agent": "content-crew", "role": "researcher", "service": "gcp_bigquery", "action": "query", "timestamp": "2026-01-15T10:30:00Z" }
package hexr.authz default allow = false # Researchers can access BigQuery and S3 (read-only) allow { input.role == "researcher" input.service in {"gcp_bigquery", "aws_s3"} } # Writers can only write to S3 allow { input.role == "writer" input.service == "aws_s3" input.action == "PutObject" } # Editors have no cloud access # (implicitly denied by default allow = false)
# Only allow access during business hours (UTC) allow { input.role == "researcher" time.clock(time.now_ns())[0] >= 8 # After 8 AM time.clock(time.now_ns())[0] < 18 # Before 6 PM }
# Allow max 100 tool calls per minute per agent allow { count(recent_calls) < 100 } recent_calls[call] { call := data.audit_log[_] call.agent == input.agent call.timestamp > time.now_ns() - 60000000000 # 1 minute }
apiVersion: v1 kind: ConfigMap metadata: name: opa-policy namespace: hexr-system data: policy.rego: | package hexr.authz default allow = false allow { input.role == "researcher" input.service in {"gcp_bigquery", "aws_s3"} }
test_researcher_bigquery_allowed { allow with input as { "role": "researcher", "service": "gcp_bigquery", "action": "query" } } test_writer_bigquery_denied { not allow with input as { "role": "writer", "service": "gcp_bigquery", "action": "query" } }
opa test ./policies/ -v