Module 4: SPIRE Architecture and Components Slides
Slide walkthrough for Module 4 of Mastering SPIFFE & SPIRE: Zero Trust for Cloud Native Systems: How SPIRE implements the SPIFFE specification in...
This slide page is the visual review companion for the full course module. Use it to recap the architecture, examples, exercises, production warnings, and takeaways after reading the lesson.
Slide Outline
- SPIRE Architecture and Components - How SPIRE implements the SPIFFE specification in production
- Learning Objectives - 4 outcomes for this module
- Why This Module Matters - SPIRE is the runtime engine behind workload identity. Understanding its internals — Server/Agent separation, attestation
- SPIRE Server - Lesson section from the full module
- SPIRE Agent - Lesson section from the full module
- Node Attestation - Lesson section from the full module
- Workload Attestation - Lesson section from the full module
- Registration Entries - Lesson section from the full module
- SPIRE Plugin Framework - Lesson section from the full module
- Deployment Models - Lesson section from the full module
- Real-World Use Cases - Enterprise Kubernetes identity — attesting pods via service accounts, VM workload identity — attesting bare-metal servers via cloud instance documents
- Common Mistakes to Avoid - 5 mistakes covered
- Production Notes - 3 practical notes
- Security Risks to Watch - 3 risks covered
- Hands-On Labs - 3 hands-on labs
- Key Takeaways - 6 points to remember
Learning Objectives
- Understand SPIRE Server and Agent architecture
- Learn node attestation and workload attestation
- Configure registration entries
- Master the SPIRE plugin framework
Why This Module Matters
SPIRE is the runtime engine behind workload identity. Understanding its internals — Server/Agent separation, attestation flows, registration entries — is the difference between following a tutorial and operating SPIRE confidently in production. When something breaks at 2 AM, you need to know WHERE to look.
Production Notes
- Always use a shared database (PostgreSQL/MySQL) for SPIRE Server in production. SQLite does not support HA.
- SPIRE Agent should run as a DaemonSet — one per node, not one per pod. It serves all workloads on the node via the Unix socket.
- Use the k8s_psat node attestor for Kubernetes. It is more secure than join tokens because it leverages Kubernetes projected service account tokens.
Common Mistakes
- Using SQLite datastore in production (use PostgreSQL for HA)
- Not enabling debug logging during initial deployment — makes troubleshooting impossible
- Creating overly broad registration selectors that match unintended workloads
- Forgetting to create a registration entry before expecting a workload to get an SVID
- Running SPIRE Agent as a sidecar instead of a DaemonSet (wastes resources, complicates management)
Key Takeaways
- SPIRE Server is the control plane — manages registrations and signs SVIDs
- SPIRE Agent runs on every node — exposes the Workload API to local workloads
- Node attestation proves the Agent is on a legitimate node
- Workload attestation proves the calling process matches a registration entry
- Registration entries map selectors to SPIFFE IDs
- SPIRE is plugin-based — supports multiple clouds, orchestrators, and datastores
Hands-On Labs
-
Installing SPIRE from Binaries
Install and run SPIRE Server and Agent on a local machine.
- Download SPIRE release binaries
- Configure SPIRE Server with SQLite datastore
- Configure SPIRE Agent with join token attestor
- Start the server and agent, verify they connect
-
Configuring Registration Entries
Register workloads and assign SPIFFE IDs.
- Create a registration entry for a demo workload
- Verify the entry with spire-server entry show
- Run the demo workload and confirm it receives an SVID
- Inspect the SVID with openssl
-
Attesting Nodes and Workloads
Observe the full attestation flow.
- Enable debug logging on SPIRE Server and Agent
- Restart the agent and observe node attestation logs
- Run a workload and observe workload attestation logs
- Intentionally fail attestation and observe the error