Skip to main content

Security & Data Flow Overview

Status

Owner: Tech lead · Status: draft · Canonical source: Flezi Galaxy Codebase

This document provides enterprise security teams and solution architects with a comprehensive overview of the security architecture, trust boundaries, and data protection mechanisms implemented across Flezi Galaxy.

Core Security Principles​

  1. Backend as the Single Trust Boundary: The client browser communicates strictly with the Backend service over HTTPS with TLS. There are no direct connections from the browser to the AI Runtime, OpenSandbox, or backend databases.
  2. AI Runtime Isolation from Database: The AI Runtime possesses no direct credentials or connection to the Backend PostgreSQL database. All reads and writes cross an authenticated internal Data Transfer RPC.
  3. Centralized Secret Management: Secrets, private keys, and API tokens are managed in Azure Key Vault and accessed via Managed Identities, never hardcoded in source code or container images.
  4. Isolated Ephemeral Execution: Agent code execution and browser automation run in unprivileged containers with hard RAM/CPU quotas on the Sandbox Plane and are destroyed after use.

Trust Boundaries Map​

Existing Controls​

  • Complete in-transit encryption (TLS 1.2/1.3) across all endpoints.
  • At-rest encryption on PostgreSQL and Azure Blob Storage (AES-256).
  • Role-Based Access Control (RBAC) covering 59 use cases based on SRS v1.1 §2.3.
  • ToolGuard middleware preventing unauthorized AI actions.

Evidence (Files & Configuration)​

  • flezi.app.api.backend/app/authz/matrix.py
  • flezi.app.api.backend/app/middleware/auth.py
  • flezi.app.ai.agent/app/governance/
  • flezi.platform.sandbox/compose/docker-compose.yaml

Limitations & Roadmap​

  • Sandbox plane currently operates on single-node VM; VMSS autoscale with active-session drain protection is on the engineering roadmap.
  • Evaluating microVM virtualization (gVisor/Firecracker) for high-compliance environments.