Enterprise Security
Tenancy, PII redaction, mTLS federation, and data retention policies in JamJet.
Enterprise Security
JamJet provides runtime-enforced controls for teams that need reliability and governance together: PII redaction, mTLS federation, and retention-aware execution logs. The tenancy and OAuth sections below describe what the open-source runtime does and does not do today.
Enforced at the Rust runtime layer — not by convention, and not by middleware you might forget to add.
Best for:
- Regulated internal platforms
- Audit-heavy enterprise workflows
- Teams that need replay, traces, and policy controls together
Tenancy
The open-source runtime is single-tenant in practice. Tenant IDs exist in the data model, but they do not isolate tenants from each other.
What exists:
- A
tenant_idfield on API tokens and on policies (policy scopes run node, workflow, tenant). - Tenant-scoped routes and a
TenantScopedSqliteBackendthat binds a tenant ID into its SQL. - Tenant management endpoints (
/tenants), see the REST API reference.
What does not exist:
- Isolation between tenants. With the SQLite backend, tokens do not resolve to their tenant. Workflow lookup and caches, work items after the start node, segments, and the agent registry all run in the
defaulttenant. - A
--tenantflag onjamjet run.
Do not rely on tenant IDs to separate customers or teams in a shared runtime. Run a separate runtime per tenant if you need a hard boundary.
PII redaction
Declare a data_policy in your workflow. The runtime applies it before any state reaches the audit log.
data_policy:
pii_detectors: [email, ssn, phone, credit_card, ip_address]
pii_fields: ["$.email", "$.ssn", "$.credit_card"]
redaction_mode: mask # or: hash, remove
retain_prompts: false # strip prompts from audit log
retain_outputs: false # strip model outputs from audit log
retention_days: 90 # auto-purge after 90 daysThree redaction modes:
| Mode | Behavior | Example |
|---|---|---|
mask | Partial reveal for debugging | ***-**-6789 |
hash | SHA-256 pseudonymization for analytics | a3f2c91b...e71b |
remove | Full field deletion | (field deleted) |
Python SDK equivalent:
@workflow(
id="customer-onboarding",
version="0.1.0",
data_policy={
"pii_detectors": ["email", "ssn", "phone", "credit_card"],
"pii_fields": ["$.email", "$.ssn"],
"redaction_mode": "mask",
"retain_prompts": False,
"retain_outputs": False,
"retention_days": 90,
},
)
class CustomerOnboarding:
...Data retention
retention_days sets an expires_at timestamp on every audit log entry. The runtime's purge_expired() method runs as a background task, deleting entries past their expiry date.
Additional controls:
retain_prompts: false— strips model prompts from audit entries before writingretain_outputs: false— same for model outputs
The audit log retains metadata (node ID, token counts, timestamps) without the content.
OAuth 2.0 delegation
Not active in 0.5.0. The runtime source includes an RFC 8693 token exchange module (runtime/api/src/oauth.rs) with scope narrowing, a node-scope resolver, and a token validity check. Nothing in the runtime calls it: there is no oauth: configuration block, no oauth_scopes node setting, and no token exchange, per-step scope resolution, or validity check happens when a workflow runs.
The only OAuth 2.0 support that is wired today is the oauth2 auth type for outbound connections (client ID and secret read from environment variables, plus a token URL).
mTLS and A2A federation
For cross-organization agent communication:
Transport: mutual TLS. Both sides present certificates, both sides verify.
export JAMJET_TLS_CERT=/etc/certs/agent.pem
export JAMJET_TLS_KEY=/etc/certs/agent-key.pem
export JAMJET_TLS_CA_CERT=/etc/certs/ca.pem
export JAMJET_MTLS_REQUIRED=trueApplication: capability-scoped Bearer tokens with agent allowlists.
federation:
require_auth: true
public_agent_card: true
tokens:
- token: "tok-alpha"
name: "Research Agent"
agent_id: "agent-alpha"
scopes: ["read", "write"]
allowed_agents: ["agent-alpha"]
method_scopes:
"tasks/send": ["write"]
"tasks/get": ["read"]The federation_auth_layer middleware validates every incoming A2A request. Unauthorized requests get a JSON-RPC error before reaching the handler.
Pluggable secret backends
Chain multiple secret sources with priority ordering:
| Backend | Use case |
|---|---|
| Environment variables | Local dev, CI |
| File-based | Kubernetes secrets, mounted volumes |
| HashiCorp Vault | Production secret management |
| AWS Secrets Manager | AWS-native deployments |
The runtime resolves secrets at startup by checking backends in priority order.
Examples
Runnable examples for each enterprise feature:
git clone https://github.com/jamjet-labs/jamjet-examples examples
cd examples/data-governance # PII redaction + retentiontip: Read the deep dives: data governance and PII redaction, federation auth.