The End of the Trusted Network
The traditional castle-and-moat model of network security — build a hard perimeter, trust everything inside it — has failed decisively. Remote work, cloud adoption, and lateral movement during breaches have rendered the implicit trust model dangerous. Zero Trust replaces that assumption with a simple principle: never trust, always verify.
BeyondCorp, Google’s internal implementation of Zero Trust published starting in 2014, demonstrated that an enterprise could operate without a privileged corporate network. Employees work from untrusted networks by default, and access is granted based on device state and user identity — not network position. This guide translates those principles into a practical implementation roadmap for hybrid environments.
Core Principles of Zero Trust
Before touching any tooling, align your team on the foundational tenets:
- Verify explicitly. Authenticate and authorize every request using all available signals: identity, device health, location, and the service being accessed.
- Use least privilege access. Limit access to only what is needed, when it is needed. Just-in-time and just-enough-access reduce the blast radius of credential compromise.
- Assume breach. Design systems as if an attacker is already inside. Segment networks, encrypt lateral traffic, and log everything.
Identity-Aware Proxy: The Enforcement Gateway
The Identity-Aware Proxy (IAP) is the cornerstone of a BeyondCorp architecture. It sits in front of every internal application and evaluates each request against identity and device policy before proxying it upstream.
# Example: Identity-aware proxy access policy
# All requests to app.example-corp.com must satisfy:
# - Valid OIDC token from identity provider
# - Device certificate issued by corporate CA
# - Device compliance: MDM enrolled, disk encryption active
access_policy:
resource: "https://app.example-corp.com"
conditions:
identity:
require_mfa: true
allowed_groups: ["engineering", "ops"]
device:
require_managed: true
require_disk_encryption: true
max_os_patch_age_days: 30
When a user hits the proxy, the IAP validates the OIDC bearer token against your IdP, checks the device certificate against your PKI, and evaluates the device posture claims embedded in the certificate or retrieved from your MDM. Only if all conditions pass does the request reach the backend service.
Deploying the Proxy Layer
In a hybrid environment, you will typically deploy IAP instances at multiple chokepoints: in front of cloud workloads, at the perimeter of on-premises data center segments, and potentially as a sidecar to individual services for east-west control. A common pattern uses an Apache or Envoy reverse proxy with an external authorization filter calling a policy engine like Open Policy Agent.
# Envoy external authorization config (abbreviated)
http_filters:
- name: envoy.filters.http.ext_authz
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.http.ext_authz.v3.ExtAuthz
grpc_service:
envoy_grpc:
cluster_name: opa_authz
timeout: 0.25s
failure_mode_allow: false
Setting failure_mode_allow: false is critical — if the policy engine is unreachable, access must be denied, not granted.
Device Trust: Building a Certificate-Based Enrollment Pipeline
Zero Trust requires that devices be verifiably managed. The mechanism is a device certificate issued by your corporate PKI after the device passes enrollment checks. This certificate is presented alongside the user token and encodes the device ID, compliance state, and issuance timestamp.
Enrollment Flow
- Device agent contacts the device enrollment service over a pre-shared bootstrap credential.
- Enrollment service queries MDM API for device compliance state (OS version, disk encryption, screen lock, EDR presence).
- If compliant, enrollment service calls the intermediate CA to issue a short-lived device certificate (24-hour TTL).
- Certificate is installed in the device’s OS certificate store and presented automatically by the browser or VPN client on each request.
- Device agent runs continuously, re-enrolling every 23 hours and revoking the certificate if the device becomes non-compliant.
The short TTL is intentional — it means a stolen certificate is unusable within hours, and a device that falls out of compliance loses access without manual intervention.
Micro-Segmentation: East-West Zero Trust
North-south Zero Trust (user to application) is only half the picture. Lateral movement between services — east-west traffic — is where breaches propagate. Micro-segmentation applies Zero Trust between services.
The implementation pattern depends on your infrastructure:
- Kubernetes environments: Use Network Policies to default-deny all pod-to-pod traffic, then allow only explicit service-to-service paths. Layer mTLS via a service mesh (Istio, Linkerd) so every service call carries mutual certificate authentication.
- VM/bare-metal environments: Deploy host-based firewall rules enforced via configuration management (Puppet, Ansible). Combine with an overlay network that requires mutual TLS between all service endpoints.
- Hybrid (VMs + containers): A software-defined perimeter tool or a commercial service mesh can provide a consistent mTLS fabric across heterogeneous compute.
# Kubernetes NetworkPolicy: default deny all ingress
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: default-deny-ingress
namespace: production
spec:
podSelector: {}
policyTypes:
- Ingress
---
# Allow only api-service to call db-service on port 5432
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: allow-api-to-db
namespace: production
spec:
podSelector:
matchLabels:
app: db-service
ingress:
- from:
- podSelector:
matchLabels:
app: api-service
ports:
- port: 5432
Policy Enforcement Points and the Policy Engine
A policy enforcement point (PEP) is any component that intercepts a request and calls out to a policy decision point (PDP) for an allow/deny verdict. In a mature Zero Trust architecture, PEPs exist at multiple layers:
- Network layer: Firewall rules enforced by perimeter firewalls, cloud security groups, or host-based firewalls.
- Application layer: The IAP validates tokens and device certificates before requests reach applications.
- Data layer: Database proxies require authenticated, role-bound sessions for every query.
- API layer: API gateways enforce OAuth scopes and rate limiting per identity.
Open Policy Agent (OPA) is the de facto open-source PDP. Policies are written in Rego and evaluated against a JSON input document describing the request context.
# OPA Rego policy: require MFA and managed device for sensitive endpoints
package authz
default allow = false
allow {
input.user.mfa_verified == true
input.device.managed == true
input.device.disk_encrypted == true
startswith(input.request.path, "/api/v1/sensitive")
}
allow {
not startswith(input.request.path, "/api/v1/sensitive")
input.user.authenticated == true
}
Logging and Continuous Verification
Zero Trust is not a one-time gate — it is a continuous evaluation loop. Every access decision should be logged with full context: who, what device, what resource, what time, what policy evaluated, and the result. These logs feed your SIEM for anomaly detection.
Key signals to monitor:
- Access from a new device for an established user identity
- Access from a geographic location inconsistent with the user’s prior patterns
- Device certificate issued but device no longer in MDM inventory
- Spike in policy denial events for a specific identity (possible credential stuffing)
- East-west traffic on paths that should be blocked by micro-segmentation rules
Phased Implementation Roadmap
Zero Trust cannot be deployed overnight. A realistic phased approach:
- Phase 1 — Identity foundation (months 1-2): Deploy a centralized IdP, enforce MFA across all users, integrate all applications with SSO.
- Phase 2 — Device trust (months 2-4): Deploy MDM, build the device certificate enrollment pipeline, begin requiring device certs for sensitive applications.
- Phase 3 — Application segmentation (months 3-6): Deploy IAP in front of internal applications, remove direct VPN access to application networks for those applications.
- Phase 4 — East-west mTLS (months 5-9): Roll out a service mesh or mTLS enforcement across internal services. Default-deny network policies.
- Phase 5 — Data access controls (months 8-12): Wrap databases and secrets stores with authenticated proxies. Implement just-in-time privilege elevation.
Common Pitfalls
The most common Zero Trust failure modes are not technical — they are organizational and operational:
- Treating Zero Trust as a product category. Vendors will sell you a “Zero Trust solution.” The architecture requires multiple integrated components, not a single appliance.
- Over-engineering the first phase. Start with identity and MFA. A strong IdP with enforced MFA delivers 80% of the Zero Trust benefit at 20% of the complexity.
- Neglecting service accounts. Human identity is the easy part. Workload identity — how services authenticate to each other — is where most architectures have gaps.
- Skipping the logging investment. Without comprehensive access logging, you cannot detect policy violations or tune your policies based on legitimate access patterns.
Conclusion
Implementing BeyondCorp principles in a hybrid environment is a multi-year journey, not a sprint. The payoff — dramatically reduced blast radius from credential compromise, lateral movement prevention, and a defensible access control model — is worth the sustained investment. Start with identity, build device trust, layer on application proxies, and systematically eliminate implicit trust wherever it exists in your infrastructure.
