Before you begin
You need:- An SWA trust domain with an attestation policy that assigns a SPIFFE ID to your workload.
- Access from the workload to the SWA Agent’s Workload API socket.
- The Owner or Admin role in your Reducto organization.
Get the issuer and keys
Find your trust domain’sjwt.discovery_endpoints.oidc_discovery_url and jwt.discovery_endpoints.jwks_uri. See Idira’s OIDC configuration instructions. Reducto must reach both over HTTPS without credentials.
SWA signs with RS512 and a 4096-bit RSA key by default. Reducto accepts it.
Deliver a JWT-SVID to the workload
Run spiffe-helper next to the workload to fetch and refresh the JWT-SVID. Save this ashelper.conf:
emptyDir at /var/run/spiffe with the application container, and mount the socket directory /tmp/swa-agent/public into the helper. On VMs, set agent_address to /run/swa-agent/api.sock.
Inspect the token
From inside the workload, decode the token and check these fields:Configure Reducto
In Studio, open Settings > Workload identity and create a provider with the Idira preset:
If Reducto cannot reach the discovery document, use Uploaded JWKS with the keys from
jwks_uri, and update them when SWA rotates its keys.
Add a mapping with sub = the exact SPIFFE ID from the token, for example spiffe://prod.acme.com/k8s/ns/payments/sa/invoice-parser.
Call Reducto
Set both environment variables in the application container. The SDK then needs no arguments and reads the token file on every exchange.REDUCTO_API_KEY is not set in the container. It takes precedence over the workload identity variables.
Troubleshooting
For SWA diagnostics, see Idira’s OpenAI integration guide, which uses the same agent and helper setup.
Idira best practices
- Use one SPIFFE ID per application and environment, and match it exactly.
- Keep the token file on memory-backed storage, readable only by the application.
- Keep spiffe-helper running so it replaces the JWT-SVID before it expires.