Cloud Armor returns 403 Forbidden: request blocked by a security policy rule

A Cloud Armor policy on the load balancer denied the request (IP, geo, preconfigured WAF rule or rate limit).

Exact message you may see Cloud Armor 403 ForbiddenenforcedSecurityPolicy outcome DENYCloud Armor blocked request preconfigured WAFsecurity policy deny 403 load balancerCloud Armor rate limit exceeded 429
Seen on: Google Cloud HTTP

Meaning

Find the matching rule in the load balancer's request logs (enforcedSecurityPolicy), then tune the rule: add an allow rule with lower priority number for trusted IPs, switch a WAF rule to preview mode, exclude false-positive signatures, or adjust rate limits.

Common causes

  • Preconfigured WAF rule false positive (SQLi/XSS)
  • Geo/IP deny rule
  • Rate-based ban
  • Rule priority order wrong
  • Missing allow rule for health checks/partners

⚡ Quick fix

  1. Check enforcedSecurityPolicy.name and outcome in logs
  2. Put allow rules at a lower priority number
  3. Use preview mode and exclusions for WAF rules

Detailed fix by platform

Shell

  1. gcloud logging read 'resource.type="http_load_balancer" AND jsonPayload.enforcedSecurityPolicy.outcome="DENY"' --limit=5

How to diagnose

  1. Rule — Which matched?
  2. Priority — Correct?
  3. Mode — Preview first?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):

1020 — Cloudflare Error 1020: Access Denied (Cloudflare)1020403 — HTTP 403 Forbidden (HTTP)403502 Bad Gateway: failed_to_connect_to_backend — Google Cloud Load Balancing: 502 Bad Gateway — jsonPayload.statusDetails: failed_to_connect_to_backend / backend_connection_closed_before_data_sent_to_client (Google Cloud / Firebase)502 Bad Gateway: fail…Cloud CDN — Cloud CDN not caching: cache misses because of Set-Cookie, Cache-Control or missing cache mode (Google Cloud / Firebase)Cloud CDNGoogle-managed cert — Google-managed SSL certificate stuck in PROVISIONING / FAILED_NOT_VISIBLE on the HTTPS load balancer (Google Cloud / Firebase)Google-managed certIngress — GKE Ingress stuck: Error syncing to GCP — load balancer not created / NEG not found (Google Cloud / Firebase)Ingresspubsub.topics.publish — Pub/Sub: User not authorized to perform this action (pubsub.topics.publish denied) (Google Cloud / Firebase)pubsub.topics.publishVPC-SC — Request is prohibited by organization's policy — VPC Service Controls perimeter violation (Google Cloud / Firebase)VPC-SCCloud Arm…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.