Part 4 of the case study

Defects

Every entry is deliberate and realistic, and each has a page of its own: what it is, what it can cause, how you would find it, and the change that closes it. They are listed in the order they have to be fixed, which is the argument this whole case study is making.

critical
3
high
5
medium
7
low
2

1.Groundworkcloses 2

Add the things that break nothing and unblock almost everything else.

  1. D4Private Google Access is off on the data subnetrabbitmq-1 cannot reach Secret Manager, Cloud Storage, or the logging API.mediumbreaks 1 journey
  2. D12No proxy-only subnetThe regional internal ALB cannot be created.low

2.Secure accesscloses 3

Make administrative access identity-based, so nothing later has to be done over a public SSH port.

  1. D2SSH open to the internetPort 22 allowed from 0.0.0.0/0 on every VM.highbreaks 1 journey
  2. D3aBastion carries an external IPThe bastion has a public address so that someone can SSH to it.mediumafter D2
  3. D16Metadata SSH keys instead of OS LoginPublic keys live in project metadata, so a project-level key works on every VM.mediumbreaks 1 journeyafter D2

3.Close the bypassescloses 2

Make the protections that already exist actually apply, before spending effort adding more.

  1. D6Cloud Run ingress is left at allharbour-api is fronted by a load balancer, but its run.app URL still answers the internet.criticalbreaks 1 journey
  2. D8The origin is not locked to CloudflareThe load balancer accepts connections from any source.highbreaks 1 journey

4.Private data pathcloses 2

Get production database traffic off the public internet, and remove the external IPs that depended on it.

  1. D5Cloud SQL is on a public IPA public address guarded by an authorized-networks list containing home broadband addresses.criticalbreaks 1 journey
  2. D3blegacy-api instances carry external IPsEvery VM in the MIG has its own public address.mediumafter D4, D5

5.Egress and load balancercloses 5

Give outbound traffic one known identity, and fix the load balancer settings that fail quietly.

  1. D7Cloud Run egress is private-ranges-onlyInternet calls leave from Google’s shared serverless pool.highbreaks 1 journey
  2. D9Egress is completely unrestrictedNo egress rules exist, so the implied allow at 65535 governs everything.high
  3. D14No Cloud Armor on the legacy backend serviceharbour-waf is attached to api-backend-service and nowhere else.highafter D12
  4. D13TCP health check on a web backendlegacy-backend-service probes TCP on port 80.mediumbreaks 1 journeyafter D12
  5. D15No SSL policy on the HTTPS proxyThe target proxy uses the default policy, which is permissive for compatibility.mediumbreaks 1 journey

6.Govern and tightencloses 3

Remove the broad rule everything has been quietly relying on, and put a floor under the project that a project owner cannot remove.

  1. D1One allow rule opens everythingallow-all ingress from 0.0.0.0/0, all protocols, no target, priority 1000.criticalafter D2, D6, D9
  2. D10No policy above the projectSeveral identities hold owner, and any of them can delete any firewall rule.medium
  3. D11Partner expects transitive accesspartner-vpc is peered in and assumes it can reach Cloud SQL through you.lowbreaks 1 journey