Skip to main content

Security Architecture Overview

Overview

ASCEND implements a 12-layer defense-in-depth security architecture designed for banking, financial services, healthcare, and other regulated industries. Every layer is designed to fail-secure - when any component fails, the system defaults to DENY rather than ALLOW.

This architecture ensures that even if one security control is compromised, multiple additional layers continue to protect your organization's AI operations.

Why It Matters

Enterprise AI governance requires security controls that match or exceed traditional application security standards. AI systems introduce unique risks including:

  • Prompt injection attacks that can manipulate AI behavior
  • Code execution risks from AI-generated or AI-processed code
  • Data exfiltration through carefully crafted prompts
  • Privilege escalation via AI agent manipulation
  • Multi-tenant data leakage in shared infrastructure

ASCEND's 12-layer architecture addresses each of these risks with dedicated security controls while maintaining compliance with SOC 2, HIPAA, PCI-DSS, and other frameworks.

Architecture

12-Layer Defense-in-Depth Model

+------------------------------------------------------------------+
| LAYER 12: Security Headers |
| (X-Frame-Options, HSTS, CSP, XSS Protection) |
+------------------------------------------------------------------+
| LAYER 11: Secrets Management |
| (AWS Secrets Manager, Key Rotation, Encryption) |
+------------------------------------------------------------------+
| LAYER 10: Input Validation |
| (Pydantic Schema Validation, Type Checking, Sanitization) |
+------------------------------------------------------------------+
| LAYER 9: Audit Logging |
| (Immutable WORM Logs, Hash Chaining, Compliance Trail) |
+------------------------------------------------------------------+
| LAYER 8: BYOK Encryption |
| (Envelope Encryption, AES-256-GCM, Customer-Managed Keys) |
+------------------------------------------------------------------+
| LAYER 7: RBAC Authorization |
| (6-Level Hierarchy, 23+ Permissions, Separation of Duties)|
+------------------------------------------------------------------+
| LAYER 6: API Key Validation |
| (SHA-256 Hashing, Constant-Time Comparison, Rate Limiting) |
+------------------------------------------------------------------+
| LAYER 5: JWT Authentication |
| (RS256 Signatures, Cognito Integration, Revocation) |
+------------------------------------------------------------------+
| LAYER 4: Action Governance |
| (Real-Time Evaluation, Risk Scoring, Kill Switch) |
+------------------------------------------------------------------+
| LAYER 3: Code Analysis |
| (CWE Detection, MITRE Mapping, Pattern Matching) |
+------------------------------------------------------------------+
| LAYER 2: Prompt Security |
| (21 Injection Patterns, OWASP LLM Top 10, Encoding) |
+------------------------------------------------------------------+
| LAYER 1: Rate Limiting |
| (Per-IP, Per-User, Per-Endpoint, Redis-Backed) |
+------------------------------------------------------------------+

Layer Summary Table

LayerComponentPurposeFail-Secure Behavior
1Rate LimitingPrevent abuse, DDoS protectionDENY on Redis failure
2Prompt SecurityDetect prompt injection attacksBLOCK on detector failure
3Code AnalysisDetect dangerous code patternsBLOCK on analyzer error
4Action GovernanceReal-time AI action evaluationDENY on evaluator error
5JWT AuthenticationVerify user identityDENY on invalid token
6API Key ValidationAuthenticate SDK/CI-CD requestsDENY on validation failure
7RBAC AuthorizationEnforce permissions and rolesDENY on permission failure
8BYOK EncryptionProtect data at restFAIL on key unavailable
9Audit LoggingMaintain compliance trailBLOCK if audit write fails
10Input ValidationSanitize all inputsREJECT malformed input
11Secrets ManagementProtect credentialsBLOCK on secrets fetch failure
12Security HeadersPrevent common web attacksRestrictive defaults

Configuration

Environment Variables

# Authentication
COGNITO_REGION=us-east-2
COGNITO_USER_POOL_ID=your-pool-id
COGNITO_APP_CLIENT_ID=your-client-id
ENABLE_TWO_POOL_AUTH=false

# Security Controls
RATE_LIMIT_ENABLED=true
RATE_LIMIT_REDIS_URL=redis://localhost:6379
PROMPT_SECURITY_MODE=enforce # enforce, monitor, off
CODE_ANALYSIS_MODE=enforce # enforce, monitor, off

# Encryption
BYOK_ENABLED=true
BYOK_KEY_ARN=arn:aws:kms:region:account:key/key-id

# Audit
AUDIT_LOG_RETENTION_DAYS=365
AUDIT_FAIL_OPEN=false # If true, allows operations if audit fails

Organization-Level Configuration

Each organization can customize security controls via the database:

{
"org_code_analysis_config": {
"enabled": true,
"mode": "enforce",
"block_threshold": 80,
"languages_enabled": ["sql", "python", "shell", "javascript"],
"categories_enabled": ["injection", "execution", "exfiltration"]
},
"org_prompt_security_config": {
"enabled": true,
"mode": "enforce",
"block_threshold": 70,
"scan_user_prompts": true,
"scan_agent_responses": true,
"detect_base64": true,
"detect_unicode_smuggling": true
}
}

Fail-Secure Behavior

Every layer implements fail-secure defaults:

ScenarioBehaviorRationale
Redis unavailableDENY all rate-limited requestsPrevents abuse during outage
Prompt detector errorBLOCK suspicious promptsAssumes worst-case scenario
Code analyzer timeoutBLOCK code executionPrevents bypass via timeout
JWT validation errorDENY authenticationPrevents unauthorized access
RBAC check failsDENY authorizationEnforces least privilege
Audit log write failsBLOCK operationMaintains compliance trail
KMS key unavailableFAIL encryptionPrevents unencrypted data storage

Compliance Mapping

FrameworkControlASCEND Implementation
SOC 2CC6.1 (Logical Access)Layers 5-7: JWT, API Key, RBAC
SOC 2CC7.1 (System Operations)Layers 1-4: Rate Limiting, AI Security
HIPAA164.312(a)(1)Layer 7: Access Control
HIPAA164.312(b)Layer 9: Audit Logging
HIPAA164.312(e)Layer 8: Encryption
PCI-DSSReq 3.5Layer 8: BYOK Encryption
PCI-DSSReq 6.5Layers 2-3: Input Security
PCI-DSSReq 7.1Layer 7: RBAC
PCI-DSSReq 8Layers 5-6: Authentication
PCI-DSSReq 10Layer 9: Audit Logging
NIST 800-53AC-2Layer 7: Account Management
NIST 800-53AU-2Layer 9: Audit Events
NIST 800-53SC-28Layer 8: Data-at-Rest Encryption
OWASP ASVSLevel 3All layers
OWASP LLM Top 10LLM01-02Layers 2-4: AI Security

Verification

Health Check Endpoint

curl -X GET https://api.ascend.io/v1/health/security \
-H "Authorization: Bearer $TOKEN"

Response:

{
"status": "healthy",
"layers": {
"rate_limiting": "active",
"prompt_security": "active",
"code_analysis": "active",
"action_governance": "active",
"jwt_auth": "active",
"api_key_auth": "active",
"rbac": "active",
"encryption": "active",
"audit_logging": "active",
"input_validation": "active",
"secrets_management": "active",
"security_headers": "active"
},
"compliance_mode": "soc2_hipaa_pci"
}

Security Audit Report

curl -X GET https://api.ascend.io/v1/admin/security/audit-report \
-H "Authorization: Bearer $TOKEN"

This returns a comprehensive audit report including:

  • All security controls status
  • Recent authentication events
  • Failed authorization attempts
  • Prompt injection detection statistics
  • Code analysis findings summary

Next Steps