What is a SPIFFE ID?
A SPIFFE ID is a URI that uniquely identifies a workload. In Hexr, it identifies a specific agent process:| Part | Example | Description |
|---|---|---|
| Trust domain | hexr.cloud | Your SPIRE trust domain |
| Type | agent | Always agent for Hexr workloads |
| Tenant | acme-corp | Your tenant namespace |
| Agent name | research-analyst | From @hexr_agent(name=...) |
| Role | researcher | Sub-agent process role |
What is an SVID?
An SVID (SPIFFE Verifiable Identity Document) is the cryptographic proof of a SPIFFE ID. Hexr uses two types, each serving a different purpose:| Type | Format | Used for |
|---|---|---|
| X.509 SVID | X.509 certificate + private key | mTLS between services — Envoy loads this automatically |
| JWT-SVID | Signed JWT token | Cloud credential exchange — presented to AWS STS, GCP WIF, Azure |
Per-process identity
Hexr’s key innovation is assigning a distinct SPIFFE ID to each process within an agent container — not just the pod. If you run a multi-agent framework with a researcher, writer, and editor, each role gets its own identity:- Per-role cloud access — the researcher can access BigQuery but not S3
- Per-role cost tracking — attribute LLM costs exactly to each role
- Per-role audit logs — know precisely which sub-agent performed each action
Identity lifecycle
From the moment you runhexr build to the moment your agent calls a cloud API, here’s how your SPIFFE identity is established:
Build: AST discovery
hexr build scans your Python source via AST analysis. It discovers all agent roles — researcher, writer, editor — and generates process context JSON files that describe each role’s identity and resource requirements.Pod starts: SDK installed
An init container installs the Hexr SDK from the private PyPI registry into a shared volume, ensuring the version matches what was used during
hexr build.PID Mapper: process registration
When your agent process starts — for example, the “researcher” role on PID 42 — the PID Mapper reads
/proc, maps the container PID to the host PID, and writes enriched context JSON for SPIRE workload attestation.SPIRE: SVID issued
The Auto-Registrar creates a SPIRE entry. SPIRE issues an X.509-SVID with a 5-minute TTL that auto-renews at 50% TTL. The certificate’s subject URI is the per-process SPIFFE ID.
Trust domain
Your SPIFFE trust domain depends on your deployment model:| Deployment | Trust domain |
|---|---|
| Hexr Cloud | hexr.cloud |
| Self-hosted (default) | demo.hexr.dev |
| Custom self-hosted | Configurable via Helm |
Certificate rotation
SVIDs are short-lived and rotate automatically — you never manage certificate renewal yourself:| Certificate | TTL | Rotation |
|---|---|---|
| X.509 SVID | 5 minutes | SPIRE auto-renews at 50% TTL |
| JWT-SVID | 5 minutes | Issued on-demand for each STS exchange |
| CA certificate | 24 hours | SPIRE Server rotates automatically |