Security Architecture, MCP Guardrails & Data Privacy
How Cubes+ enforces a deterministic zero-LLM server boundary, invite-only OAuth 2.1 + PKCE, role and cross-Coach isolation, rate limits, SHA-256 tokens, metadata-only audits, and private PostgreSQL screenshots.
1. Deterministic Server Trust Boundary (Zero Server-Side LLM)
Cubes+ never embeds an opaque server-side LLM, never lets an AI model generate SQL, and never bypasses business validation. When you bring your own assistant (ChatGPT, Claude, Grok, or any MCP client), every request hits typed, Zod-validated tools inside /api/mcp that delegate straight to the exact same domain services as the Web and Mobile apps.
2. Invite-Only OAuth 2.1 + PKCE + DCR & Strict Role Isolation
OAuth 2.1 + PKCE (S256) + Dynamic Client Registration
Supports RFC 9728 Protected Resource Metadata and RFC 8414 Authorization Server Metadata with JWKS-signed audience-bound tokens (aud === https://cubes.lsqr.ai/api/mcp). Public signup and client_credentials grants are strictly disabled.
Role & Cross-Coach Isolation
Standard Coaches cannot read or mutate another Coach’s unassigned Client Accounts, Groups, Trainees, or Assignments, nor edit the Official Library or invite Coaches. Trainees can access strictly their own Workouts and Progress—never Coach tools.
3. Guardrails, Rate Limits, Hash-Only Tokens & 1-Tap Kill Switch
- Zero Irreversible Hard Deletes: Even when mcp:write is granted, MCP exposes strictly additive and reversible actions—no permanent deletions of Exercises, Blocks, Sessions, Programs, Groups, Trainees, or Workout history exist on /api/mcp.
- Dual-Bucket Rate Limits: Independent sliding-window rate limits enforce 60 read calls/min and 20 write calls/min per user and per credential (returning HTTP 429 with Retry-After) so a looping assistant can never flood your workspace.
- SHA-256 Hash-Only Agent Tokens: Scoped cubes_mcp_* tokens are capped at 10 active per user, revealed once in memory on creation, persisted solely as SHA-256 hashes, verified in constant time, and revocable instantaneously with a 1-tap kill switch on /agents or Mobile Profile.
- Metadata-Only mcp_audit_logs: Every MCP call logs only userId, authType, credentialId, toolName, scope, status (ok / error / rate_limited / forbidden), errorCode, and durationMs—never raw tokens, invite URLs, emails, or personal free-text.
4. Private PostgreSQL Support Screenshots & Full Privacy Policy
Support screenshots uploaded through the Support Assistant (?) are stored strictly as private PostgreSQL bytea rows—never written to public CDN/object storage—and served exclusively to Head Coaches or the original uploader with Cache-Control: private, no-store and X-Content-Type-Options: nosniff.
Cubes+ runs zero third-party ad networks, zero cross-app tracking SDKs, and zero PII on Room TV displays.
Read the Full Cubes+ Privacy Policy
Inspect every data category, processor, mobile permission (Camera & Notifications), retention rule, and account deletion process (admin@lsqr.ai).