D5Defect 8 of 17, in the order they close

Cloud SQL is on a public IP

A public address guarded by an authorized-networks list containing home broadband addresses.

Severity
critical
Closes in
phase 4, Private data path
Closed by
Private Service Access
Breaks
1 journey
  • Your VPC
  • Run by Google
  • Firewall and access rules
  • Allowed traffic
  • Where it breaks
outside GCPA strangergiven a recycled homeIP by their ISPharbour-apiCloud Runcalls the public IPauthorized networksoffice 203.0.113.0/282 home broadband IPs3 legacy-api IPsan allow-list and a passwordharbour-vpcPSA reservation10.90.0.0/16 · peeringGoogle's sideharbour-pgCloud SQLpublic IP 34.126.4.20:5432no private IPD5let in

Only what D5 touches. Red is the defect and what it lets through; switch to fixed to see the same parts with only D5 closed. Struck IDs are closed.

As foundPublic IP + authorizedNetworks list. No privateNetwork set.

Wide by design - scroll it sideways.

Notes

open one at a time

1.

What it can cause

The production database answers on the internet. An allow-list and a password are all that stand in the way.
  • The production database answers on the internet. An allow-list and a password are all that stand in the way.
  • The list holds home broadband addresses. When an ISP hands one to someone else, a stranger inherits a path to the database port.
  • Queries and their results cross the public internet, so encryption in transit is the only protection - and it is easy to leave optional.
2.

Why it is wrong

Private Service Access - managed services live in Google’s tenant and reach your VPC over a peering, drawing private IPs from a range you reserve.

Production database traffic rides the public internet. The PSA peering already exists and Redis already uses it. The work is pointing the database at a path that is already built.

The idea

Private Service Access - managed services live in Google’s tenant and reach your VPC over a peering, drawing private IPs from a range you reserve.

3.

How you would find it

gcloud sql instances list --format="table(name,settings.ipConfiguration.ipv4Enabled,settings.ipConfiguration.privateNetwork,settings.ipConfiguration.authorizedNetworks[].value.list())"
detect
gcloud sql instances list --format="table(  name,settings.ipConfiguration.ipv4Enabled,  settings.ipConfiguration.privateNetwork,  settings.ipConfiguration.authorizedNetworks[].value.list())"
4.

The change that closes it

Private IP drawn from 10.90.0.0/16 over the existing PSA peering. Public IP removed.
As found
Public IP + authorizedNetworks list. No privateNetwork set.
Fixed
Private IP drawn from 10.90.0.0/16 over the existing PSA peering. Public IP removed.
fix
# confirm what is actually reserved before migratinggcloud compute addresses list --global --filter="purpose=VPC_PEERING" gcloud sql instances patch harbour-pg \  --network=projects/harbour-net-prod/global/networks/harbour-vpc \  --no-assign-ip
5.

When to fix it

Phase 4, Private data path

Phase 4, Private data path, together with D3b. Needs Private Google Access from phase 1, and the external IPs cannot come off until the database is reachable privately.

Cannot start until

Nothing. It can start as soon as its phase does.

Unblocks

  • D3blegacy-api instances carry external IPs · phase 4
6.

Journeys it breaks

A shopper loads a product page