Security

Authentication

Three-Tier Token Model

Token TypeWho Uses ItWhat It Accesses
Agent TokenAI agentsMCP tools scoped to their agent ID
Orchestrator TokenAdminsAdmin endpoints, billing, provider config
Demo ModeDevelopmentEverything (auth bypassed)

Agent Tokens

Every MCP tool call requires a security token bound to an agent ID.

Orchestrator Token

ORCHESTRATOR_SECURITY_TOKEN=your-secret-here

Required for admin operations. Passed as: Authorization: Bearer

Demo Mode

When DEMO_MODE=true, all authentication is bypassed. Never use in production.


Webhook Signature Verification

Twilio

Resend


Input Sanitization

All user inputs validated: SQL injection, XSS, CRLF injection, path traversal, command injection.


Encryption

Provider credentials encrypted with AES-256-GCM.

CREDENTIALS_ENCRYPTION_KEY=<64-char-hex-string>

HTTP Security Headers

HeaderValue
X-Frame-OptionsDENY
X-Content-Type-Optionsnosniff
X-XSS-Protection1; mode=block
Referrer-Policystrict-origin-when-cross-origin
Content-Security-PolicyStrict for API, relaxed for admin UI
Strict-Transport-SecurityProduction only

Rate Limiting

HTTP Level

HTTP_RATE_LIMIT_PER_IP=60      # requests/min per IP

HTTP_RATE_LIMIT_GLOBAL=100 # total requests/min

MCP Tool Level

LimitDefault
Per-minute burst10 actions/min
Per-hour sustained100 actions/hour
Per-day cap500 actions/day
Per-number frequency2 calls/day to same number
Daily spending$10/day
Monthly spending$100/month

Brute-Force Protection

10 failed auth attempts -> 15-minute IP lockout + HIGH alert.


IP Filtering

ADMIN_IP_ALLOWLIST=10.0.0.1,10.0.0.2

IP_DENYLIST=1.2.3.4


Anomaly Detection

Runs every 60 seconds:

PatternSeverity
Actions > 3x previous windowMEDIUM
>10 failed auth per IP in 5 minHIGH
>3 tokens for same agent in 1 hourMEDIUM

Compliance

RegulationImplementation
Content filteringBlocks threats, profanity, hate speech
DNC listChecked before every outbound action
TCPANo calls before 8 AM or after 9 PM
CAN-SPAMWarns if emails lack unsubscribe
GDPRRight to erasure support
Recording consentTwo-party consent detection
← Home