Loading content...
When Google's BeyondCorp team set out to eliminate their corporate network perimeter, they faced a fundamental challenge: if you can't trust the network, what can you trust?
Their answer transformed enterprise security: trust identity, not location.
Instead of asking "Is this request coming from inside our network?", Zero Trust asks "Who is making this request, and are they authorized for this specific action?" This shift from network-centric to identity-centric security is perhaps the most profound change in how we design secure systems.
The identity challenge in distributed systems:
In a monolithic application, identity was relatively simple—users logged in, and the application managed sessions. In a distributed system with hundreds of microservices, the identity landscape explodes in complexity:
Zero Trust requires strong, verified identity for all of these before granting any access.
By the end of this page, you will understand how identity-based access control works in Zero Trust architectures. You'll learn about workload identity frameworks like SPIFFE/SPIRE, explore cloud-native identity patterns, understand how to implement identity-aware proxies, and see how to build systems where every request is authenticated and authorized based on verified identity.
Traditional access control relied heavily on network location as a proxy for identity:
This approach made a dangerous assumption: network location implies identity.
Why this assumption fails:
1. IP addresses are not authenticated
An IP address proves nothing about who is making a request. Any device on a network can claim any IP through:
Reality of IP-based "identity":
Firewall Rule: Allow 10.0.1.50 → database:5432
What we assume: What might actually be true:
10.0.1.50 = App Server 10.0.1.50 = Attacker who compromised app server
10.0.1.50 = Malicious insider on that host
10.0.1.50 = Lateral movement from another breach
10.0.1.50 = Misconfigured or rogue device
2. Cloud and containers make IPs ephemeral
In dynamic environments, IP addresses change constantly:
IP-based rules become impossible to maintain accurately.
3. Remote work eliminates network boundaries
With employees working from home, coffee shops, and co-working spaces:
The concept of "inside the network" is meaningless.
With cryptographic identity, you can verify that a request comes from exactly who claims to be sending it. With network location, you can only verify that a request came from a particular IP—not who controls that IP. This fundamental difference is why identity-based access is more secure than network-based access.
Zero Trust requires identity verification at multiple levels. Understanding this hierarchy is essential for comprehensive identity-based access control.
| Identity Type | What It Represents | Verification Method | Example |
|---|---|---|---|
| User Identity | Human beings accessing systems | MFA, SSO, passwordless auth | alice@company.com authenticated via Okta |
| Device Identity | Physical/virtual devices | Certificates, TPM attestation, MDM enrollment | Alice's corporate laptop with device certificate |
| Service Identity | Long-running applications/services | Service accounts, certificates, tokens | payment-service in production namespace |
| Workload Identity | Ephemeral compute units | Short-lived certificates, cloud metadata | Container instance running payment-service v2.3 |
| Machine Identity | Servers, VMs, hardware | Hardware attestation, TPM, certificates | Physical server in us-east-1 data center |
Combining identity signals:
The most secure Zero Trust implementations combine multiple identity signals:
Access Request Evaluation:
┌─────────────────────────────────────────────────────────────────────────┐
│ Access Request │
│ From: alice@company.com │
│ Device: laptop-12345.corporate.com │
│ Application: finance-dashboard │
│ Resource: /api/reports/quarterly │
└─────────────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────────────┐
│ Identity Verification Cascade │
│ │
│ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ │
│ │ User Identity │ │ Device Identity │ │ App Identity │ │
│ │ │ │ │ │ │ │
│ │ ✓ Valid user │ │ ✓ Managed │ │ ✓ Known app │ │
│ │ ✓ MFA passed │ │ ✓ Compliant │ │ ✓ Valid cert │ │
│ │ ✓ Not revoked │ │ ✓ Encrypted │ │ ✓ Not expired │ │
│ │ ✓ Group: Finance│ │ ✓ Patched │ │ │ │
│ └─────────────────┘ └─────────────────┘ └─────────────────┘ │
│ │
│ Combined Signal: All identities verified + context acceptable │
│ Decision: ALLOW access to /api/reports/quarterly with audit logging │
└─────────────────────────────────────────────────────────────────────────┘
The identity chain:
In a typical request flow through a distributed system, identity must be verified at each hop:
Each hop requires verified identity—no implicit trust based on being "internal."
As requests flow through a distributed system, the original user identity should be propagated alongside service identities. This enables authorization decisions that consider "which user is this service acting on behalf of?" rather than just "which service is calling?" JWTs and structured headers are common propagation mechanisms.
SPIFFE (Secure Production Identity Framework for Everyone) is a set of open-source standards for workload identity, and SPIRE (SPIFFE Runtime Environment) is the reference implementation. Together, they provide a foundation for identity-based access in distributed systems.
Why SPIFFE matters:
Before SPIFFE, workload identity was fragmented:
SPIFFE provides a universal, platform-agnostic standard for workload identity.
Core SPIFFE concepts:
1. SPIFFE ID
A SPIFFE ID is a URI that uniquely identifies a workload:
spiffe://trust-domain/path/to/workload
Examples:
spiffe://prod.company.com/payments/payment-service
spiffe://prod.company.com/ns/production/sa/frontend
spiffe://dev.company.com/workloads/testing-service
Components:
2. SVID (SPIFFE Verifiable Identity Document)
An SVID is a cryptographically signed document that contains the SPIFFE ID. Two formats:
X.509-SVID Certificate:
┌─────────────────────────────────────────────────────────────┐
│ Subject: CN=payment-service │
│ Subject Alternative Name: │
│ URI: spiffe://prod.company.com/payments/payment-service │
│ Validity: Not Before: 2024-01-15T10:00:00Z │
│ Not After: 2024-01-15T11:00:00Z (1 hour!) │
│ Issuer: CN=SPIRE Server CA,OU=SPIRE,O=Company │
│ Signature: [cryptographic signature from SPIRE CA] │
└─────────────────────────────────────────────────────────────┘
Note: Short validity periods (minutes to hours) limit exposure from stolen credentials
SPIRE architecture:
┌─────────────────────────────────────────────────────────────────────────┐
│ SPIRE Architecture │
└─────────────────────────────────────────────────────────────────────────┘
┌────────────────────────────────┐
│ SPIRE Server │
│ ┌──────────────────────────┐ │
│ │ Registration API │ │ ← Configure which workloads
│ │ (workload → SPIFFE ID)│ │ get which identities
│ └──────────────────────────┘ │
│ ┌──────────────────────────┐ │
│ │ Certificate Authority │ │ ← Signs SVIDs
│ │ (issues SVIDs) │ │
│ └──────────────────────────┘ │
│ ┌──────────────────────────┐ │
│ │ Node Attestation │ │ ← Verifies node identity
│ │ (validates SPIRE agents│ │ (cloud metadata, TPM, etc.)
│ └──────────────────────────┘ │
└───────────────┬────────────────┘
│
┌────────────────────────┼────────────────────────┐
│ │ │
▼ ▼ ▼
┌───────────────┐ ┌───────────────┐ ┌───────────────┐
│ SPIRE Agent │ │ SPIRE Agent │ │ SPIRE Agent │
│ (Node 1) │ │ (Node 2) │ │ (Node 3) │
└───────┬───────┘ └───────┬───────┘ └───────┬───────┘
│ │ │
▼ ▼ ▼
┌───────────────┐ ┌───────────────┐ ┌───────────────┐
│ Workload A │ │ Workload B │ │ Workload C │
│ (gets SVID) │ │ (gets SVID) │ │ (gets SVID) │
└───────────────┘ └───────────────┘ └───────────────┘
How SPIRE issues identity:
Node attestation: SPIRE Server verifies SPIRE Agent's node is legitimate (using AWS instance metadata, Kubernetes tokens, TPM, etc.)
Workload attestation: SPIRE Agent verifies workload is legitimate (using Kubernetes pod info, Docker labels, process UID, etc.)
SVID issuance: SPIRE Server issues short-lived certificate to verified workload
Automatic rotation: SPIRE Agent automatically renews certificates before expiry
Service meshes like Istio and Linkerd use SPIFFE under the hood for workload identity. Even if you don't deploy SPIRE directly, understanding SPIFFE helps you understand how identity works in these platforms. For multi-cloud or hybrid deployments, SPIRE provides a unified identity layer across all environments.
Each major cloud provider offers identity mechanisms for workloads. Understanding these is essential for Zero Trust in cloud environments.
AWS Identity and Access Management (IAM)
AWS provides multiple mechanisms for workload identity:
IAM Roles for EC2:
IAM Roles for Service Accounts (IRSA) in EKS:
# Kubernetes ServiceAccount linked to AWS IAM role
apiVersion: v1
kind: ServiceAccount
metadata:
name: payment-service
annotations:
eks.amazonaws.com/role-arn: arn:aws:iam::123456789:role/PaymentServiceRole
# Pod automatically gets AWS credentials for this role
apiVersion: v1
kind: Pod
metadata:
name: payment-pod
spec:
serviceAccountName: payment-service # Uses IRSA
Lambda execution roles:
Google Cloud Identity
Workload Identity for GKE:
# Kubernetes ServiceAccount linked to GCP service account
apiVersion: v1
kind: ServiceAccount
metadata:
name: payment-service
annotations:
iam.gke.io/gcp-service-account: payment@project.iam.gserviceaccount.com
Service Account Keys vs Workload Identity:
Azure Identity
Managed Identities:
Azure AD Workload Identity for AKS:
apiVersion: v1
kind: ServiceAccount
metadata:
name: payment-service
annotations:
azure.workload.identity/client-id: <client-id>
azure.workload.identity/tenant-id: <tenant-id>
| Feature | AWS | GCP | Azure |
|---|---|---|---|
| Kubernetes integration | IRSA (IAM Roles for Service Accounts) | Workload Identity | Azure AD Workload Identity |
| VM/Instance identity | EC2 Instance Profiles | Compute Engine service accounts | System-assigned Managed Identity |
| Serverless identity | Lambda execution roles | Cloud Functions service accounts | Function Managed Identity |
| Cross-account/project | IAM role assumption | Cross-project service account impersonation | Cross-tenant federation |
| External identity federation | OIDC/SAML providers | Workload Identity Federation | Federated credentials |
Never use long-lived credentials (API keys, service account key files) when temporary credentials are available. Long-lived credentials are a top cause of cloud breaches. Use instance metadata, workload identity, and OIDC federation for automatic, temporary credential acquisition.
Kubernetes provides multiple identity layers that work together with service meshes and external identity systems.
Kubernetes identity components:
1. Service Accounts
Every pod runs with a service account identity:
apiVersion: v1
kind: ServiceAccount
metadata:
name: payment-service
namespace: production
---
apiVersion: v1
kind: Pod
metadata:
name: payment-pod
spec:
serviceAccountName: payment-service
# Pod gets token at /var/run/secrets/kubernetes.io/serviceaccount/token
The service account token:
2. Projected Service Account Tokens
Modern Kubernetes uses bound, time-limited tokens:
apiVersion: v1
kind: Pod
spec:
containers:
- name: app
volumeMounts:
- mountPath: /var/run/secrets/tokens
name: app-token
volumes:
- name: app-token
projected:
sources:
- serviceAccountToken:
path: token
expirationSeconds: 3600 # 1 hour expiry
audience: "api.company.com" # Specific audience
3. Service Mesh Identity (Istio Example)
Istio builds on Kubernetes identity to provide mTLS:
Kubernetes ServiceAccount: payment-service in production namespace
↓ Istio Citadel/istiod issues certificate
SPIFFE ID: spiffe://cluster.local/ns/production/sa/payment-service
↓ Certificate mounted in Envoy sidecar
mTLS: Payment pod proves identity to other pods cryptographically
AuthorizationPolicy using identity:
apiVersion: security.istio.io/v1
kind: AuthorizationPolicy
metadata:
name: payment-access
namespace: production
spec:
selector:
matchLabels:
app: payment-service
rules:
- from:
- source:
# Only specific service identities can call payment-service
principals:
- "cluster.local/ns/production/sa/checkout-service"
- "cluster.local/ns/production/sa/order-service"
to:
- operation:
methods: ["POST"]
paths: ["/api/payments/*"]
This policy:
Even without a full service mesh, you can implement identity-based access using Kubernetes Network Policies (L3/L4) with Cilium or Calico identity-awareness, JWT validation in applications, or API gateways that verify service identity tokens. Service mesh provides the most complete solution, but isn't always required.
Identity-Aware Proxies (IAPs) are a key architectural component in Zero Trust. They sit in front of applications and enforce identity verification before allowing access.
How identity-aware proxies work:
┌─────────────────────────────────────────────────────────────────────────┐
│ Identity-Aware Proxy Flow │
└─────────────────────────────────────────────────────────────────────────┘
User Request Application
│ │
▼ │
┌───────────────────────────────────────────────────────┐ │
│ Identity-Aware Proxy (IAP) │ │
│ │ │
│ 1. User already authenticated? │ │
│ NO → Redirect to IdP (Okta, Azure AD, etc.) │ │
│ YES → Continue │ │
│ │ │
│ 2. Verify identity token (JWT validation) │ │
│ │ │
│ 3. Check device posture (optionally) │ │
│ - Is device managed? │ │
│ - Is device compliant? │ │
│ │ │
│ 4. Evaluate access policy │ │
│ - Is user authorized for this application? │ │
│ - Any conditional access requirements? │ │
│ │ │
│ 5. Pass request to application with identity headers │ │
└──────────────────────────┬────────────────────────────┘ │
│ │
│ X-User-Email: alice@company.com │
│ X-User-Groups: ["engineering"] │
│ X-Device-Id: laptop-12345 │
▼ │
Application │
(trusts proxy headers)◀────────────────────────┘
| Solution | Type | Key Features | Best For |
|---|---|---|---|
| Google IAP | Cloud-native | Deep GCP integration, BeyondCorp-style | GCP workloads, simple apps |
| Azure AD Application Proxy | Cloud-native | Azure AD integration, hybrid support | Azure/Microsoft environments |
| AWS Verified Access | Cloud-native | Device trust, Cedar policies | AWS workloads |
| Pomerium | Open-source | Self-hosted, flexible policies | Multi-cloud, on-premises |
| Cloudflare Access | SaaS | Global edge, easy setup | Any environment, quick deployment |
| Teleport | Open-source/Commercial | Infrastructure access (SSH, K8s, DB) | Developer access to infrastructure |
Beyond web applications:
Identity-aware proxies aren't limited to HTTP. Modern solutions support:
Example: Teleport for infrastructure access:
Traditional SSH access:
1. Generate SSH key pair
2. Add public key to server authorized_keys
3. SSH with private key
4. Keys live forever, hard to revoke, no MFA
Teleport (identity-first SSH):
1. Authenticate to Teleport with MFA
2. Teleport issues short-lived SSH certificate (hours, not forever)
3. SSH with certificate
4. Every session logged, easily revoked, MFA enforced
Identity-aware proxies can replace VPNs for application access. Instead of "get on the VPN to access internal apps," users authenticate directly to the identity proxy, which grants access to specific applications based on identity and context. This is more secure (per-app access, not network access) and better user experience (no VPN client).
Moving from network-based to identity-based access is a journey. Here's a practical implementation approach:
Common implementation patterns:
Pattern 1: Service mesh for east-west traffic
Internal services ←→ mTLS via Istio/Linkerd ←→ Identity-based authorization
- Every service has SPIFFE identity
- Every call is encrypted and authenticated
- AuthorizationPolicy enforces access rules
Pattern 2: Identity-aware proxy for north-south traffic
Users → Identity-Aware Proxy → Internal applications
- Users authenticate via SSO with MFA
- Proxy verifies identity and device posture
- Per-application authorization policies
Pattern 3: Workload identity for cloud resources
Kubernetes pods → IRSA/Workload Identity → Cloud resources (S3, RDS, etc.)
- No static credentials in pods
- Automatic credential rotation
- Fine-grained IAM policies per workload
Legacy systems often can't participate in modern identity protocols. Strategies include: wrapping legacy services behind identity-aware proxies, implementing identity translation layers, or accepting (and heavily monitoring) exceptions for legacy systems while planning migration.
Let's consolidate the key concepts of identity-based access in Zero Trust:
What's next:
With identity as the foundation of trust, we now need to understand how to implement Zero Trust in practice. The final page of this module brings together everything we've learned: the philosophy of never trust/always verify, the NIST principles, micro-segmentation, and identity-based access. We'll explore Zero Trust implementation patterns and create a roadmap for deploying Zero Trust in your organization.
You now understand identity-based access as the foundation of Zero Trust. You've learned about workload identity with SPIFFE/SPIRE, cloud-native identity patterns, Kubernetes identity, and identity-aware proxies. In the final page, we'll synthesize these concepts into practical implementation strategies.