Zero Trust Architecture (ZTA) is a security framework based on the realization that traditional perimeter-based security is obsolete. It operates on the principle of "Never Trust, Always Verify," requiring strict identity verification for every person and device trying to access resources on a private network, regardless of whether they are sitting inside or outside of the network perimeter.
In dynamic, cloud-native environments, IP addresses are ephemeral and cannot serve as reliable identity markers. ZTA shifts identity to the Workload level using the SPIFFE (Secure Production Identity Framework for Everyone) standard.
spiffe://example.org/ns/billing/sa/payment-processor).SPIRE (the SPIFFE Runtime Environment) automates the issuance and rotation of SVIDs. It consists of:
ZTA mandates that all service-to-service communication is encrypted and mutually authenticated. Unlike standard TLS (where only the server proves its identity), mTLS requires both parties to present certificates.
Network-level firewalls are too coarse for ZTA. Instead, we use Microsegmentation driven by a Policy Decision Point (PDP) such as Open Policy Agent (OPA).
OPA uses the Rego language to define fine-grained authorization policies. This allows decoupling security logic from the application code.
package envoy.authz
import input.attributes.request.http as http_request
default allow = false
# Allow access to the payment API only if:
# 1. The caller has a valid SPIFFE ID from the 'billing' namespace
# 2. The HTTP method is POST
# 3. The caller's certificate is not expired
allow {
is_post
is_billing_service
not certificate_expired
}
is_post = http_request.method == "POST"
is_billing_service {
# Extract SPIFFE ID from the X-Forwarded-Client-Cert header
cert_data := http_request.headers["x-forwarded-client-cert"]
contains(cert_data, "URI=spiffe://example.org/ns/billing/")
}
certificate_expired {
# Check current time vs cert expiration (simplified logic)
time.now_ns() > input.attributes.source.certificate_expiration
}
To prevent identity theft, the private keys used for SVIDs should never be stored in plaintext on the file system.
ZTA is not a "once and done" check. It requires Continuous Verification: