Notes
open one at a time
1.What it can cause
Any project owner can delete or loosen any firewall rule, by mistake or on purpose, and nothing above the project refuses it.
- Any project owner can delete or loosen any firewall rule, by mistake or on purpose, and nothing above the project refuses it.
- D1 happened exactly this way: one broad rule added inside the project, with no floor above it.
- Every new project starts with no guardrails at all.
2.Why it is wrong
Evaluation order. A layer above the project is consulted before any rule a project owner controls, and cannot be overridden from below.
VPC rules live inside the project, which is exactly where the trust problem is. A rule set at the org or folder level is evaluated first and cannot be overridden from below.
The idea
Evaluation order. A layer above the project is consulted before any rule a project owner controls, and cannot be overridden from below.
Learn it
- The order of the layers · GCP 5.2
- The three kinds · GCP 5.2
3.How you would find it
gcloud compute firewall-policies list --organization=ORG_ID
gcloud compute firewall-policies list --organization=ORG_ID # surfaces anything attached ABOVE the projectgcloud compute networks get-effective-firewalls harbour-vpc4.The change that closes it
Org-level hierarchical policy denying 22 and 3389 from 0.0.0.0/0, evaluated before any project rule.
- As found
- Nothing above the project. VPC rules are the first and only layer.
- Fixed
- Org-level hierarchical policy denying 22 and 3389 from 0.0.0.0/0, evaluated before any project rule.
gcloud compute firewall-policies create \ --organization=ORG_ID --short-name=harbour-baseline gcloud compute firewall-policies rules create 1000 \ --firewall-policy=harbour-baseline --direction=INGRESS --action=deny \ --src-ip-ranges=0.0.0.0/0 --layer4-configs=tcp:22,tcp:3389