Governance

Advanced Security

Beyond the security hardening checklist, Open Astra provides additional security features for IP restriction, intrusion detection, session replay auditing, and watermark detection.

IP allowlist

Restrict API access to specific IP ranges. Requires owner role to modify. Enabled by default when configured.

bash
# Get IP allowlist config
curl http://localhost:3000/security/ip-allowlist \
  -H "Authorization: Bearer ${JWT_TOKEN}"

# Set IP allowlist (owner only)
curl -X PUT http://localhost:3000/security/ip-allowlist \
  -H "Authorization: Bearer ${JWT_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "enabled": true,
    "allowedCidrs": ["10.0.0.0/8", "192.168.1.0/24", "203.0.113.42/32"]
  }'

Intrusion detection

Open Astra monitors for threat patterns using a sliding-window detector. When a threshold is breached for a category/IP combination within 10 minutes, an alert is fired.

CategoryThresholdSeverity
sandbox_escape1Critical
ssrf5Critical
sqli3Critical
auth_failure10High
pii_exfil3High
path_traversal5Medium
rate_limit20Medium

When a threshold is breached, a security.intrusion_detected event is emitted and a webhook is fired to SECURITY_WEBHOOK_URL (5-second timeout).

Session replay auditing

Session replay lets authorized users view past conversations with full audit logging. Every replay request is logged for compliance, and transcripts are redacted.

bash
# Audit a session replay (logs the request for compliance)
curl "http://localhost:3000/security/session-replay/sess_abc123?reason=Investigating+support+ticket+4821" \
  -H "Authorization: Bearer ${JWT_TOKEN}"

# Response
{
  "sessionId": "sess_abc123",
  "messages": [...],   // redacted transcript
  "count": 24
}

# View replay audit log (owner only)
curl "http://localhost:3000/security/session-replay/log?limit=50" \
  -H "Authorization: Bearer ${JWT_TOKEN}"

Watermark detection

Detect which workspace generated a piece of agent output by checking for embedded watermarks.

bash
# Detect workspace watermark in text
curl -X POST http://localhost:3000/security/watermark/detect \
  -H "Content-Type: application/json" \
  -d '{ "text": "This is a response from the agent..." }'

# Response
{ "workspaceId": "ws_abc123" }