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 configuring a Google Cloud Armor security policy for a Global External Application Load Balancer protecting a web application and its JSON API (Content-Type: application/json). You need to author Common Expression Language (CEL) rules to enforce these Layer 7 requirements:
/admin—including mixed-case or URL-encoded variations such as /Admin or /a%64min—unless the request includes a cookie header containing tier=internal and an x-auth-context header whose Base64-decoded value contains ops-admin.POST requests carrying JSON payloads for SQL injection (sqli-v422-stable) and block detected attacks./login.html with a reCAPTCHA action-token score of at least 0.8, and redirect other /login.html requests to a Google reCAPTCHA challenge page.Which Cloud Armor security policy configuration should you implement?
Configure a backend security policy with JSON parsing enabled and these rules in priority order:
This configuration implements a Google Cloud Armor backend security policy with JSON parsing enabled and four Common Expression Language (CEL) rules ordered by descending security strictness. A backend security policy attaches directly to the Global External Application Load Balancer's backend service, enabling full Layer 7 WAF, body inspection, and bot management capabilities.
request.path.lower().urlDecode().startsWith('/admin') normalizes uppercase characters and percent-encoded bytes before matching, blocking /Admin and /a%64min alike. Using has() safely verifies that both cookie and x-auth-context exist before inspecting tier=internal and calling .base64Decode().contains('ops-admin'). The five subexpressions stay within Cloud Armor's five-subexpression rule limit.advancedOptionsConfig.jsonParsing) instructs Cloud Armor to parse application/json request bodies rather than treating them solely as URL-encoded query strings. Placing evaluatePreconfiguredWaf('sqli-v422-stable') with deny-403 at Priority 200 guarantees SQL injection inspection runs before any allow rule./login.html carrying a valid reCAPTCHA action-token with token.recaptcha_action.score >= 0.8 match Priority 300 and are allowed (after passing SQLi checks). All other /login.html requests fall through to Priority 400 during the header processing phase, triggering a redirect to the Google reCAPTCHA challenge page (and subsequent requests with a valid exemption cookie are exempted)..lower() and .urlDecode() to neutralize common WAF path bypasses.evaluatePreconfiguredWaf('sqli-v422-stable') ahead of allow rules so high-scoring bot tokens cannot skip SQLi scanning.application/json payloads cleanly for preconfigured WAF signatures and request.params rules.Unlike edge security policies, a backend security policy supports WAF rules, JSON body parsing, and google-recaptcha redirects. Ordering deny-403 WAF inspection above allow and redirect rules prevents both action translation in the body phase and inadvertent WAF bypasses.
Configure a backend security policy with JSON parsing enabled and these rules in priority order:
This configuration uses a backend security policy with JSON parsing enabled, but it omits URI path normalization in Priority 100 and assigns a reCAPTCHA redirect action to a preconfigured WAF rule in Priority 200.
request.path.startsWith('/admin') without .lower() and .urlDecode() evaluates the raw request path literally. Attackers can bypass Priority 100 simply by sending /Admin or URL-encoded variations such as /a%64min.evaluatePreconfiguredWaf('sqli-v422-stable') matches malicious content during the body processing phase (such as inside a POST JSON payload), Cloud Armor automatically translates the redirect action into a deny action rather than serving a challenge page.evaluatePreconfiguredWaf(), request.body, or request.params are evaluated against both headers and the request body (up to the configured body inspection limit).redirect (google-recaptcha or external-302) and --request-headers-to-add take effect only when matched in the header phase; in the body phase, redirects become denies and header additions are ignored.startsWith() and contains() perform exact, case-sensitive comparisons unless normalized.Priority 100 chained .lower().urlDecode() on request.path before .startsWith('/admin'), and Priority 200 used --action deny-403 on evaluatePreconfiguredWaf('sqli-v422-stable').
Always pair startsWith(), endsWith(), or contains() on request.path with .lower().urlDecode() to defend against obfuscated path traversal and encoding evasion techniques.
Configure a backend security policy with JSON parsing enabled and these rules in priority order:
This configuration uses a backend security policy with JSON parsing enabled, but it omits URL decoding in Priority 100 and places an allow rule (Priority 200) at a higher priority than the preconfigured WAF rule (Priority 300).
request.path.lower().startsWith('/admin') without .urlDecode() handles mixed-case paths such as /Admin, but fails to catch percent-encoded paths like /a%64min (%64 decodes to d).0) to highest (2147483647) and stops evaluating lower-priority rules once a higher-priority allow rule matches. Any request to /login.html presenting a reCAPTCHA action-token with score >= 0.8 matches Priority 200 during the header phase and is immediately allowed to the backend—completely skipping Priority 300's SQL injection inspection.allow rules short-circuit subsequent deny rules, including evaluatePreconfiguredWaf() rules placed at lower priorities.deny rule above an allow rule allows Cloud Armor to block malicious bodies even if headers matched a lower-priority allow rule, reversing the order eliminates body inspection altogether for allowed requests..lower() alone does not decode percent-encoded characters in request.path.Priority 100 included .urlDecode() after .lower(), and evaluatePreconfiguredWaf('sqli-v422-stable') (deny-403) was placed at Priority 200 above the /login.html allow rule at Priority 300.
A common Cloud Armor design mistake is placing broad allow rules (such as IP allowlists or bot-score exemptions) above OWASP Core Rule Set (CRS) WAF rules, which inadvertently creates uninspected attack paths for any client satisfying the allow condition.
Configure an edge security policy attached to the backend service with these rules in priority order:
This configuration attempts to use a Google Cloud Armor edge security policy attached to a backend service while inspecting header values without Base64 decoding. Edge security policies operate at Google's outermost network perimeter, upstream of the Cloud CDN cache, to enforce coarse access controls before cached content is served.
evaluatePreconfiguredWaf), request body filtering, or reCAPTCHA redirects (GOOGLE_RECAPTCHA).request.headers['x-auth-context'].contains('ops-admin') without calling .base64Decode() compares the literal Base64-encoded string against 'ops-admin', causing legitimate authorized requests to be blocked.application/json payloads for Layer 7 injection signatures.origin.asn, origin.ip, origin.region_code, request.headers, request.method, request.path, request.query, and request.scheme.allow and deny actions are supported; rate limiting (throttle, rate-based ban) and redirect actions are unavailable.The configuration used a backend security policy with JSON parsing enabled instead of an edge security policy, and applied .base64Decode() to request.headers['x-auth-context'] before calling .contains('ops-admin').
A backend service can have both an edge security policy and a backend security policy attached simultaneously for defense in depth, but WAF signatures, body inspection, and reCAPTCHA rules must reside in the backend security policy.
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