# Zero Trust Architecture Reference (AegisForge Mental Model)

This document encodes the core mental model AegisForge uses when designing or reviewing zero-trust infrastructure. It is not a full book, but a concise, high-signal reference you can internalize.

## Core Tenets (NIST SP 800-207 Aligned)

1. All communication is secured regardless of network location.
2. Every access request is fully authenticated and authorized using least privilege and real-time context.
3. Access is granted on a per-session or per-request basis with continuous verification.
4. The system assumes breach and operates with the expectation that an attacker is present.
5. Security controls are deployed as close as possible to the asset being protected (identity, workload, data).

## Practical Implementation Layers (Infrastructure Focus)

**Identity Layer (The Foundation)**
- Humans: Short-lived, JIT, audited access (SSO + time-bounded permission sets, Teleport/P0-style platforms). No standing admin credentials.
- Workloads: Workload identity federation everywhere (IRSA, GKE Workload Identity, Azure Workload Identity). No long-lived cloud IAM keys or instance profiles with broad permissions.
- Service-to-Service: SPIFFE/SPIRE or equivalent strong identity + mTLS for every connection inside and across clusters.

**Network Layer**
- Default-deny micro-segmentation (Kubernetes NetworkPolicy or Cilium, cloud security groups / NSGs with explicit allowlists).
- Private connectivity (Private Endpoints / Private Link / Private Service Connect) for all managed services. No public IPs for data-plane resources when avoidable.
- Encryption in transit by default for every hop; mutual authentication preferred.

**Workload / Runtime Layer**
- Hardened container images (distroless or minimal, signed, scanned, SBOM-attested).
- Pod Security Standards / admission policies enforced; privileged containers forbidden in production.
- Runtime behavioral detection (eBPF) with high-signal alerts and automated response where safe.
- Immutability and declarative GitOps — nodes and workloads are replaceable cattle, not pets.

**Data Layer**
- Encryption at rest with customer-managed keys (KMS) and automatic rotation where feasible.
- Dynamic secrets and short-lived database credentials (Vault or cloud secret managers).
- Strong access controls and audit logging on every data store and secret store.
- Data classification and handling policies enforced by policy-as-code where possible.

**Observability & Response Layer**
- High-fidelity telemetry from every layer (cloud audit logs, Kubernetes audit, network flows, workload runtime, identity events).
- Correlation and detection rules mapped to MITRE ATT&CK techniques.
- Automated containment playbooks (network isolation, credential revocation, workload termination) with human approval gates for high-impact actions.

## Common Anti-Patterns AegisForge Calls Out

- “We have a VPN, so internal traffic is trusted.”
- “Our CI uses a long-lived cross-account role with AdministratorAccess.”
- “We disabled network policy because it was too hard to manage.”
- “We use the same service account for all workloads in the namespace.”
- “We scan images in CI but never verify signatures at admission time.”
- “Developers have broad IAM roles in non-production that are similar to production.”

Use this reference to stay consistent and rigorous when designing or reviewing any system with AegisForge.