Jsaha.in / Blogs Archive
Portfolio
Cybersecurity Oct 26, 2026 14–18 min read

Implementing Zero-Trust Architecture in Multi-Cloud Infrastructure

Practical defense-in-depth engineering strategies for Kubernetes, Linux environments, and API gateways.

Cloud-Native Engineering DevSecOps Kubernetes API Security
J
Jyotirmoy Saha
Author & Engineering Lead
ZERO-TRUST GATES · EVERY HOP VERIFIED CLOUD.A CLOUD.B ON-PREM IDENTITYPOLICYmTLS API WORKER DATA DENY > id=orders-api act=reserve ALLOW > id=batch-job act=export DENY > id=billing-wkr act=read ALLOW > id=orders-api act=reserve ALLOW > id=batch-job act=export DENY > id=billing-wkr act=read ALLOW AUDIT EVIDENCE
CORE IDEA

Zero trust is an engineering model, not a product

Zero trust is not a product you install or a network diagram you draw. It is an engineering model in which every access path has an explicit identity, a narrowly scoped authorization decision, an enforceable boundary, and observable evidence.

0
Planes of enforcement
0
Questions every request must answer
0
Day implementation roadmap
0
Failure scenarios to test
Reading note: the charts in this article use illustrative sample values to support planning conversations. They are not measured security data or industry benchmarks.
INTRODUCTION

The multi-cloud problem is a trust problem

A multi-cloud platform rarely fails because it has no security controls. More often, controls exist in separate places and make inconsistent assumptions.

A Kubernetes workload may be protected by a cluster network policy, while its cloud role grants broad access to object storage. A Linux host may require SSH keys, yet a long-lived service credential stored on that host can still call internal APIs. An API gateway may validate a JSON Web Token (JWT), while the application behind it trusts a user ID supplied in the request. Each control can look reasonable in isolation; the gaps between them create the attack path.

The challenge grows when workloads span two or more cloud providers, managed Kubernetes services, virtual machines, private data centres, SaaS APIs, and CI/CD runners. IP addresses and network boundaries change, but the business requirement remains: only the right subject, using an appropriate identity and healthy workload, should be allowed to perform a specific action on a specific resource—and that decision should be verifiable.

NIST describes zero trust as moving security away from implicit trust based on network location or ownership and toward protecting individual resources. Its cloud-native multi-cloud guidance emphasizes application and service identities, API gateways, sidecar proxies, and identity infrastructure that can enforce policy regardless of where a workload runs. NIST SP 800-207 · NIST SP 800-207A

This article turns that principle into a practical implementation approach for Kubernetes, Linux, and API gateways.

What this guide covers

  • A reference architecture for consistent identity and policy across clouds.
  • A practical defense-in-depth model for Kubernetes workloads.
  • Linux host controls that reduce lateral movement.
  • API gateway and application authorization patterns.
  • Identity, secrets, telemetry, and policy lifecycle engineering.
  • A staged rollout plan, measurable indicators, and failure-mode testing.
01 • THREAT MODEL

Start with a threat model, not a vendor diagram

Before choosing a service mesh, gateway, identity provider, or cloud-native security product, list the assets and the ways an attacker could reach them.

Consider a fictional commerce platform:

Cloud A

Public API gateway, application Kubernetes cluster, managed database.

Cloud B

Asynchronous workers, object storage, analytics services.

Private Linux estate

Legacy reporting service and a deployment runner.

Shared platform

Identity provider, CI/CD, secrets manager, logging and alerting.

The most useful question is not simply “Is this subnet private?” It is “If this workload or credential is compromised, what can it access next?”

Threat-path examples

Initial compromiseCommonly overlooked pathDesign response
Public API endpointToken accepted without checking object ownershipEnforce object- and action-level authorization in the application
Kubernetes podBroad cloud role or open egress permits access to metadata or other servicesWorkload identity, egress restrictions, and narrow cloud permissions
Linux hostReused SSH key or privileged service account enables lateral movementPer-person identity, short-lived access, host hardening, and least privilege
CI/CD runnerDeployment identity can change production policy and read application secretsSeparate build and deploy identities; approval gates; scoped credentials
Compromised serviceInternal services trust traffic because it came from a “trusted” networkMutual TLS (mTLS) plus service identity and authorization policy
Design principle: treat the network as a useful containment mechanism, not as proof of identity.

A small but important distinction

Authentication

Who or what is making this request?

Authorization

May this identity perform this action on this resource?

Posture and context

Should the request be allowed under current conditions?

Observability

Can we reconstruct why the request was allowed or denied?

Zero trust needs all four. Strong authentication without resource-level authorization can still leave an insecure application.

02 • REFERENCE ARCHITECTURE

One policy intent, multiple enforcement points

A workable multi-cloud design separates policy intent from policy enforcement.

Identity sources

Workforce identity provider, workload identity issuer, cloud IAM, and certificate authority.

Policy decision

Central standards and policy-as-code define what is permitted. Runtime components evaluate requests using locally available policy and identity evidence.

Policy enforcement

API gateways, service-mesh proxies, Kubernetes admission controls, cloud IAM, Linux access controls, and application code.

Evidence

Logs and traces record identity, resource, action, decision, and policy version.

A central policy does not mean every request must travel to one central server. Runtime authorization should be designed to remain secure during network partitions and control-plane outages. For example, cached policy and short-lived credentials can keep low-risk operations available for a defined period, while high-risk changes can fail closed.

Reference flow

CLOUD A · KUBERNETES CLOUD B · WORKERS / DATA SHARED SECURITY PLANE POLICY as code + decision IDENTITY workload ID + cert. auth. EVIDENCE audit logs, metrics, traces short-lived user token authenticate, rate-limit, coarse policy service identity + mTLS queue event workload identity + scoped role User / Client Identity Provider API Gateway edge enforcement point Application Service object-level authorization decides who owns what Downstream Service caller-to-service policy valid cert ≠ any endpoint Data Store Worker Workload own identity, own role Object Storage LEGEND request path identity-bound hop policy / queue event telemetry to evidence
Conceptual reference design: policy, identity and evidence are shared across clouds, while every enforcement point still makes its own local decision. It is not a requirement to use one product or to centralize every runtime decision.

The five planes of enforcement

1
Identity plane
Workforce identities, workload identities, certificate issuance, key rotation, and lifecycle.
2
Control plane
Desired policy, infrastructure-as-code, admission policy, cloud IAM, and change review.
3
Network plane
Segmentation, private connectivity, ingress/egress controls, DNS and metadata-service restrictions.
4
Application plane
Gateway validation, service-to-service authorization, and business-level object permissions.
5
Evidence plane
Consistent audit events, security analytics, incident response, and policy testing.

No single plane is sufficient. A service mesh can authenticate a service but cannot determine whether a customer owns invoice inv_123; the application must make that decision. A gateway can reject a malformed token but cannot, by itself, guarantee that a compromised pod lacks cloud permissions.

03 • IDENTITY MODEL

Build a consistent identity model across clouds

Multi-cloud zero trust becomes fragile when the same service has unrelated identities in each environment and no clear way to map them to a business owner or workload purpose.

3.1 Workforce identity

Use a central identity provider for human access where feasible, with:

  • Phishing-resistant multi-factor authentication for administrators and other high-risk roles.
  • Single sign-on backed by federation rather than duplicated local accounts.
  • Role-based access control (RBAC) and, where useful, attribute-based access control (ABAC).
  • Just-in-time elevation for privileged actions.
  • Fast deprovisioning and session revocation procedures.
  • Separate emergency access accounts with tightly monitored use.

Avoid shared administrator accounts. Every privileged action should map to a person, a ticket or approved purpose, and an auditable session.

3.2 Workload identity

A workload should receive an identity because it is a particular workload—not because it happens to run on a trusted subnet.

Use short-lived, automatically rotated credentials wherever supported. In Kubernetes, prefer the platform's workload identity integration with the cloud provider or a standards-based workload identity system over static access keys stored in environment variables. For cross-platform identity, technologies such as SPIFFE/SPIRE can provide workload identities and verifiable credentials, but introduce operational components that must themselves be secured and monitored.

A useful identity record should answer:

  • Which service is this?
  • Which environment and cluster does it belong to?
  • Which team owns it?
  • Which audience may accept its token?
  • What resources and actions does it need?
  • When does its credential expire, and how is it revoked?
// EXAMPLE WORKLOAD IDENTITY (ILLUSTRATIVE)
spiffe://prod.example.internal/ns/payments/sa/settlement-worker

This identifier is illustrative. Choose a naming scheme that is stable, unique, and governed.

3.3 Avoid identity confusion across clouds

Do not assume a role name has the same meaning in every cloud. Map provider-specific principals to a common service inventory, while preserving the original provider identity in audit events.

A practical access decision can be modelled as:

// ACCESS DECISION MODEL
ALLOW=authenticated_identity∧approved_action∧resource_scope∧valid_context∧policy_version

If any required predicate is false, access is denied. The exact policy may include more conditions, but the logic should remain explainable and testable.

3.4 Make credentials short-lived by default

Long-lived secrets turn a temporary foothold into a durable access path. Prefer:

Repository-stored cloud keys
Federated CI/CD authentication
Static cloud credentials in pods
Workload identity
Permanent shared SSH keys
Short-lived SSH certificates or a managed access broker
Credentials copied into configuration files
Managed database authentication or frequently rotated credentials
Secrets scattered across hosts
Central secret storage with audited retrieval and automatic rotation where supported

Rotation alone is not enough if the old credential remains valid indefinitely or if the replacement is copied into multiple unmanaged locations.

04 • KUBERNETES

Secure the workload lifecycle, not just the cluster perimeter

Kubernetes has several distinct trust boundaries: the API server, control-plane components, nodes, namespaces, pods, service accounts, admission controls, and the cloud APIs reachable by workloads. A zero-trust design applies a control at each relevant boundary.

Kubernetes security guidance highlights control-plane protection, secrets, workload isolation, network policies, admission control, and audit logging. Its security checklist also recommends default-deny network policies, avoiding public exposure of the Kubernetes API, restricting metadata access, and limiting potentially risky service exposure. Kubernetes security concepts · Kubernetes security checklist

4.1 Lock down the Kubernetes API

  • Keep the API server private where practical; if public access is necessary, restrict source ranges and require strong identity controls.
  • Use identity federation and least-privilege RBAC.
  • Separate human, automation, and workload permissions.
  • Avoid wildcard verbs and resources unless there is a documented, reviewed reason.
  • Audit privileged operations and changes to RBAC, admission policy, secrets, and network policies.
  • Review service accounts that can create pods, use exec, mount secrets, or modify workloads. These permissions can become privilege-escalation paths.

A role that can create a pod in a namespace may be able to mount a secret or use a service account in ways that grant more access than the role's name suggests. Test effective permissions, not only the written role.

4.2 Enforce safe pod defaults

Use Pod Security Standards and admission policy to prevent risky configurations from reaching production. At minimum, evaluate:

  • Non-root execution.
  • Read-only root filesystems where the application supports them.
  • Dropping Linux capabilities and avoiding privileged containers.
  • Restricting host networking, host PID/IPC, hostPath mounts, and privilege escalation.
  • Resource requests and limits.
  • Approved image registries and immutable image digests.
  • Provenance, vulnerability scanning, and signed-artifact verification appropriate to your supply-chain risk.

Illustrative Kubernetes security context:

apiVersion: v1
kind: Pod
metadata:
  name: example-api
  namespace: payments
spec:
  automountServiceAccountToken: false
  securityContext:
    runAsNonRoot: true
    seccompProfile:
      type: RuntimeDefault
  containers:
    - name: api
      image: registry.example.com/payments/api@sha256:REPLACE_WITH_APPROVED_DIGEST
      securityContext:
        allowPrivilegeEscalation: false
        readOnlyRootFilesystem: true
        capabilities:
          drop: ["ALL"]

This is an illustrative baseline, not a drop-in manifest for every application. Some workloads need writable temporary volumes, a specific user ID, or a service-account token. Add those capabilities explicitly and only when required.

4.3 Default-deny networking, then allow required flows

Start with a deny-by-default posture for pod ingress and egress, then document the flows each workload requires. A default-deny policy has no effect unless the installed CNI implementation enforces Kubernetes NetworkPolicy.

Illustrative ingress baseline:

apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: default-deny-ingress
  namespace: payments
spec:
  podSelector: {}
  policyTypes:
    - Ingress

This blocks ingress to selected pods in the namespace, subject to CNI support. It does not by itself deny egress. Create and test a separate egress policy, then add narrow allowances for DNS, approved dependencies, and required external endpoints. Do not blindly deploy deny-all rules to production without mapping health checks, DNS, telemetry, identity, and application dependencies.

Network policy is an important containment layer, but it is not cryptographic service identity. For sensitive east-west traffic, combine segmentation with mTLS and authorization at the service layer.

4.4 Separate Kubernetes identity from cloud permissions

A pod's Kubernetes service account and its cloud identity are related but not interchangeable. Configure workload identity so each service obtains only the cloud permissions it needs. Avoid giving every pod the node's broad cloud role.

Restrict access to cloud metadata endpoints from pods where applicable. A compromised workload should not be able to obtain credentials for the node or unrelated workloads.

4.5 Use admission policy as a preventive gate

Admission controls can reject workloads that violate standards before they run. Policies might prohibit:

  • :latest image tags in production.
  • Unapproved registries or images without a digest.
  • Privileged containers and host namespace access.
  • Missing ownership labels.
  • Excessive Linux capabilities.
  • HostPath mounts outside an approved allowlist.

Use built-in ValidatingAdmissionPolicy where suitable or a policy engine such as Gatekeeper or Kyverno. Start in audit/warn mode, review real exceptions, then enforce gradually. Protect policy changes with code review and restricted permissions.

4.6 Add runtime detection and a response path

Preventive controls cannot catch every exploit. Monitor for unexpected process execution, shell activity in production containers, unusual outbound destinations, privilege changes, access to secrets, and anomalous API calls. Tie detections to a response runbook that can isolate a workload, revoke its identity, block egress, and preserve evidence.

Kubernetes design test: if one pod is compromised, can it read another team's secrets, reach arbitrary internet endpoints, obtain node credentials, or impersonate a different service? If the answer is yes, document why and reduce the reachable surface.
05 • LINUX HOSTS

Assume the host can become a pivot point

Linux servers often sit between cloud-native and legacy systems. A secure cluster cannot compensate for a host that contains reusable credentials, permits unrestricted privilege escalation, or can initiate arbitrary connections to internal services.

5.1 Human access and privilege

  • Use individual accounts and centralized identity where practical.
  • Prefer SSH certificates or a controlled access broker over permanent shared keys.
  • Require MFA at the access layer where supported.
  • Disable direct root SSH login; use audited privilege elevation.
  • Limit sudo to explicit commands or roles and review changes regularly.
  • Remove stale accounts, authorized keys, and unused services.
  • Record privileged sessions for high-risk environments where lawful and appropriate.

Do not treat a bastion host as the whole solution. A bastion can control the entry point, but host authorization, credential lifecycle, and network restrictions still matter.

5.2 Harden the operating system

Use a supported distribution and a documented baseline. Common measures include:

  • Timely security updates and a defined patch service-level objective.
  • Minimal installed packages and disabled unused listeners.
  • Host firewall rules with explicit ingress and egress expectations.
  • Mandatory access controls such as SELinux or AppArmor in enforcing mode where feasible.
  • auditd or equivalent audit collection for security-relevant events.
  • File integrity monitoring for sensitive configuration and executable paths.
  • Disk encryption and secure boot where the platform and threat model support them.
  • Time synchronization and centralized logs.

Hardening is not “apply every kernel parameter from a random checklist.” Test changes against the actual application and keep a rollback plan.

5.3 Constrain host-to-service movement

Model each Linux host as a distinct principal. A reporting server should not be allowed to connect to every database and administrative endpoint simply because it resides on a private network.

Combine:

  • Host firewall or cloud security-group rules.
  • Egress allowlists for required services.
  • Separate service accounts and per-application secrets.
  • Short-lived credentials and managed secret retrieval.
  • Restricted metadata access.
  • Network and identity logs that link a connection to the originating host or workload.

5.4 Reduce credential exposure

Secrets should not be placed in shell history, command-line arguments, world-readable files, or broadly readable environment dumps. Restrict file permissions, use managed secret stores, and avoid printing tokens in logs. For services, prefer a credential provider or identity-based authentication over manually copying credentials to disk.

5.5 Verify the baseline continuously

Use configuration management and compliance scanning to detect drift. A one-time hardening exercise decays as packages, users, firewall rules, and services change. Alert on meaningful drift, but separate a high-risk security deviation from harmless operational differences to avoid alert fatigue.

06 • API GATEWAYS

The front door is not the whole authorization system

An API gateway is a valuable enforcement point, but it cannot replace authorization inside the application. The gateway can validate a token, apply quotas, inspect request metadata, and route traffic. The application usually has the business context needed to decide whether a user may view a particular record or execute a particular action.

The OWASP API Security Top 10 (2023) includes broken object-level authorization, broken authentication, broken object-property-level authorization, unrestricted resource consumption, broken function-level authorization, SSRF, security misconfiguration, improper inventory management, and unsafe consumption of APIs. These risks are highly relevant to zero-trust API design. OWASP API Security Top 10

6.1 Gateway responsibilities

At the edge, implement:

  • TLS with secure configuration; use mTLS for trusted machine-to-machine connections where appropriate.
  • JWT validation of signature, issuer, audience, expiry, and permitted algorithms.
  • OAuth scopes or equivalent coarse-grained route permissions.
  • Rate limits, request-size limits, timeouts, and concurrency controls.
  • Schema validation and content-type enforcement where suitable.
  • Safe CORS policy for browser-based clients.
  • Request correlation IDs and structured security logs.
  • Versioned API inventory and retirement of undocumented endpoints.
  • SSRF protections and strict outbound destination controls for features that fetch user-supplied URLs.

Do not merely decode a JWT and trust its claims. Validate them cryptographically and against the intended issuer, audience, expiry, and policy.

6.2 Application responsibilities

Enforce business authorization close to the data:

  • Verify object ownership or tenant membership for every object access.
  • Check action permissions independently of route visibility.
  • Limit writable properties to those the caller may change.
  • Avoid trusting tenant IDs or user IDs supplied in request bodies without checking them against the authenticated principal.
  • Apply authorization to background jobs and asynchronous consumers too.
  • Use parameterized database access and safe deserialization.
  • Protect sensitive workflows against automation and abuse, not just malformed input.
Example: a token with invoices:read may permit reading invoices generally, but it should not automatically grant access to every tenant's invoices. The service must confirm that the requested invoice belongs to the caller's authorized tenant.

6.3 Service-to-service authorization

For internal APIs, use a verifiable workload identity and mTLS where appropriate, then authorize the specific caller-to-service relationship. A valid certificate means “this is a workload with this identity,” not “this workload may call every endpoint.”

Keep policy expressive enough to distinguish:

  • orders-api may call inventory-api to reserve stock.
  • billing-worker may read payment status but cannot modify customer identity.
  • reporting-service may read aggregated records but cannot export raw payment credentials.

6.4 Protect outbound requests

SSRF is particularly important in multi-cloud environments because an application may be able to reach metadata services, internal control planes, or private endpoints. If a feature fetches a URL:

  1. Prefer an explicit hostname allowlist over accepting arbitrary destinations.
  2. Resolve and validate addresses, including IPv4 and IPv6 cases.
  3. Block loopback, link-local, private, and metadata destinations unless explicitly required.
  4. Re-check destinations after redirects and DNS changes.
  5. Apply egress firewall or proxy enforcement outside the application too.
  6. Set connection and response limits, and log blocked attempts.

Application checks can be bypassed or become stale; network-level egress controls provide a second barrier.

07 • MULTI-CLOUD NETWORKING

Connect environments without creating a flat trust zone

Private connectivity between cloud providers is not automatically secure. Peering, VPNs, transit gateways, and private links improve connectivity, but broad routing can quietly create a shared internal network.

Build connectivity around explicit service dependencies:

  • Use separate network segments for production, non-production, management, and data services.
  • Avoid transitive trust: access to Cloud A should not imply access to Cloud B.
  • Restrict east-west flows using cloud firewall rules, security groups, network ACLs, and Kubernetes policies.
  • Apply egress controls to workloads that do not need arbitrary outbound access.
  • Use DNS and certificate policies deliberately; avoid relying on mutable hostnames as identity.
  • Keep control-plane endpoints private or tightly restricted.
  • Treat cloud metadata endpoints and management APIs as high-value targets.
  • Review routes, firewall rules, and private endpoints as code.

A useful design exercise is to draw the intended traffic graph. Each edge should have an owner, a business reason, an identity expectation, and an expiration/review date if temporary.

Policy example: make the path explicit

Source identityDestinationActionEnforcement point
web-frontendorders-apiHTTPS request to approved routesGateway + service policy
orders-apiinventory-apiReserve/release stockmTLS + service authorization
billing-workerPayment providerCall approved provider endpointsEgress proxy + scoped credential
reporting-hostAnalytics databaseRead approved views onlyHost firewall + database role
CI deploy identityKubernetes APIDeploy approved workload manifestsFederated identity + RBAC + admission

The table is intentionally identity-centric. IP allowlists remain useful, but should be treated as one signal or enforcement layer—not the complete policy.

08 • SUPPLY CHAIN & IaC

Secrets, software supply chain, and infrastructure-as-code

Zero trust is weakened when an approved identity can deploy an unverified artifact or retrieve secrets unrelated to its task.

8.1 Secure the build-to-runtime chain

A practical chain of controls includes:

01
Protect source repositories and require review for sensitive changes.
02
Use isolated CI runners and short-lived federation to obtain deployment credentials.
03
Scan dependencies, containers, and infrastructure changes.
04
Generate build provenance and sign artifacts where your tooling supports it.
05
Verify image signatures and approved registries at deployment time.
06
Separate build permissions from production deployment permissions.
07
Require approval for changes to IAM, network boundaries, admission policies, and secrets access.
08
Record the deployed artifact digest, source revision, builder identity, and deployment actor.

A signed artifact is not automatically safe; signing establishes provenance and integrity, not the absence of vulnerabilities. Pair it with review, scanning, and runtime monitoring.

8.2 Make infrastructure policy reviewable

Keep cloud IAM, Kubernetes manifests, network rules, gateway configuration, and host baselines in version control. Use policy-as-code tests to catch:

  • Wildcard permissions.
  • Publicly exposed management endpoints.
  • Missing logs or encryption settings.
  • Overly broad egress rules.
  • Privileged workloads.
  • Unapproved image sources.
  • Long-lived credentials or secrets committed to repositories.

Protect the policy pipeline itself. A compromised pipeline that can modify its own checks and deploy directly to production is a high-impact control-plane risk.

09 • OBSERVABILITY

Prove that the policy worked

A zero-trust design should generate evidence that lets responders answer:

  • Which human or workload initiated the request?
  • What resource and action were requested?
  • Which policy decision allowed or denied it?
  • Which identity issuer and credential were involved?
  • What was the source workload, cluster, host, or cloud account?
  • Was the request unusual compared with the service's normal behavior?
  • Can the relevant credential or access path be revoked quickly?

Use structured logs and consistent fields across gateways, applications, service meshes, Kubernetes audit logs, Linux audit events, cloud control planes, and identity systems. Synchronize clocks and propagate correlation IDs across service boundaries. Avoid logging raw access tokens, passwords, private keys, or sensitive payloads.

Signals worth measuring

SignalWhy it mattersExample operational target
Workloads using short-lived identityShows reduction of static credential dependenceIncrease coverage each release; set a risk-based target
Critical services with explicit ingress/egress policyMeasures network exposure reductionNo undocumented flows in production
Privileged human access through approved pathMeasures administrative control coverageAll production admin access attributable and audited
Authorization denials with useful contextMeasures policy visibilityEvery denial includes principal, action, resource, and reason code
Time to revoke a compromised workload identityMeasures containment abilityTest against a documented incident objective
Policy drift detection timeMeasures control-plane visibilityAlert within an agreed time window for high-risk drift

These are proposed engineering metrics, not industry benchmark values. Establish a baseline before setting targets.

10 • INTERACTIVE CHARTS

An interactive way to explore defense-in-depth

The following charts are illustrative planning models, not empirical security measurements. They are designed to help a team discuss priorities and trade-offs. Replace the sample values with data from your own environment before using them for a decision.

Interactive chart A — illustrative control coverage

The chart below compares a hypothetical baseline with a target state. Use it to identify the weakest layers, not to calculate a universal “security score.” Hover or tap a bar for values.

Zero-trust control coverage — sample values

Sample values · current vs. target coverage per control layer

Illustrative
Sample data. Workload identity 45 to 90 percent, Kubernetes policy 55 to 90, Linux hardening 60 to 90, API authorization 50 to 95, egress control 35 to 85, audit coverage 65 to 95.

Interpretation: the sample makes egress control and workload identity visible as potential gaps. In a real assessment, define each denominator precisely—for example, “production workloads with a distinct short-lived identity / all production workloads”—and avoid combining unlike controls into a single score.

Interactive chart B — illustrative containment effect

This chart models a hypothetical incident where an attacker compromises one workload. The numbers are invented solely to illustrate how independent controls can reduce the reachable surface. They are not measured breach probabilities or a prediction of risk reduction.

Illustrative blast-radius reduction

Sample values · sensitive services reachable from one compromised workload

Illustrative
Sample data. Reachable sensitive services: flat network 40, network segmentation 24, segmentation plus workload identity 10, identity plus egress plus app authorization 3.

Interpretation: the goal is not to promise a particular percentage reduction. The engineering goal is to make each additional control remove a different path: segmentation limits reachability, workload identity limits impersonation, egress controls restrict destinations, and application authorization limits actions even when a connection succeeds.

Interactive chart C — implementation priority

This final chart uses a hypothetical prioritization score from 1 to 5. Score each item in your own backlog using business impact, exposure, exploitability, and implementation effort. Do not treat the sample scores as a universal ranking.

Example implementation priorities

Sample values · priority score from 1 to 5

Illustrative
Sample data. Remove static cloud keys 5, default-deny network policy 4, fix object-level API authorization 5, harden Linux admin access 4, improve audit correlation 3.
11 • ROADMAP

A 90-day implementation roadmap

A practical rollout reduces risk without breaking production through a sudden, global deny policy.

Days 1–15
Discover and establish ownership
  • Inventory cloud accounts, Kubernetes clusters, Linux hosts, gateways, service identities, and external dependencies.
  • Map critical data flows and trust relationships.
  • Identify public management endpoints, wildcard roles, static keys, and broad egress.
  • Establish service owners and data classifications.
  • Capture a baseline for privileged access, credential type, policy coverage, and audit quality.
Deliverable: A prioritized risk register and an identity/traffic map.
Days 16–30
Fix high-impact identity gaps
  • Remove unused credentials and rotate exposed secrets.
  • Replace static CI/CD cloud keys with federated credentials where supported.
  • Reduce high-risk human permissions and improve privileged-access audit.
  • Assign owners to workload identities.
  • Fix critical API authorization flaws, especially tenant and object ownership checks.
Deliverable: A measurable reduction in durable credentials and unauthorized access paths.
Days 31–60
Enforce workload and network boundaries
  • Introduce Kubernetes admission policy in audit mode, then enforce after testing.
  • Apply default-deny network policy in selected namespaces and add documented allowances.
  • Separate cloud roles by workload and restrict metadata access.
  • Harden Linux administration, host firewall rules, and baseline configuration.
  • Apply gateway token validation, rate limits, request-size limits, and structured logs.
  • Introduce service-to-service mTLS and authorization for high-value paths where operationally appropriate.
Deliverable: A pilot environment with tested, explicit identity and traffic policies.
Days 61–90
Validate, measure, and expand
  • Test credential revocation, policy outage behavior, and workload isolation.
  • Run controlled attack-path exercises and verify detections.
  • Measure false positives, latency impact, and operational toil.
  • Expand enforcement service by service using canary deployments.
  • Add policy tests to CI and assign a review owner to each exception.
  • Publish runbooks for compromised workload, leaked secret, malicious deployment, and identity-provider outage.
Deliverable: A repeatable rollout process with evidence, rollback paths, and accountable owners.

Rollout guardrails

  • Prefer observe → warn → enforce when the control supports it.
  • Do not create a global deny policy without dependency mapping and a recovery path.
  • Version policy and review exceptions with an owner and expiry.
  • Keep emergency access separate, tested, and monitored.
  • Define what should fail closed and what may temporarily use a bounded cached decision.
  • Measure application availability as well as security coverage.
12 • FAILURE TESTING

Test the architecture with failure scenarios

A zero-trust architecture is only as good as its behavior under stress. Run tabletop exercises and controlled technical tests for scenarios such as:

1
A pod is compromised.
Can it retrieve node credentials, read unrelated secrets, or connect to arbitrary destinations?
2
A service token leaks.
How quickly can it be revoked, and does its narrow scope limit impact?
3
The policy control plane is unreachable.
Which existing operations continue, for how long, and under what cached policy?
4
A certificate expires.
Is renewal automatic? Does the failure create a secure denial or a risky bypass?
5
A gateway is misconfigured.
Can the application still enforce authentication and object-level authorization?
6
A CI runner is compromised.
Can it alter IAM, disable admission checks, or deploy an unreviewed artifact?
7
An employee leaves.
Are workforce sessions, SSH access, cloud roles, and code-hosting access removed promptly?
8
A new cloud account is created.
Are logging, baseline policies, identity federation, and network restrictions applied automatically?

For each scenario, capture the expected behavior, actual behavior, evidence source, detection time, containment time, and corrective action. Repeat the test after meaningful architectural changes.

13 • COMMON MISTAKES

Common implementation mistakes

Mistake 1
Buying a service mesh before defining identity

A mesh can deliver mTLS and policy enforcement, but it cannot decide the correct business permissions without a usable identity and authorization model. Define service identities and trust relationships first.

Mistake 2
Treating private IP space as authorization

Private networks reduce exposure; they do not prove who is calling or what that caller may do. Keep network segmentation and identity-based authorization complementary.

Mistake 3
Validating tokens only at the gateway

A route can be correctly authenticated while the application exposes another tenant's records. Enforce object-, property-, and action-level authorization in the service that understands the data.

Mistake 4
Allowing a shared node role for all pods

This turns a single workload compromise into a potential cloud-wide credential problem. Use distinct workload identities and narrow roles.

Mistake 5
Deploying deny-all controls without dependency discovery

DNS, telemetry, certificate renewal, identity endpoints, health checks, and external APIs can be legitimate dependencies. Discover and document flows, roll out incrementally, and maintain a tested recovery path.

Mistake 6
Logging too much—or too little

Raw tokens and sensitive payloads create a new security problem. Logs that omit identity, resource, action, decision, and correlation ID are often insufficient for incident response. Define a safe, consistent event schema.

Mistake 7
Measuring tool deployment instead of risk reduction

“Mesh installed” and “gateway enabled” are activity metrics, not outcomes. Measure the proportion of workloads with scoped identities, the number of undocumented flows, the time to revoke credentials, and whether cross-tenant authorization tests pass.

14 • ENGINEERING CHECKLIST

A concise engineering checklist

Tick items off as you review your own environment. Progress is tracked in this page only; nothing is stored or sent.

Checklist progress0 / 28
Identity and access
Kubernetes
Linux
API and service communication
Governance and response
CONCLUSION

Make every trust decision explicit

Implementing zero trust in multi-cloud infrastructure is less about adding a single security layer and more about eliminating invisible assumptions between existing layers.

The practical sequence is straightforward: establish trustworthy human and workload identities; enforce least privilege in cloud IAM and Kubernetes RBAC; restrict network reachability; harden Linux hosts; validate API requests at the gateway; enforce business authorization inside applications; protect the software supply chain; and make each decision observable and revocable.

  • A pod should not inherit a node's cloud permissions.
  • A private subnet should not grant universal service access.
  • A valid JWT should not grant access to every tenant's data.
  • A deployment runner should not be able to quietly disable the controls that govern it.

The architecture succeeds when a compromised component does not automatically inherit the trust of its neighbors. Start with the highest-impact paths, measure the baseline, pilot policy in a controlled environment, and expand only after testing both enforcement and recovery.

The goal is not to eliminate trust; it is to make trust specific, short-lived where possible, least-privileged, continuously evaluated, and supported by evidence.
SOURCES & REFERENCES

Further reading and authoritative references

1. NIST SP 800-207 — Zero Trust ArchitectureNIST

Cited in the introduction.

csrc.nist.gov/pubs/sp/800/207/final →
2. NIST SP 800-207A — Zero Trust for Cloud-Native Applications in Multi-Cloud EnvironmentsNIST

Cited in the introduction.

csrc.nist.gov/pubs/sp/800/207/a/final →
3. NIST SP 1800-35 — Implementing a Zero Trust Architecture (June 2025)NIST

Further reading.

pages.nist.gov/zero-trust-architecture/ →
4. Kubernetes Security ConceptsKubernetes

Cited in section 04.

kubernetes.io/docs/concepts/security/ →
5. Kubernetes Security ChecklistKubernetes

Cited in section 04.

kubernetes.io/docs/concepts/security/security-checklist/ →
6. Kubernetes PoliciesKubernetes

Further reading.

kubernetes.io/docs/concepts/policy/ →
7. OWASP API Security Top 10OWASP

Cited in section 06.

owasp.org/API-Security/ →
8. SPIFFE — Secure Production Identity Framework for EveryoneSPIFFE

Related to the workload identity discussion in section 03.

spiffe.io/ →

Editorial note: This article is intended as an engineering guide, not a compliance certification or a substitute for a threat model tailored to a specific environment. Validate examples against your Kubernetes distribution, CNI, cloud provider, Linux distribution, gateway, and operational constraints before production use.

Share this blog
Distribute to fellow engineers and technical researchers

Explore more blogs

Practical writing on system architecture, scalable AI engineering, full-stack development, and distributed cloud security.

PHP2SHELL · FROM MEMORY BUG TO SHELL PHP WORKER MEMORY in use freed (stale) attacker data 1 · MEMORY RUNS OUT 2 · CLEANUP SKIPPED 3 · STALE DATA REUSED 4 · ATTACKER GETS SHELL $ id uid=33(www-data) ← no password needed CVSS 9.2 · CRITICAL NO LOGIN NEEDED ~70% OF THE WEB
Cybersecurity
Nov 01, 2026
J
Jyotirmoy Saha
9 min

PHP2Shell: The Bug That Put 70% of the Web at Risk

PHP2Shell (CVE-2026-109618 and CVE-2026-109619) lets attackers run code on PHP web servers without logging in. Plain-English timeline, animated diagrams, real exposure data, and a step-by-step patch plan.

Stay Updated

Subscribe for

Newsletter

Enjoyed this deep dive? Subscribe to get future technical breakdowns and engineering insights delivered directly to your inbox.

Zero spam. Strictly engineering & technology updates.
Community Score

Ratings & Reviews

5.0
0 verified reviews
Please log in to submit a rating and join the technical discussion.
Peer Review

Discussion

0 Comments
No comments yet. Be the first to start the discussion!