Prepare and test your skills
Prepare and test your skills
Private ingress, egress, and managed service encapsulation keeps N-tier traffic on private paths so frontend, processing, and data tiers communicate without direct internet exposure. In Google Cloud, Private Google Access (opens in a new tab) carries VM-to-Google-API traffic privately, private service access (opens in a new tab) carries VPC-to-managed-service traffic privately, internal load balancers (opens in a new tab) carry tier-to-tier ingress privately, and VPC Service Controls (opens in a new tab) enforces which identities and destinations can cross the perimeter. Together these controls encapsulate backend data and processing tiers behind private addresses and policy boundaries.
Private Google Access is a subnet-level setting that lets VMs and processing tiers without external IP addresses reach Google Cloud APIs such as Cloud Storage over Google's internal network. Traffic flows from the private instance in the subnet to the Google API endpoint without traversing the internet, which reduces outbound data transfer cost and latency. Private Google Access is not enabled by default and must be explicitly enabled on each subnet. Choose Private Google Access when backend tiers must consume Google services while remaining without external IPs.
Private service access is a private connectivity model that creates a private network path between a Virtual Private Cloud (VPC) network and a service producer network that hosts managed services such as Cloud SQL or Memorystore. Traffic flows from workloads in the consumer VPC to database and caching instances in the producer network without traversing the public internet, so backend data tiers keep private addresses. This model avoids exposing workload connections to the internet and is distinct from public endpoint access to the same managed services. Choose private service access when an application tier must read or write managed data services while preserving network isolation for the data tier.
Internal load balancers provide private ingress between application tiers by terminating client connections inside the VPC and forwarding to backends in instance groups or zonal network endpoint groups (NEGs). All VM-to-VM traffic within a VPC network and between peered VPC networks is encrypted, and some proxy load balancers add automatic network-level encryption to backends that reside within Google Cloud VPC networks. Automatic network-level encryption applies only to instance groups and zonal NEGs with GCE_VM_IP_PORT endpoints and does not replace an auditable TLS session to the backend.
The internal proxy options differ by proxy type and backend protocol:
| Load balancer | Proxy to the backend | Backend service protocol options |
|---|---|---|
| Regional internal Application Load Balancer | Envoy proxy | HTTP, HTTPS, HTTP/2 |
| Cross-region internal Application Load Balancer | Envoy proxy | HTTP, HTTPS, HTTP/2 |
| Regional internal proxy Network Load Balancer | Envoy proxy | TCP |
| Cross-region internal proxy Network Load Balancer | Envoy proxy | TCP |
Choose HTTPS or HTTP/2 on the backend service when an auditable, encrypted connection is required from the internal Application Load Balancer to the backend instances, and the backend instances or endpoints must serve using the same protocol as the backend service. The load balancer supports the cipher suites in RFC 8446, section 9.1 for TLS 1.3, and the cipher suites associated with the COMPATIBLE SSL policy profile for TLS 1.2 and earlier. When the backend is outside Google Cloud on an internet NEG, communication might transit the public internet, so a secure protocol is required and the public CA-signed certificate must meet validation requirements.
Exam tip: Automatic network-level encryption to instance groups and zonal NEGs is not auditable; choose HTTPS, HTTP/2, or SSL on the backend service when auditable encryption in transit to the backends is required.
VPC Service Controls is a Layer 7 perimeter control that wraps in-scope projects in a service perimeter above the network layer. The perimeter governs VM-to-service paths, service-to-service paths, and VPC ingress and egress traffic with two directional controls: ingress control permits only authorized identities and clients into the perimeter, and egress control permits only authorized destinations for identities and clients within the perimeter. Because the perimeter sits above routing, it blocks data movement even when network routing would otherwise allow it, which mitigates data exfiltration from Google-managed services. Place sensitive backend data and processing projects inside the perimeter and define narrow ingress and egress rules so only required tiers and destinations can cross the boundary.
Multi-tier VPC subnetting and identity-based firewall enforcement places each application tier in its own isolated network segment and allows traffic only between adjacent tiers based on verified identity. A Virtual Private Cloud (VPC) (opens in a new tab) provides logical isolation of a section of Google Cloud, subnets group and isolate resources inside that VPC, and firewall and identity controls decide which tier can reach which tier. This design prevents unauthorized lateral movement, so a compromise in one tier cannot directly reach sensitive tiers. VPC Service Controls (opens in a new tab) adds Layer 7 perimeter control, and Cloud Armor (opens in a new tab) filters at the edge load balancer.
Decoupled N-tier topology places each application layer in a dedicated subnet or VPC so tiers can scale and operate independently while communicating only with neighbors. The common three-tier web pattern contains a web frontend and presentation tier, an application tier, and a data access or backend tier, where traffic flows from clients to the frontend, then from the frontend to the application tier, then from the application tier to the backend database layer, ideally through an API gateway. Putting layers into containers separates technical needs like scaling and enables phased migration on portable platforms such as Cloud Run or Google Kubernetes Engine (GKE) with managed databases like Cloud SQL for the backend. A project acts as the trust boundary and Identity and Access Management (IAM) enforcement point, so in-scope and out-of-scope workloads belong in different projects.
The resource hierarchy organizes controls from the top down: the Organization resource is the root node, Folders fall under the Organization and can contain projects and other folders, and projects hold the VPCs, subnets, and workloads. Grouping all in-scope projects inside a dedicated folder isolates them with folder-level IAM permissions and organization policies, such as disabling external IP allocation or restricting resource creation to specific locations. To be considered out of scope, a component must be properly isolated such that even if it were compromised, it would not impact the security of the isolated environment.
Identity-based firewall enforcement restricts east-west pathways so only explicitly authorized sources can reach the next tier, with all other flows denied by default. VPC firewall rules allow and block traffic between workloads in VPCs and between VPCs and other environments, while micro-segmentation extends the same deny-by-default principle to controls as granular as individual virtual machines or pods. Firewall rules organize workloads into policy groups with flexible membership criteria such as tag or name matching, so a rule can state that traffic flows from the frontend group to the application group and from the application group to the database group, but never directly from frontend to database. Management appliances sit outside those segments, so distributed firewall rules do not apply to them and VPC firewall rules must explicitly block outbound access to management ranges except from trusted hosts.
Defense in depth requires multiple layers above the network firewall. VPC Service Controls creates a service perimeter around in-scope projects at the project or VPC network level, governing VM-to-service, service-to-service, and VPC ingress and egress paths. Ingress control allows only authorized identities and clients into the perimeter, while egress control allows only authorized destinations for identities inside the perimeter. Organization policies provide global guardrails across the organization, folder, or project, including disabling Service Account creation or key creation where they are not needed.
Data encapsulation in N-tier architectures hides backend implementation behind controlled APIs and private, encrypted paths rather than exposing tier-to-tier ports directly. Apigee (opens in a new tab) and Apigee hybrid with end-to-end mutual Transport Layer Security (mTLS) expose applications through APIs using a controlled communication model that provides privacy, data integrity, and authentication in both directions. A shared VPC with Apigee in the same Organization resource keeps gateway and backend routing inside private boundaries. When the design requires exposing an application to the public internet, internet-facing delivery uses dedicated networking patterns with inspection at the edge rather than direct exposure of app or data subnets.
Private and encrypted connectivity preserves isolation between tiers and between cloud and hybrid backends:
For inspection between segments, network virtual appliances (NVAs) provide traffic inspection policies based on application security requirements. When a solution includes NVAs, high availability of the NVAs is required to avoid a single point of failure that could block all communication, following the vendor high-availability and redundancy guidance.
Edge filtering and inspection stops malicious traffic before it consumes resources or enters VPC networks. Cloud Armor creates allow or deny lists of IP addresses that apply at the HTTP(S) load balancer at the edge of the Google Cloud network by examining addresses as close as possible to users and malicious traffic. For web services that span environments, placing workloads in hybrid network endpoint groups behind an external HTTP(S) load balancer enables Cloud Armor protection against distributed denial-of-service (DDoS) attacks and common vulnerabilities like SQL injection or cross-site scripting. If advanced Layer 7 security including intrusion detection or intrusion prevention (IDS/IPS) is required for inbound traffic or between segments, a third-party firewall appliance can be deployed as a multi-NIC appliance between VPCs or integrated with the segmentation fabric.
Exam tip: VPC networks and subnets create the Layer 3 isolation boundary, VPC Service Controls adds the Layer 7 perimeter with ingress and egress rules around projects, and Cloud Armor filters at the edge load balancer — use all three rather than treating one as a substitute for the others.
Zero-trust microsegmentation and encrypted inter-tier transport combines container-level traffic isolation with cryptographic authentication of every service-to-service call. In Google Cloud, Kubernetes NetworkPolicies (opens in a new tab) provide reachability control between Pods and Cloud Service Mesh (opens in a new tab) provides mutual TLS (mTLS) encryption, identity authentication, and authorization for containerized tiers. Together they prevent unauthorized lateral movement across web, application, and data tiers even when the tiers share a cluster or Virtual Private Cloud (VPC) (opens in a new tab) network.
Default open Pod connectivity in Google Kubernetes Engine (GKE) means every Pod can communicate with every other Pod in the cluster. This flat network allows an attacker who compromises one microservice to probe and move laterally to adjacent tiers, and it leaves inter-tier traffic without authentication of the caller. Zero-trust boundary control removes this implicit trust by requiring an explicit allow rule for each Pod-to-Pod flow and cryptographic proof of identity for each application-to-application request.
Kubernetes NetworkPolicies are basic traffic flow controls that define which Pods can send and receive traffic based on Pod labels, namespaces, ports, and protocols. A NetworkPolicy applied to a frontend tier allows traffic to flow only from the authorized frontend Pods to the specific backend Pods and ports, while all other Pod-to-Pod traffic to that backend is denied. Because the policy is enforced at the Pod boundary, a compromised or misconfigured workload in one tier cannot reach workloads in another tier unless a policy explicitly permits it, which limits the blast radius and reduces denial-of-service risk.
NetworkPolicies depend on cluster-level enablement and verification to remain effective. The managed Organization Policy constraint constraints/container.managed.enableNetworkPolicy enforces that GKE clusters have network policy enforcement turned on across an organization, folder, or project. After policies are applied, network policy logging verifies that allowed and denied flows match intent, so misconfigured selectors or missing egress rules are detected before they isolate legitimate tiers or leave sensitive tiers exposed.
Cloud Service Mesh is the control plane for containerized applications that adds cryptographic data encapsulation and Layer 7 policy to inter-tier traffic. With mTLS enabled, traffic flows from the client sidecar proxy to the server sidecar proxy only after both sides present and validate identities, and the payload remains encrypted and authenticated between the microservices. This provides application-to-application protection above the default network-layer encryption that Google Cloud applies to all virtual machine (VM)-to-VM traffic within a VPC network and between peered VPC networks.
Cloud Service Mesh extends beyond encryption to full zero-trust authorization for distributed tiers:
The mesh is most valuable when many distinct services have complex interactions, because identity-based rules scale better than maintaining only IP-based Pod rules across rapidly changing tiers.
Exam tip: Kubernetes NetworkPolicies control which Pods can reach each other, while Cloud Service Mesh mTLS encrypts the traffic and proves the identity of both the client and server — use both together for reachability plus cryptographic encapsulation.
NetworkPolicies and Cloud Service Mesh solve different parts of N-tier isolation and are designed to be used together:
| Option | Primary unit | Choose when |
|---|---|---|
| Kubernetes NetworkPolicies | Pod-to-Pod allow rule | The need is basic traffic flow control to block lateral movement between tiers |
| Cloud Service Mesh | mTLS-authenticated service call | The need is encrypted, authenticated, and authorized calls with load balancing, throttling, quota, and metrics across many interacting services |
A frontend-to-backend flow illustrates the composition: the NetworkPolicy permits packets to travel from the frontend namespace to the backend Pods on a specific port, and the mesh then requires the frontend service identity to authenticate via mTLS and pass service authorization before the backend processes the request. If either control denies the flow, the connection fails, so network reachability and cryptographic identity form two independent boundaries.
Hardened cluster and network boundaries prevent microsegmented tiers from being bypassed from the internet or from adjacent VPC resources. GKE private nodes remove the default external IP address from every node so traffic flows only through internal cluster addresses and authorized load balancers, and the constraint constraints/container.managed.enablePrivateNodes enforces this posture. Control plane access is further restricted to trusted source ranges through authorized networks, which limits control plane access to specified IP ranges, GKE nodes in the same VPC network, and Google-reserved management addresses.
Broader N-tier segmentation places these clusters inside layered perimeters with encrypted interconnects. VPC networks and subnets group web, application, and data resources into separate segments, while VPC Service Controls (opens in a new tab) adds a Layer 7 service perimeter around in-scope projects with ingress control that allows only authorized identities into the perimeter and egress control that allows only authorized destinations out of the perimeter. Inter-tier transport outside the cluster relies on approved encrypted channels: MACsec for traffic over Cloud Interconnect, IPsec for traffic over Cloud VPN, TLS 1.2 or higher for service traffic, and end-to-end mTLS when applications are exposed through Apigee API gateways, including shared VPC deployments with Apigee.
Private Google Access should be used when backend tiers must consume Google services while remaining without external IP addresses. It is a subnet-level setting that must be explicitly enabled on each subnet and lets instances without external IP addresses reach Google Cloud APIs such as Cloud Storage over Google's internal network without traversing the internet, which reduces outbound data transfer cost and latency.
Kubernetes NetworkPolicies control which Pods can send and receive traffic while Cloud Service Mesh mutual TLS encrypts inter-tier traffic and authenticates both client and server identities. NetworkPolicies provide basic Pod-to-Pod allow rules based on labels, namespaces, ports, and protocols to block lateral movement, while the mesh requires authenticated service identities and provides authorization, load balancing, throttling, quota, and metrics. Both controls should be used together so network reachability and cryptographic identity form two independent boundaries.
HTTPS or HTTP/2 on the backend service should be used when an auditable, encrypted connection is required from the internal Application Load Balancer to the backend instances. Automatic network-level encryption to instance groups and zonal network endpoint groups with GCE_VM_IP_PORT endpoints is not auditable and does not replace an auditable Transport Layer Security session to the backend. The backend instances or endpoints must serve using the same protocol as the backend service.
In VPC Service Controls, ingress control permits only authorized identities and clients into the service perimeter and egress control permits only authorized destinations for identities and clients within the perimeter. VPC Service Controls is a Layer 7 perimeter control that wraps in-scope projects above the network layer, so it blocks data movement even when network routing would otherwise allow it. Place sensitive backend data and processing projects inside the perimeter and define narrow ingress and egress rules so only required tiers and destinations can cross the boundary.
An enterprise is designing a secure three-tier application architecture on Google Cloud across isolated VPC networks for the presentation tier, business logic tier, and database tier. The security team establishes the following boundary isolation requirements:
Which combination of network isolation and data encapsulation controls should you deploy?
Last updated