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.
2.Secure accesscloses 3
Make administrative access identity-based, so nothing later has to be done over a public SSH port.
- D2SSH open to the internetPort 22 allowed from 0.0.0.0/0 on every VM.highbreaks 1 journey
- D3aBastion carries an external IPThe bastion has a public address so that someone can SSH to it.mediumafter D2
- 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.
4.Private data pathcloses 2
Get production database traffic off the public internet, and remove the external IPs that depended on it.
5.Egress and load balancercloses 5
Give outbound traffic one known identity, and fix the load balancer settings that fail quietly.
- D7Cloud Run egress is private-ranges-onlyInternet calls leave from Google’s shared serverless pool.highbreaks 1 journey
- D9Egress is completely unrestrictedNo egress rules exist, so the implied allow at 65535 governs everything.high
- D14No Cloud Armor on the legacy backend serviceharbour-waf is attached to api-backend-service and nowhere else.highafter D12
- D13TCP health check on a web backendlegacy-backend-service probes TCP on port 80.mediumbreaks 1 journeyafter D12
- 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.
- D1One allow rule opens everythingallow-all ingress from 0.0.0.0/0, all protocols, no target, priority 1000.criticalafter D2, D6, D9
- D10No policy above the projectSeveral identities hold owner, and any of them can delete any firewall rule.medium
- D11Partner expects transitive accesspartner-vpc is peered in and assumes it can reach Cloud SQL through you.lowbreaks 1 journey