Zero Trust and Cloud Infrastructure Security

Consider an illustrative incident: an attacker gains code execution on a build runner through a compromised build dependency. The question here is what the runner can reach and do after that first compromise.

The runner opened a connection to the analytics database, which accepted it because the database allows connections from the subnet the runners live in. It read two object storage buckets, whose policies permit access through the private network path. It called the cluster interface with its own workload credential, which was allowed to create pods in three namespaces, and created one that mounted a secret it was not built for. Storage was encrypted at rest with keys the company manages. Every connection used TLS. The application decrypted what it needed, as designed, because decrypting is what it does.

The paths fail for different reasons. In this scenario, the database and bucket rules treat network location as sufficient permission to read. The cluster authenticates a workload credential but grants it more authority than its job requires, including an indirect route to a Secret through Pod creation. Encryption and TLS do not repair either authorization decision. A review must distinguish missing identity checks from excessive permissions granted to an identified caller.

Zero trust addresses access decisions in an environment where the network may already be compromised. NIST SP 800-207 rejects implicit trust based solely on location or ownership. The practical work is to identify the resource, caller and requested action, apply least privilege, and decide what evidence must be refreshed before access continues.

What giving up location trust actually costs

NIST SP 800-207 treats access to individual resources as a per-session grant, with continuing assessment and possible reauthentication or reauthorization according to policy. A grant for one resource must not automatically authorize another. This is compatible with enforcing permissions on each request; it does not require a new login or a remote policy call for every operation.

Adoption changes both the access paths and the services that support them. Those dependencies need an availability and revocation design.

Internal workloads need identifiable subjects, and every protected path needs an enforcement component, including exports, support tools and replication jobs. Policy can be evaluated locally from distributed rules and validated tokens, or through a remote decision service. Define how policy, device posture and revocation information reach each evaluator, how stale they may be, and what happens when refresh fails. A remote check adds a synchronous dependency; local evaluation shifts part of that cost to distribution and bounded staleness. These relationships, rather than a product inventory, form the zero trust architecture.

The intended result is a smaller set of actions available after compromise. That depends on the credentials a machine can use or obtain, the permissions they carry, and the checks along each path. Identifying the build runner would not have contained the opening incident by itself: its authenticated cluster privileges also need to be narrowed.

Verifying a request means something specific

For a protected operation, establish an authenticated subject, the requested action and resource, and the context required by the applicable policy. The freshness requirement belongs to that policy. A locally checked credential can establish identity while a separate permission decision restricts what that identity may do.

A decision point evaluates policy; a policy enforcement point permits or blocks the operation. These are logical roles, not a requirement for separate servers. One shared gateway can enforce several paths if requests cannot bypass it and it sees the information the rules require. Direct database access or an administrative route may need another point. Coverage and visibility determine the placement.

The Kubernetes API illustrates why the operation matters. Its documented access path uses TLS, authentication and authorization. Admission then applies to supported create, modify, delete and connect operations; it can reject a request authorization allowed. Ordinary reads such as get, list and watch bypass admission, so admission cannot be the guard for reading Secrets. Check the authorization path for those reads and the separate permissions that can expose Secrets indirectly.

Trace the corresponding checks for the warehouse, object store, message broker and operational database. Their mechanisms need not match Kubernetes stage for stage. A policy object alone proves little about enforcement: Kubernetes NetworkPolicy requires a network implementation that supports it. Inventory alternate routes and verify allowed and denied operations at the component expected to enforce each rule.

Network restrictions and authorization context

Network controls remain useful policy constraints. Segmentation limits reachability, egress restrictions reduce routes for exfiltration and unwanted dependencies, and isolation can contain accidental exposure. Network location and managed-device posture may also be authorization inputs alongside identity and action. The distinction is that location alone should not supply implicit permission to a protected resource.

Kubernetes Pods are non-isolated for a direction until a policy selects them for that direction. NetworkPolicy combines allowed traffic additively: adding a separate rule cannot deny traffic another policy allows. To narrow access, remove or restrict the relevant allows and inspect the combined policies. An ipBlock can exclude ranges through except, but that exclusion does not override another allow. Default-deny policies can select ingress and egress separately, with intended allows added explicitly. The network policy entry explains these mechanics; enterprise isolation, policy, and upgrades covers the surrounding cluster design.

Egress is the half that gets skipped, and it is the half that would have made the opening story shorter. A build runner that can reach only its package mirror, its artifact store, and the cluster interface is a poor position from which to explore. Restricting it is unpopular because it breaks things visibly and because the list of legitimate destinations is genuinely hard to enumerate, which is an argument for starting with a recorded list in one environment rather than for skipping it.

One caution about private connectivity, since it is the control most often described as though it settled the question. A private endpoint changes who can reach a service and over which path. It does not decide whether the caller may perform the action, and the storage service behind it still authorizes on its own terms. The distinction matters because the two are frequently reported as one control: reaching the bucket privately and being allowed to read the object are different claims. How the connectivity itself is designed is the subject of cloud networking and connectivity; workload isolation and tenant isolation cover what separation between running things is supposed to guarantee.

Encryption moves the question rather than answering it

Two uses of encryption get conflated in security reviews, and each asserts something narrow.

In transit, a mutually authenticated channel asserts which peer you are talking to and that nothing between you read or altered the bytes. It asserts nothing about whether that peer should be making this request, which is why a mesh that authenticates every hop still needs an authorization decision at each service. At rest, encryption asserts that the stored bytes are useless without a key: a copied disk, an exported snapshot, a backup in the wrong account. It asserts nothing about a compromised process that legitimately holds the key, which is precisely the situation in the opening story.

Key custody adds an authorization boundary around cryptographic operations. In envelope encryption, a data encryption key (DEK) protects the payload and a key encryption key (KEK) wraps the DEK. Google Cloud documents an arrangement in which the KEK stays in Cloud KMS and the application uses an unwrapped DEK locally. Moving existing wrapped DEKs to a new KEK can avoid rewriting a large payload, but creating a new KEK version does not perform that migration. Cloud KMS rotation also leaves previous versions available until they are separately disabled or destroyed.

Review key access together with ciphertext access and application permissions. A service principal may unwrap keys for many end users, so its KMS permissions are not a list of everyone who can query the data. Separate DEKs support finer isolation, but independent tenant revocation also needs an enforceable access boundary, such as tenant-specific KEKs or a mediator that validates the tenant before unwrapping. Include wrapped-key backups, old versions and plaintext-key copies in the design. Rewrapping an exposed DEK does not make that key secret again; protecting data still under your control may require a new DEK and payload re-encryption. Already disclosed plaintext cannot be recalled.

Keys and secrets: prefer a call you can mediate to a value you must copy

A mediated operation can authorize, scope, rate-limit and record each call. Its output determines what revocation can accomplish. A signing service can retain its private key, while an unwrap service returns a DEK and a token issuer returns a credential. Denying future calls stops further issuance or unwrapping; it does not invalidate every key, token or session already obtained. A secret value can also be copied by a compromised consumer, and the issuing store will not necessarily observe its later use at another system.

So the design preference follows from the threat rather than from tooling fashion: where a capability can be exposed as a call, expose it as a call. Where a value must be held, hold it as briefly as possible and make its issuance conditional on a verified workload identity, which is what runtime-issued credentials such as those described by SPIFFE provide. The operational side of storing, distributing, and rotating what remains belongs to secrets management, and the reason long-lived values keep accumulating is the time dimension of permission discussed in standing privilege.

Separate key administration from permission to decrypt data where the platform supports it, and inspect whether administrators can grant themselves those permissions. Protect administration logs against alteration by the actors they record. If duties cannot be separated, these logs provide detection and investigation evidence, not equivalent prevention; record the remaining authority and the response to its misuse.

Administrative paths can change the controls

Most of the attention in this area goes to data requests, and the highest-authority paths in a cloud estate are administrative. A deployment pipeline can usually change what runs. An infrastructure definition can change what the network permits. The cluster interface can change the policies that verify requests, and control plane credentials can create the identities that everything else trusts. Verifying every data request while leaving these paths on shared, long-lived credentials inverts the order of importance.

Administrative review follows the authority to change the system and the evidence that records its use.

  • If the pipeline were compromised, what would it be able to do? Not what it normally does โ€” what its credential permits. In the opening story the answer was three namespaces and a secret.
  • Who can change the policy? The permission to modify authorization rules sits above every rule it can modify, which is why permission models are audited starting from the subjects that can edit them, a point developed in role-based and attribute-based access control.
  • Are administrative requests verified like the others? A console session, an emergency identity, and a vendor support path each need a subject, a decision, and a record. Emergency access can be wide if its use is always an anomaly that someone examines.
  • Where do administrative actions get recorded, and who can alter that record? If the subjects recorded in an audit log can alter it, that access limits the confidence and scope of conclusions drawn from it. Protect an independent copy and compare other records before relying on the trail.

The identity and permission mechanics behind these paths, including propagation of revocation, are worked through in The Account Was Disabled on Friday.

Judging whether any of it works

Assume a build runner, a shared-namespace Pod or a corporate laptop is compromised. Inventory its reachable destinations, the credentials it holds or can obtain, and the protected actions each route permits. Distinguish a successful network connection from a successful data operation, then compare the allowed action with intended policy. Deliberately public endpoints and legitimate workload grants are not automatically findings; excessive grants and location-only access to protected data are.

Track the evidence needed to assess those paths and the limits of its coverage.

  • Internal services accepting anonymous operations, with each operation classified as intentionally public or requiring protection. A count alone does not establish a policy violation.
  • Share of paths to sensitive data with a named enforcement point, with the unnamed ones listed. The list is the work plan.
  • Egress posture per environment: default allow or default deny, and for the exceptions, who approved the destination.
  • Key-use permissions, ciphertext access and application permissions, with service-to-user delegation mapped. Correlate KMS calls with application or data-engine access records: one cached DEK may support many reads without another unwrap call. Confirm audit collection settings, identifiers and retention.
  • What each administrative identity can do, and how long its credentials live.
  • The maximum intended staleness of policy and revocation inputs, and observed denial after a change. A local check may run on every request while using older inputs; test refresh, cache expiry and existing-session behavior separately.

A VPN, mesh authentication or encryption at rest can contribute useful protection without proving that all protected operations are correctly authorized. Identify which paths each mechanism covers and what it actually verifies. The counterfactual above tests their combination rather than treating a product or enabled setting as evidence of complete coverage.

Where the assumptions behind each control get recorded is the threat model, and this is the form in which it earns its keep: not a list of controls, but a statement of what each one assumes so that a change of premise is visible when it happens.

Assessing the protected resource

For a named resource, connect each access path to its enforcing component and policy inputs. Explain how network restrictions constrain reachability, how key operations and data reads are authorized and observed, and how administrative changes can alter those boundaries. State the refresh and revocation limits instead of implying that every check sees an instantaneous global state.

In the opening scenario, some data access relied on location, while the cluster accepted an authenticated but excessively privileged workload. Fixing the former needs explicit resource authorization; fixing the latter needs narrower permissions and control of indirect access paths. Neither follows from enabling TLS or storage encryption. The inventory is useful when it exposes the particular decision to change and the evidence that the change is enforced.

References


Discover more from Insightful Data Lab

Subscribe to get the latest posts sent to your email.

Similar Posts

Questions, corrections, or additional insights?

This site uses Akismet to reduce spam. Learn how your comment data is processed.