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 verification
  • tramai-sovereign — a module that composes tramai-security + tramai-standalone into 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

FeatureModuleComplexityStatusUse When
Sovereign Modetramai-sovereign + tramai-spring-sovereignMediumPublished previewYou need a secure-by-default runtime with deny-by-default policy, model allowlists, and trust zones
DLPtramai-security + tramai-coreLowPublished previewYou need to redact sensitive text (PII, secrets) from model outputs or tool results
Approval Workflowstramai-security + tramai-engineHighPublished previewYou need human-in-the-loop approval before tool execution or workflow step resume
Artifact Verificationtramai-security + tramai-coreMediumPublished previewYou need to verify model artifact integrity at build time (SHA-256, manifest enforcement)
Evidence Packstramai-sovereignLowPublished previewYou need auditable, deterministic JSON evidence of deployment security posture
Offline Deploymenttramai-sovereignMediumPublished previewYou 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

ConcernSovereign ModeDLPApprovalArtifact VerificationEvidence PacksOffline
Policy enforcementDeny-by-default—————
Sensitive data redaction—Regex-based————
Human-in-the-loopRequires approval coordinator—Suspend/resume lifecycle———
Build-time model integrity———SHA-256 streaming——
Audit trailHash-chained audit engineRedaction audit bridgeLifecycle audit eventsVerification receiptsEvidence packsZero-egress probes
Air-gap validationProvider trust zones——Local-only verificationZero-egress subsectionFull 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