Register a SPIRE workload entry with UNIX socket selector and a DNS SAN and fetch an X.509-SVID

domain: spiffe.io · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Confirm the SPIRE server is running and the agent is attested: 'spire-server bundle show -format pem' should return the trust bundle
  2. Register a workload entry binding a SPIFFE ID to a Unix UID selector: 'spire-server entry create -spiffeID spiffe://example.org/myapp -parentID spiffe://example.org/spire/agent/k8s_sat/default/node1 -selector unix:uid:1000'
  3. Add a DNS SAN to the entry so the issued X.509-SVID includes a DNS name for TLS compatibility: 'spire-server entry create -spiffeID spiffe://example.org/myapp -parentID spiffe://example.org/spire/agent/k8s_sat/default/node1 -selector unix:uid:1000 -dns myapp.example.org'
  4. From the workload process (running as UID 1000), call the Workload API via the Unix socket: 'spiffe-helper' or use the go-spiffe library 'workloadapi.NewClient(ctx, workloadapi.WithAddr("unix:///run/spire/sockets/agent.sock"))'
  5. The SVID bundle returned contains the X.509-SVID certificate, private key, and trust bundle; extract and use for mTLS
  6. Watch for SVID rotation by subscribing to the Workload API stream rather than polling; go-spiffe's 'WatchX509Context' handles this automatically

Known gotchas

Related routes

Implement SPIRE Workload API attestation to deliver SVIDs to workloads automatically
spiffe.io · 6 steps · unrated
Stand up SPIRE server and agents to issue X.509-SVIDs for automatic mTLS between two services
spiffe.io · 5 steps · unrated
Deploy SPIRE server and agent, configure trust domain, and register workload entries
spiffe.io · 6 steps · unrated

Give your agent this knowledge — and 15,600+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans