Notes
open one at a time
1.What it can cause
Anyone with the run.app URL reaches the API with no CDN, no WAF and no Cloud Armor in the way.
- Anyone with the run.app URL reaches the API with no CDN, no WAF and no Cloud Armor in the way.
- An attack the front door blocks succeeds at the side door, and the load balancer's logs never show it.
- The URL is not a secret. It turns up in build logs, error messages and old app versions.
2.Why it is wrong
A protection is only as good as the narrowest path around it. A WAF on the load balancer does nothing for a door that skips the load balancer.
That URL is a second front door with no CDN, no WAF, and no Cloud Armor. Anyone who finds it skips every protection on the chain.
The idea
A protection is only as good as the narrowest path around it. A WAF on the load balancer does nothing for a door that skips the load balancer.
Learn it
- Ingress: who may reach the service · GCP 10
3.How you would find it
gcloud run services describe harbour-api --region=asia-southeast1 --format=yaml | grep ingress
gcloud run services describe harbour-api \ --region=asia-southeast1 \ --format=yaml | grep ingress # then confirm the bypass actually answerscurl -sI https://harbour-api-xxxx.a.run.app/ \ | head -14.The change that closes it
--ingress=internal-and-cloud-load-balancing - only the LB and the VPC can reach it
- As found
- --ingress=all
- Fixed
- --ingress=internal-and-cloud-load-balancing - only the LB and the VPC can reach it
gcloud run services update harbour-api \ --region=asia-southeast1 \ --ingress=internal-and-cloud-load-balancing