Bird
Raised Fist0
GCPcloud~20 mins

Cloud Armor for DDoS and WAF in GCP - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
Cloud Armor Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ service_behavior
intermediate
2:00remaining
How does Cloud Armor respond to a detected DDoS attack?

When Google Cloud Armor detects a DDoS attack on your service, what is its primary behavior?

AIt applies configured security policies to filter and block malicious traffic while allowing legitimate requests.
BIt redirects all traffic to a backup server outside Google Cloud.
CIt automatically blocks all incoming traffic to the service until the attack stops.
DIt shuts down the service to prevent damage and notifies the administrator.
Attempts:
2 left
💡 Hint

Think about how a protective filter works rather than stopping everything.

🧠 Conceptual
intermediate
2:00remaining
What is the role of WAF rules in Cloud Armor?

Which best describes the purpose of Web Application Firewall (WAF) rules in Cloud Armor?

AThey monitor server CPU usage and send alerts.
BThey define patterns to detect and block common web attacks like SQL injection and cross-site scripting.
CThey automatically scale the backend servers during high traffic.
DThey encrypt all incoming traffic to the application.
Attempts:
2 left
💡 Hint

WAF rules look for harmful patterns in web requests.

❓ Architecture
advanced
2:30remaining
Which architecture best integrates Cloud Armor for protecting a global web application?

You have a global web application hosted on Google Cloud with multiple backend regions. Which architecture best uses Cloud Armor to protect it?

AApply Cloud Armor policies on the global HTTP(S) Load Balancer to filter traffic before it reaches backends.
BDeploy Cloud Armor policies on each backend VM instance individually.
CUse Cloud Armor only on the primary region's load balancer and rely on firewall rules elsewhere.
DConfigure Cloud Armor on the Cloud CDN to cache and block malicious content.
Attempts:
2 left
💡 Hint

Think about where traffic first enters your system globally.

❓ security
advanced
2:30remaining
What happens if a Cloud Armor security policy has conflicting rules for the same IP address?

If a Cloud Armor security policy contains two rules that both match the same IP address but have different actions (one ALLOW, one DENY), what is the effective action?

AThe DENY action always overrides ALLOW regardless of rule order.
BThe ALLOW action always overrides DENY regardless of rule order.
CCloud Armor throws an error and blocks all traffic from that IP.
DThe first matching rule in priority order is applied, so the action of that rule is enforced.
Attempts:
2 left
💡 Hint

Consider how rule priority affects decision making.

✅ Best Practice
expert
3:00remaining
Which practice ensures minimal false positives when using Cloud Armor WAF rules?

To reduce false positives while using Cloud Armor's WAF rules on a critical web application, which practice is best?

AOnly use IP-based allowlists and blocklists without WAF rules.
BEnable all predefined WAF rules at once without customization to maximize protection.
CStart with a monitoring mode to log matches, then gradually enable blocking after tuning rules based on logs.
DDisable logging to improve performance and avoid alert fatigue.
Attempts:
2 left
💡 Hint

Think about how to safely test rules before blocking traffic.

Practice

(1/5)
1. What is the main purpose of Google Cloud Armor in protecting your applications?
easy
A. To block bad traffic and protect against attacks like DDoS
B. To store application data securely
C. To manage user authentication and login
D. To monitor application performance metrics

Solution

  1. Step 1: Understand Cloud Armor's role

    Cloud Armor is designed to protect applications from harmful traffic and attacks such as Distributed Denial of Service (DDoS).
  2. Step 2: Compare options

    Options B, C, and D describe other services like storage, authentication, and monitoring, which are not Cloud Armor's main function.
  3. Final Answer:

    To block bad traffic and protect against attacks like DDoS -> Option A
  4. Quick Check:

    Cloud Armor protects apps from bad traffic = A [OK]
Hint: Cloud Armor blocks bad traffic and DDoS attacks [OK]
Common Mistakes:
  • Confusing Cloud Armor with storage or authentication services
  • Thinking Cloud Armor monitors performance instead of security
2. Which of the following is the correct way to create a Cloud Armor security policy using gcloud CLI?
easy
A. gcloud compute security-policies create my-policy --description="Protect app"
B. gcloud compute firewall-rules create my-policy --description="Protect app"
C. gcloud compute instances create my-policy --description="Protect app"
D. gcloud compute networks create my-policy --description="Protect app"

Solution

  1. Step 1: Identify correct gcloud command for Cloud Armor policy

    The command to create a Cloud Armor security policy is under 'compute security-policies create'.
  2. Step 2: Eliminate incorrect commands

    Firewall rules, instances, and networks are different resources and use different commands.
  3. Final Answer:

    gcloud compute security-policies create my-policy --description="Protect app" -> Option A
  4. Quick Check:

    Security policy creation uses 'compute security-policies create' = B [OK]
Hint: Cloud Armor policies use 'compute security-policies create' command [OK]
Common Mistakes:
  • Using firewall or instance commands instead of security-policies
  • Confusing network creation with security policy creation
3. Given this Cloud Armor rule snippet, what action will be taken for requests from IP 203.0.113.5?
{
  "expression": "origin.ip == '203.0.113.5'",
  "action": "deny(403)"
}
medium
A. Requests from 203.0.113.5 will be allowed
B. Requests from 203.0.113.5 will be denied with HTTP 403
C. Requests from all IPs except 203.0.113.5 will be denied
D. Requests from 203.0.113.5 will be redirected

Solution

  1. Step 1: Analyze the rule expression and action

    The rule matches requests where the IP is exactly '203.0.113.5' and denies them with HTTP status 403.
  2. Step 2: Understand the effect on matching IP

    Requests from 203.0.113.5 will be blocked and receive a 403 Forbidden response.
  3. Final Answer:

    Requests from 203.0.113.5 will be denied with HTTP 403 -> Option B
  4. Quick Check:

    IP match with deny(403) means block = D [OK]
Hint: deny(403) blocks matching IPs with forbidden response [OK]
Common Mistakes:
  • Thinking deny means allow
  • Confusing deny with redirect or allow
  • Assuming rule applies to all IPs
4. You created a Cloud Armor security policy but it is not blocking malicious traffic as expected. What is a common mistake to check?
medium
A. The Cloud Armor API is enabled in the project
B. The policy rules have correct IP addresses
C. The firewall rules allow all traffic
D. The security policy is not attached to the backend service or load balancer

Solution

  1. Step 1: Verify policy attachment

    Cloud Armor policies must be attached to backend services or load balancers to take effect.
  2. Step 2: Check other factors

    While correct IPs and API enablement matter, the main reason for no blocking is often missing attachment.
  3. Final Answer:

    The security policy is not attached to the backend service or load balancer -> Option D
  4. Quick Check:

    Policy must be attached to work = C [OK]
Hint: Attach policy to backend service or load balancer to activate [OK]
Common Mistakes:
  • Forgetting to attach policy to backend service
  • Assuming policy works without attachment
  • Ignoring API enablement or rule correctness
5. You want to protect your web app from both DDoS attacks and common web exploits. Which combination of Cloud Armor features should you use?
hard
A. Use Cloud Armor only for DDoS, and rely on firewall rules for web exploits
B. Only create IP-based allow/block rules without WAF
C. Create IP-based allow/block rules and enable the preconfigured WAF rules
D. Use Cloud Armor to monitor traffic but not block anything

Solution

  1. Step 1: Understand protection needs

    DDoS protection requires blocking bad IPs; web exploits need WAF rules to detect attacks like SQL injection.
  2. Step 2: Combine IP rules and WAF

    Cloud Armor supports both IP-based rules and preconfigured WAF rules to cover these threats together.
  3. Final Answer:

    Create IP-based allow/block rules and enable the preconfigured WAF rules -> Option C
  4. Quick Check:

    Use IP rules + WAF for full protection = A [OK]
Hint: Combine IP rules with WAF for best protection [OK]
Common Mistakes:
  • Using only IP rules without WAF for web exploits
  • Relying on firewall rules instead of Cloud Armor WAF
  • Not enabling blocking, only monitoring
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard