Security
TramAI Security provides the control surface behind governed AI deployments: deny-by-default policy enforcement, data loss prevention, human-in-the-loop approval gates, build-time artifact verification, audit-grade evidence generation, and fully air-gapped runtime support.
For the broader product and platform framing, start with Sovereignty. That section explains why these controls matter, who they are for, and what adopting sovereign AI actually changes for a team.
Why This Exists
Production AI systems do more than call a model. They move sensitive context across provider boundaries, invoke tools, resume long-running workflows, and create decisions that may need to be justified to security, legal, compliance, or customer teams.
Sovereign mode exists to make those controls explicit instead of application-specific:
- restrict where classified data can be routed
- allow only approved models, providers, tools, and permissions
- require human approval for high-risk tool execution
- verify local model artifacts before the runtime starts
- produce tamper-evident audit and evidence artifacts
- enforce offline or air-gapped deployment rules at build time
The practical goal is simple: make governed AI behavior repeatable, testable, and reviewable before it reaches production.
In 0.6.0 the sovereign runtime is a profile of the unified Spring Boot starter, selected with tramai.profile: sovereign, and the embedded path is the dev.tramai.sovereign.SovereignTramai builder. Start with the Sovereign Runtime Quickstart.
The security surface spans two packages:
tramai-security— policy engine, DLP, audit, approval coordination, runtime evidence exporters, and artifact verificationtramai-sovereign— a module that composestramai-security+tramai-standaloneinto a secure-by-default embedded runtime profile
For the release history behind this surface, see 0.6.0 — Clarity Is a Runtime Property and the 0.6.0 migration guide, which cover the unified starter, the sovereign profile, sanitized JDBC failures, internal-API annotations, and the extension enrollment rules.
For the runtime-level guarantees that back these controls (SSRF-hardened image retrieval, sanitized JDBC failures, bounded reads, cancellation propagation, static-safety guards), see Production Hardening & Security.
Feature Overview
| Feature | Module | Complexity | Status | Use When |
|---|---|---|---|---|
| Sovereign Mode | tramai-sovereign + tramai-spring-sovereign | Medium | Published preview | You need a secure-by-default runtime with deny-by-default policy, model allowlists, and trust zones |
| DLP | tramai-security + tramai-core | Low | Published preview | You need to redact sensitive text (PII, secrets) from model outputs or tool results |
| Approval Workflows | tramai-security + tramai-engine | High | Published preview | You need human-in-the-loop approval before tool execution or workflow step resume |
| Artifact Verification | tramai-security + tramai-core | Medium | Published preview | You need to verify model artifact integrity at build time (SHA-256, manifest enforcement) |
| Evidence Packs | tramai-sovereign | Low | Published preview | You need auditable, deterministic JSON evidence of deployment security posture |
| Offline Deployment | tramai-sovereign | Medium | Published preview | You need a fully air-gapped runtime with zero egress |
"Published preview" means the module ships in the 0.6.0 release with a preview (non-frozen) API surface. Internal cross-module symbols are marked @ExperimentalTramaiInternalApi and @ExperimentalProviderTransportApi and are outside the compatibility promise.
Module Dependencies
tramai-spring-boot-starter (unified starter; tramai.profile selects the runtime)
├── tramai-spring-core (standard runtime integration)
└── tramai-spring-sovereign (sovereign runtime integration)
├── tramai-sovereign
└── tramai-security
├── tramai-core (policy contracts, DLP SPI, ModelArtifactVerifier)
└── tramai-engine (approval resume, SuspendedInvocationStore)
tramai-standalone (non-Spring path)
├── tramai-sovereign
└── tramai-security
Quick Comparison
| Concern | Sovereign Mode | DLP | Approval | Artifact Verification | Evidence Packs | Offline |
|---|---|---|---|---|---|---|
| Policy enforcement | Deny-by-default | — | — | — | — | — |
| Sensitive data redaction | — | Regex-based | — | — | — | — |
| Human-in-the-loop | Requires approval coordinator | — | Suspend/resume lifecycle | — | — | — |
| Build-time model integrity | — | — | — | SHA-256 streaming | — | — |
| Audit trail | Hash-chained audit engine | Redaction audit bridge | Lifecycle audit events | Verification receipts | Evidence packs | Zero-egress probes |
| Air-gap validation | Provider trust zones | — | — | Local-only verification | Zero-egress subsection | Full offline profile |
Getting Started
Spring Boot — one starter, one profile, one allowlist block:
tramai:
profile: sovereign
sovereign:
allowed-models: [local-invoice-model]
allowed-providers: [deterministic-local-provider]
provider-zones:
deterministic-local-provider: LOCAL
models:
local-invoice-model: deterministic-local-provider
Embedded (no Spring):
val tramai = SovereignTramai.builder()
.profile(
SovereignProfileConfiguration(
allowedModels = setOf("llama3.2"),
allowedProviders = setOf("ollama"),
providerZones = mapOf("ollama" to ProviderTrustZone.LOCAL),
),
)
.modelRegistry(registry)
.auditStore(auditStore)
.provider(ollamaProvider, name = "ollama", default = true)
.model("llama3.2", "ollama")
.build()
See the Sovereign Runtime Quickstart for dependencies, add-ons, the full tramai.sovereign.* reference, and the fail-fast validation error codes.
Next Steps
- Sovereign Runtime Quickstart — canonical 0.6.0 setup
- Sovereign Mode — the runtime, builder API, and invariants
- DLP — data loss prevention configuration
- Approval Workflows — human-in-the-loop gates
- Artifact Verification — model integrity checks
- Evidence Packs — deployment attestation
- Offline Deployment — air-gapped operations
