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 manage a production API running behind a global external Application Load Balancer protected by Google Cloud Armor. The API receives POST requests with application/json request bodies and a custom session_prefs cookie. You need to deploy sqli-v422-stable and xss-v422-stable preconfigured Web Application Firewall (WAF) rules without disrupting legitimate users.
Your deployment must meet the following requirements:
session_prefs cookie from triggering XSS signature owasp-crs-v042200-id941180-xss, and safely validate future rule updates.Which configuration and tuning workflow should you implement?
0.1, and deploy sqli-v422-stable and xss-v422-stable at the default sensitivity level (4) in enforced mode with Adaptive Protection enabled so machine learning automatically suppresses false positives. Place canary rules in preview mode at priority 200 below stable rules at priority 100, and opt out owasp-crs-v042200-id941180-xss across all requests using opt_out_rule_ids.This approach relies on default Cloud Armor settings—default unparsed body handling, default sensitivity level 4, and Adaptive Protection—while deploying rules directly into enforced mode and placing previewed canary rules at a lower evaluation priority.
4 without preview mode enables the most aggressive OWASP CRS signatures immediately in production, risking widespread disruption to legitimate users.0.1 drops 90% of request logs, making it difficult to capture intermittent false positives during active tuning.stable enforced rules at priority 100 and canary preview rules at priority 200 causes matching requests to terminate at priority 100, so the canary preview rule is never evaluated or logged for those requests.opt_out_rule_ids disables owasp-crs-v042200-id941180-xss across the entire request rather than scoping the exclusion strictly to the session_prefs cookie.Adaptive Protection should be enabled alongside WAF rules specifically to detect and mitigate high-frequency Layer 7 DDoS floods, and a reduced log sampling rate (such as 0.1) is only appropriate after active WAF tuning is complete to control steady-state logging costs.
STANDARD JSON parsing and keep VERBOSE logging permanently enabled in production to audit all future payloads. Configure evaluatePreconfiguredWaf('sqli-v422-stable', {'sensitivity': 0}) and evaluatePreconfiguredWaf('xss-v422-stable', {'sensitivity': 1, 'opt_out_rule_ids': ['owasp-crs-v030301-id941180-xss']}) in preview mode, and use add-preconfig-waf-exclusion without --target-rule-ids to exclude all cookies from all WAF rules before disabling preview mode.This configuration enables STANDARD JSON parsing and preview mode, but attempts to minimize noise by setting SQLi sensitivity to 0, opting out an older CRS version signature ID, excluding all cookies globally, and leaving verbose logging permanently enabled.
'sensitivity': 0 without opt_in_rule_ids disables all signatures in sqli-v422-stable, leaving the API completely unprotected against SQL injection attacks.owasp-crs-v030301-id941180-xss (CRS 3.3 format) inside xss-v422-stable (CRS 4.22 rule set) results in a signature version mismatch and configuration error rather than excluding owasp-crs-v042200-id941180-xss.add-preconfig-waf-exclusion without --target-rule-ids and excluding all cookies (op=EQUALS_ANY) removes inspection of every cookie across all signatures in the rule set, creating a major security blind spot instead of isolating session_prefs.VERBOSE logging permanently enabled in production exposes sensitive end-user request bodies, headers, and cookies in Cloud Logging.0 behavior: Sensitivity 0 means no signatures are active unless explicitly added via opt_in_rule_ids.opt_out_rule_ids, opt_in_rule_ids, or --target-rule-ids value must match the exact OWASP CRS version of the target rule set (such as v042200 for v422-stable).--target-rule-ids and the exact field operator (e.g., op=EQUALS,val=session_prefs).Excluding all cookies with op=EQUALS_ANY should only be used if an application intentionally passes arbitrary, unvalidated data across numerous dynamic cookie names that cannot be enumerated, and VERBOSE logging should always be reverted to normal logging once troubleshooting concludes.
STANDARD JSON parsing, temporarily enable VERBOSE logging with a load balancer log sampling rate of 1, and deploy evaluatePreconfiguredWaf('sqli-v422-stable', {'sensitivity': 1}) and evaluatePreconfiguredWaf('xss-v422-stable', {'sensitivity': 1}) with deny-403 in preview mode. Add a preconfigured WAF exclusion on the xss-v422-stable rule targeting owasp-crs-v042200-id941180-xss for the session_prefs cookie, verify preconfiguredExprIds in Cloud Logging, and disable preview mode and verbose logging before placing canary rules in preview mode at a higher priority than enforced stable rules.This workflow combines Cloud Armor preconfigured WAF rule tuning, request content parsing, scoped field exclusions, and Cloud Logging telemetry to deploy Layer 7 SQLi and XSS protection safely in production. It leverages OWASP Core Rule Set (CRS) sensitivity levels, preview mode validation, and granular field-level exclusions rather than broad rule disabling.
--json-parsing=STANDARD instructs Cloud Armor to parse application/json request bodies before applying preconfigured WAF signatures, preventing false positives caused by inspecting raw, unparsed JSON syntax.--preview) logs rule matches under preconfiguredExprIds without blocking traffic. Temporarily setting --log-level=VERBOSE alongside a load balancer log sampling rate of 1 ensures every triggered request and the offending request snippet are captured in Cloud Logging during tuning.1 activates only high-confidence signatures. Using add-preconfig-waf-exclusion with --target-rule-ids "owasp-crs-v042200-id941180-xss" and --request-cookie-to-exclude scoped to session_prefs suppresses the false positive only for that specific cookie while keeping owasp-crs-v042200-id941180-xss active across headers, query parameters, and request bodies.VERBOSE logging after tuning prevents long-term accumulation of end-user personally identifiable information (PII) in logs. Placing canary rules in preview mode at a higher evaluation priority (lower numeric priority) than enforced stable rules ensures new signatures are evaluated and logged before reaching live enforcement.deny-403 into active enforcement.Unlike disabling sensitivity levels globally, leaving JSON unparsed, or omitting exclusions, this approach balances strong OWASP Top 10 defense with zero disruption to legitimate API consumers and establishes a repeatable pipeline for testing future rule updates.
STANDARD JSON parsing, set VERBOSE logging, and configure evaluatePreconfiguredWaf('sqli-v422-stable', {'sensitivity': 1}) in preview mode. For XSS, configure a rule with the allow action using evaluatePreconfiguredWaf('xss-v422-stable', {'sensitivity': 1, 'opt_in_rule_ids': ['owasp-crs-v042200-id941180-xss']}), attach a request cookie exclusion for session_prefs, and keep canary rules in preview mode at a higher priority than stable rules.This configuration tries to enable JSON body parsing, verbose logging, and sensitivity level 1 tuning while using opt_in_rule_ids and a request cookie exclusion with an allow rule to handle the xss-v422-stable false positive.
opt_in_rule_ids sensitivity combination: In evaluatePreconfiguredWaf(), opt_in_rule_ids can only be specified when sensitivity is set to 0. Combining 'sensitivity': 1 with opt_in_rule_ids produces an invalid rule expression.0, specifying owasp-crs-v042200-id941180-xss inside opt_in_rule_ids would enable only the noisy signature while disabling every other XSS signature, rather than excluding the problematic signature.allow action on a preconfigured WAF rule that has request field exclusions configured via add-preconfig-waf-exclusion.1 during active tuning and omits disabling verbose logging after validation.opt_in_rule_ids vs. opt_out_rule_ids: opt_in_rule_ids starts from an empty baseline (sensitivity: 0) and explicitly activates listed signatures, whereas opt_out_rule_ids starts from the selected sensitivity level (1–4) and disables listed signatures.deny (or non-allow) action.VERBOSE logging active indefinitely increases the risk of storing end-user PII in Cloud Logging.Using opt_in_rule_ids is appropriate when setting 'sensitivity': 0 to selectively enable a small number of specific signatures (for example, specific CVE or JSON SQLi signatures) rather than enabling an entire sensitivity tier, and exclusions should always pair with a deny action.
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