Istio SPIRE integration pattern¶
The Istio SPIRE integration pattern is a security architecture that replaces Istio's default Certificate Authority (CA) with [[spire|SPIRE]] (the SPIFFE Runtime Environment).^[400-devops-07-monitoring-and-observability-k8s-istio-samples-security-spire-readme.md] This integration leverages the SPIFFE (SPIFFE Verifiable Identity Document) specifications to provide workload identity verification through Envoy's Secret Discovery Service (SDS) API.^[400-devops-07-monitoring-and-observability-k8s-istio-samples-security-spire-readme.md]
Architecture and Workflow¶
In this pattern, SPIRE acts as the signing authority for mTLS certificates within the Service mesh.^[400-devops-07-monitoring-and-observability-k8s-istio-samples-security-spire-readme.md] The integration relies on a specific deployment sequence to ensure proper socket injection and communication between the Istio sidecars and the SPIRE components.
Deployment Steps¶
- SPIRE Deployment: The SPIRE server and agents must be deployed to the cluster before Istio is installed.^[400-devops-07-monitoring-and-observability-k8s-istio-samples-security-spire-readme.md] This is a strict requirement to facilitate the necessary socket injections required for the integration.
- Istio Installation: Istio is installed using a custom configuration profile (e.g.,
istio-spire-config.yaml) rather than the default profile.^[400-devops-07-monitoring-and-observability-k8s-istio-samples-security-spire-readme.md] This profile configures theistio-agentto utilize the SPIRE integration. - Workload Registration: Workloads are automatically registered within SPIRE using the
k8s-workload-registrar.^[400-devops-07-monitoring-and-observability-k8s-istio-samples-security-spire-readme.md]
Validation¶
To verify that the integration is functioning correctly, the issued workload identity (SVID) can be inspected.^[400-devops-07-monitoring-and-observability-k8s-istio-samples-security-spire-readme.md] By retrieving the active TLS certificate chain from a target Pod using istioctl proxy-config secret, one can check the certificate's issuer.^[400-devops-07-monitoring-and-observability-k8s-istio-samples-security-spire-readme.md] A successful integration will display "SPIRE" as the organization (O) in the certificate subject (e.g., Subject: C = US, O = [SPIRE](<./spire.md>), CN = sleep-...).^[400-devops-07-monitoring-and-observability-k8s-istio-samples-security-spire-readme.md]
Related Concepts¶
- [[Zero Trust Network Architecture]]
- [[mTLS]]
- [[Sidecar pattern]]
- [[Public Key Infrastructure]]