Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Professional Cloud Network Engineer practice bank has an additional 2,437 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
You are designing a Google Cloud Armor Enterprise backend security policy for a global external Application Load Balancer with Adaptive Protection enabled. Your security team requires the policy to enforce the following behaviors before traffic reaches the backend service:
AU), except requests from 198.51.100.0/24 that include an x-partner-id request header containing trusted-qa.AU partner traffic) for SQL injection (SQLi) using OWASP CRS 4.22, while excluding false-positive signature owasp-crs-v042200-id942100-sqli.2147483647).Which rule configuration and priority order should you implement?
deny-403): evaluateAdaptiveProtectionAutoDeploy()deny-403): origin.region_code == 'AU' && !inIpRange(origin.ip, '198.51.100.0/24') && !request.headers['x-partner-id'].contains('trusted-qa')deny-403): evaluatePreconfiguredWaf('sqli-v422-stable', ['owasp-crs-v042200-id942100-sqli'])This configuration places the Adaptive Protection auto-deploy rule at the highest logical priority (Priority 100), uses an ungrouped negated expression at Priority 200 to filter AU traffic, and enforces the SQLi preconfigured WAF rule with an excluded signature ID at Priority 300.
!inIpRange(...) && !request.headers[...]) instead of negating the grouped AND expression (!(inIpRange(...) && ...)) violates De Morgan's laws. Any unauthorized IP in AU can bypass the geographic block simply by adding x-partner-id: trusted-qa, and requests from 198.51.100.0/24 without the header also bypass the block.request.headers['x-partner-id'].contains(...) without first checking has(request.headers['x-partner-id']) is poor CEL practice when headers may be absent.evaluateAdaptiveProtectionAutoDeploy() at Priority 100 evaluates dynamic ML-generated rules before static geo/IP restrictions, contrary to Cloud Armor guidance.!(A && B) equals !A || !B, not !A && !B. Using && between negated terms requires both conditions to be false for a request to be blocked.evaluateAdaptiveProtectionAutoDeploy() below static allow/deny rules ensures deterministic, known restrictions always execute first.The evaluateAdaptiveProtectionAutoDeploy() rule were moved below the static rules (for example, to Priority 300), and Priority 200 were rewritten as origin.region_code == 'AU' && !(inIpRange(origin.ip, '198.51.100.0/24') && has(request.headers['x-partner-id']) && request.headers['x-partner-id'].contains('trusted-qa')).
deny-403): origin.region_code == 'AU'allow): inIpRange(origin.ip, '198.51.100.0/24') && has(request.headers['x-partner-id']) && request.headers['x-partner-id'].contains('trusted-qa')deny-403): evaluatePreconfiguredWaf('sqli-v422-stable', ['owasp-crs-v042200-id942100-sqli'])deny-403): evaluateAdaptiveProtectionAutoDeploy()This configuration places a broad geographic deny rule for Australia (AU) at Priority 100 above an explicit allow rule for the 198.51.100.0/24 partner range at Priority 200, followed by the SQLi WAF rule at Priority 300 and the Adaptive Protection auto-deploy rule at Priority 400.
0 is highest logical priority). Every request originating from AU—including traffic from 198.51.100.0/24 carrying x-partner-id: trusted-qa—matches Priority 100 first and is immediately rejected with HTTP 403.AU client.198.51.100.0/24 with the header originates from outside AU, it matches the allow rule at Priority 200 and skips both the SQLi WAF inspection (Priority 300) and Adaptive Protection (Priority 400).100 executes before 200).allow and deny actions terminate further rule evaluation for matching requests.deny rule placed at a higher logical priority than a narrower allow exception completely shadows the exception.There is no valid scenario where this rule ordering achieves the goal; to exempt AU partner traffic while still inspecting it with WAF and Adaptive Protection rules, the exception must be combined into a single negated deny expression rather than split into a deny rule and an allow rule.
A common misconception is assuming Cloud Armor evaluates more specific rules first or treats higher priority numbers as more urgent. In reality, rule ordering is strictly sequential from 0 to 2147483647.
allow): inIpRange(origin.ip, '198.51.100.0/24') && has(request.headers['x-partner-id']) && request.headers['x-partner-id'].contains('trusted-qa')deny-403): origin.region_code == 'AU'deny-403): evaluatePreconfiguredWaf('sqli-v422-stable', ['owasp-crs-v042200-id942100-sqli'])deny-403): evaluateAdaptiveProtectionAutoDeploy()This configuration places an explicit allow rule at Priority 100 to exempt partner traffic from the Priority 200 geographic deny rule for Australia (AU), followed by preconfigured Web Application Firewall (WAF) and Adaptive Protection rules at lower logical priorities (300 and 400).
allow action, matching partner requests immediately proceed to the backend service.198.51.100.0/24 with the x-partner-id header is never evaluated by Priority 300 (evaluatePreconfiguredWaf) or Priority 400 (evaluateAdaptiveProtectionAutoDeploy()), violating the requirement to inspect all non-blocked traffic for SQLi and Layer 7 DDoS attacks.198.51.100.0/24 with the matching header—regardless of geography—also bypasses SQLi and Adaptive Protection inspection.0 highest, 2147483647 lowest) and stops at the first match.allow rules placed above security rules act as a full bypass around OWASP CRS signatures and Adaptive Protection mitigations.deny rule using Common Expression Language (CEL) supports up to five subexpressions per rule.The security team explicitly wanted trusted partner traffic from 198.51.100.0/24 to bypass all downstream WAF signature checks and Adaptive Protection mitigations without any Layer 7 payload inspection.
deny-403): origin.region_code == 'AU' && !(inIpRange(origin.ip, '198.51.100.0/24') && has(request.headers['x-partner-id']) && request.headers['x-partner-id'].contains('trusted-qa'))deny-403): evaluatePreconfiguredWaf('sqli-v422-stable', ['owasp-crs-v042200-id942100-sqli'])deny-403): evaluateAdaptiveProtectionAutoDeploy()This configuration uses a single negated Common Expression Language (CEL) deny rule at Priority 100 combined with a tuned preconfigured WAF rule at Priority 200 and an Adaptive Protection auto-deploy placeholder rule at Priority 300, allowing all remaining safe traffic to fall through to the default allow rule (2147483647).
AU are denied with HTTP 403 unless both the source IP is within 198.51.100.0/24 and the x-partner-id header exists and contains trusted-qa. This expression uses four subexpressions, staying within Cloud Armor's limit of five subexpressions per rule.deny rule rather than an allow rule, exempted partner requests evaluate to false and continue down the policy to Priority 200 and Priority 300.evaluatePreconfiguredWaf('sqli-v422-stable', ['owasp-crs-v042200-id942100-sqli']), enabling OWASP CRS 4.22 SQLi detection while suppressing the noisy signature ID in the exclusion list.evaluateAdaptiveProtectionAutoDeploy() at a lower logical priority (higher numeric value) than static geo/IP and WAF restrictions, ensuring known static traffic policies are always enforced first.100 between priorities (100, 200, 300) allows administrators to insert future rules without renumbering existing entries.Unlike designs that use a high-priority allow rule to create exceptions, negating the exception inside a single deny rule enforces the geographic restriction while preserving full WAF and Adaptive Protection inspection for all allowed traffic.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated