Perimeter control on Google Cloud is the combination of four distinct surfaces.
- Cloud Next Generation Firewall enforces stateful packet filtering with hierarchical scope at the organization, folder, and VPC level.
- Identity-Aware Proxy puts an identity gate in front of HTTPS Application Load Balancers, SSH, and RDP, removing the need for a perimeter VPN to publish internal applications.
- The external Application Load Balancer terminates TLS at the Google front end and is the natural mounting point for Cloud Armor and IAP.
- Certificate Authority Service issues the private TLS certificates that the load balancer and internal services present to clients.
The exam tests the order of these controls and what each one stops that the others cannot.
Steps
The first design decision is where to anchor firewall policy.
- Project-scoped legacy VPC firewall rules still work but cannot enforce a guardrail across many projects.
- Hierarchical firewall policies attached to the organization or to a folder run before any VPC-level rule and cannot be deleted or weakened from inside a downstream project.
- Global and regional network firewall policies replace legacy VPC firewall rules with a richer model that supports rule tuples, named tags, address groups, and FQDN objects.
A typical organization defines deny-all-ingress and allow-IAP-only baselines at the folder level, then lets each application team add specific allow rules at the VPC level. Because hierarchical policies are evaluated top down, a deny rule at the organization level is the most reliable place to block known-bad source ranges and to forbid any direct external SSH or RDP.
# Create a hierarchical firewall policy at the organization level
gcloud compute firewall-policies create perimeter-baseline \
--organization 482910374562 \
--short-name perimeter-baseline \
--description "Baseline ingress and egress controls"
# Deny direct SSH and RDP from the internet at the organization level
gcloud compute firewall-policies rules create 1000 \
--firewall-policy perimeter-baseline \
--organization 482910374562 \
--action deny \
--direction INGRESS \
--src-ip-ranges 0.0.0.0/0 \
--layer4-configs tcp:22,tcp:3389 \
--description "Block raw SSH and RDP from internet, force IAP TCP forwarding"
# Allow Google IAP source range to reach VMs over SSH and RDP
gcloud compute firewall-policies rules create 1100 \
--firewall-policy perimeter-baseline \
--organization 482910374562 \
--action allow \
--direction INGRESS \
--src-ip-ranges 35.235.240.0/20 \
--layer4-configs tcp:22,tcp:3389 \
--description "Allow IAP TCP forwarding for SSH and RDP"
# Attach the policy to the production folder
gcloud compute firewall-policies associations create \
--firewall-policy perimeter-baseline \
--folder 539018273645
The IAP source range 35.235.240.0/20 is the published Google source for IAP TCP forwarding.
Allowing only that range, paired with the organization-wide block, removes the entire class of brute-force SSH attacks against external IPs.
Internal applications behind an external HTTPS Application Load Balancer follow the same logic at layer 7:
- enable IAP on the backend service,
- then control access through the
roles/iap.httpsResourceAccessorrole.
💡 Exam Trap: Hierarchical firewall policies and network firewall policies use a unified rule model with a numeric priority where lower numbers win. Legacy VPC firewall rules also use priorities, but their order of evaluation against hierarchical policies is fixed: organization, then folder, then network, then any legacy rule. A question that asks whether a project owner can override an organization-level deny is testing this evaluation order; the correct answer is that they cannot.
Identity-Aware Proxy at the front door
Identity-Aware Proxy adds an authentication and authorization step in front of an external HTTPS Application Load Balancer backend service or in front of TCP SSH and RDP through IAP TCP forwarding. The user proves identity through Google sign-in or through a federated identity provider, and the backend receives a signed JWT in the X-Goog-IAP-JWT-Assertion header.
Backends should validate that header before trusting any user identity claim, because direct VPC access from a misconfigured firewall rule would bypass IAP entirely. Pair IAP with Access Context Manager access levels to enforce device posture, source IP, and geography on top of identity.
IAP works with web apps deployed on Compute Engine, GKE, Cloud Run, and App Engine standard environments through their respective load balancers.
# Enable IAP on a backend service for an internal HR application
gcloud iap web enable \
--resource-type backend-services \
--service hr-app-backend \
--oauth2-client-id "482910374562-1abcde.apps.googleusercontent.com" \
--oauth2-client-secret "REDACTED"
# Grant a security-labeled group access to the IAP-protected resource
gcloud iap web add-iam-policy-binding \
--resource-type backend-services \
--service hr-app-backend \
--member group:hr-app-users@secopsdemo.com \
--role roles/iap.httpsResourceAccessor \
--condition expression='request.auth.access_levels.contains("accessPolicies/482910374562/accessLevels/managed_device_corp_ip")',title="managed-device-and-corp-ip"
The conditional binding above requires both group membership and an Access Context Manager access level that combines a managed-device check and a corporate IP range. This pattern is what the exam expects when the question describes a contractor laptop accessing a sensitive web app from outside the office network.
Load balancer security choices
The choice of load balancer determines what perimeter controls are available.
How it works
- The global external Application Load Balancer supports IAP, Cloud Armor, and global anycast TLS termination, and it accepts both managed and self-managed SSL certificates.
- The classic external Application Load Balancer remains supported but the global edition is the recommended target for new designs.
- The internal Application Load Balancer cannot be reached from the internet at all and is the right pick for private microservice traffic.
- The proxy Network Load Balancer terminates TCP and optionally TLS but does not run layer-7 inspection.
- The pass-through Network Load Balancer is layer-4 only and cannot front IAP or Cloud Armor.
⚠️ Anti-Pattern: Publishing an admin console through a pass-through external Network Load Balancer and trying to gate access at the VM-level firewall. The right pattern is an external HTTPS Application Load Balancer with IAP enabled and Cloud Armor in front; the layer-7 surface is where identity and request inspection belong.
Certificate Authority Service
Certificate Authority Service (CA Service) operates private root and subordinate CAs, signs internal TLS certificates, and supports automation through ACME-compatible clients, Workload Identity Federation, and direct gcloud or API calls. Pools have two tiers:
- Enterprise (long-lived CAs, multiple regions, manual revocation list management)
- DevOps (high-volume, short-lived, optimized for issuance throughput)
Match the tier to the use case:
- an internal mesh that rotates workload identity certificates every hour belongs in DevOps
- a regulated certificate that backs a legal-document signing service belongs in Enterprise
CA Service integrates with Cloud KMS so that CA private keys are stored in Cloud HSM-backed keys, which is the answer when a scenario demands FIPS 140-2 Level 3 protection.
# Create an Enterprise tier CA pool backed by Cloud HSM
gcloud privateca pools create internal-root-pool \
--tier ENTERPRISE \
--location europe-west4
# Create a root CA inside the pool with an HSM-backed key
gcloud privateca roots create internal-root-ca \
--pool internal-root-pool \
--location europe-west4 \
--subject "CN=secopsdemo Internal Root,O=secopsdemo,C=DE" \
--validity P10Y \
--key-algorithm rsa-pkcs1-4096-sha256 \
--kms-key-version "projects/secopsdemo-ca/locations/europe-west4/keyRings/cas-keys/cryptoKeys/internal-root/cryptoKeyVersions/1"
Network isolation and data encapsulation for N-tier applications
An N-tier application uses three or four layers: a public-facing web tier, a private application tier, a private data tier, and an optional admin or batch tier.
Network isolation translates these tiers into a set of subnets, tags or service accounts, and firewall rules that allow traffic only between adjacent layers.
- The web tier sits behind an external Application Load Balancer in a
web-tiersubnet with thewebservice account. - The app tier sits in an
app-tiersubnet with theappservice account. - The data tier sits in a
data-tiersubnet with thedataservice account.
Firewall rules then allow web accounts to talk to app accounts on the application port, app accounts to talk to data accounts on the database port, and deny all other internal flows by default.
Using service accounts as targets, rather than tags, ties firewall scope to identity and prevents the common mistake of an operator adding a tag to a VM that should not have it.
Decision Anchor
Choose Cloud NGFW hierarchical policies when you need an organization-wide guardrail that cannot be weakened by a downstream project.
Choose Identity-Aware Proxy when access to an internal application must be gated by user identity, group membership, and Access Context Manager posture without a VPN.
Choose Cloud Armor when the threat is layer-7 application attacks against an external HTTPS Application Load Balancer.
Choose Certificate Authority Service when internal TLS certificates must be issued, rotated, and audited under your own root of trust rather than under Google-managed certificates.
🎯 Scenario: An internal SAP UI must be published to remote employees on managed laptops, but only when the laptop is in compliant posture and the source IP is in the corporate egress range. The design uses an external HTTPS Application Load Balancer with a managed SSL certificate, IAP enabled on the backend service, an Access Context Manager access level that combines device-policy and IP attributes, and an IAM Condition that requires both the group binding and the access level. The VM-level firewall blocks everything except the Google front-end source ranges. No VPN, no public SSH, no shared password.
