Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Professional Cloud Developer practice bank has an additional 608 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
A development team is deploying a payment-processing microservice on Cloud Run and exposing its RESTful JSON APIs through Apigee. To protect the service and enforce strict access control, the API proxy must meet the following requirements:
write:billing), returning HTTP 403 Forbidden when permissions are insufficient.Which Apigee policy configuration should you implement?
HMAC policy to verify OAuth 2.0 token scopes, the XMLThreatProtection policy to enforce structural limits on JSON payloads, and the AccessControl policy to validate developer application keys.Each policy in this option is a real Apigee security control, but every single one is assigned to a capability it does not perform:
HMAC: Computes and verifies Hash-based Message Authentication Codes using shared secrets to ensure payload integrity and sender authenticity.XMLThreatProtection: Evaluates XML documents for structural attacks—such as excessive element depth, attribute counts, or entity expansion—before XML parsing occurs.AccessControl: Permits or denies incoming requests based on client IP addresses (CIDR ranges).HMAC policy verifies cryptographic signatures over message payloads or headers, not OAuth 2.0 bearer tokens or granular scopes like write:billing.XMLThreatProtection only inspects XML payloads and cannot protect a RESTful JSON API from deeply nested JSON objects or oversized JSON strings.AccessControl restricts traffic by network IP address rather than validating developer application API keys or checking API product entitlements.AccessControl for IP allowlisting does not identify individual applications or enforce per-token permissions.XMLThreatProtection leaves JSON endpoints completely exposed to content-level attacks and SQL/command injection.HMAC requires shared-secret key distribution rather than standardized OAuth 2.0 token introspection and scope mapping.You were protecting an XML-based backend service that required cryptographic payload-integrity verification via HMAC and IP-based network filtering.
For IP-based and geo-based access control at the edge, Google Cloud Armor is generally recommended ahead of Apigee's AccessControl policy, while OAuthV2 and VerifyAPIKey remain the standard policies for token and key enforcement.
BasicAuthentication policy to decode client credentials, the ResponseCache policy to reduce backend load, and the MessageLogging policy in PostClientFlow to filter out injection payloads.These three policies serve credential encoding/decoding, performance optimization, and asynchronous audit logging functions rather than OAuth 2.0 authorization or proactive threat mitigation:
BasicAuthentication: Encodes or decodes Base64-formatted username and password pairs in the Authorization header.ResponseCache: Caches backend responses in Apigee to serve repeated requests faster and reduce load on Cloud Run.MessageLogging: Asynchronously writes API transaction metadata to Cloud Logging or external SIEM systems.BasicAuthentication only extracts Base64 credentials; it cannot validate API keys against Apigee API products, verify OAuth 2.0 bearer tokens, or enforce granular scopes to return 403 Forbidden.MessageLogging to PostClientFlow executes after the response has already been sent back to the client. It cannot inspect or block malicious JSON structures or injection payloads before they reach Cloud Run.ResponseCache is a traffic-management policy and performs no security validation on incoming request bodies.BasicAuthentication does not perform credential verification on its own; it only transforms headers.PostClientFlow runs strictly after client response delivery, making it unsuitable for request blocking.You needed to forward legacy Base64 credentials to an upstream system, cache non-sensitive public read responses for performance, and stream post-transaction audit logs asynchronously.
Always place authentication and threat-protection policies in the ProxyEndpoint PreFlow or Conditional Flow so malicious traffic is rejected before reaching your Cloud Run backend.
VerifyAPIKey policy, the OAuthV2 policy configured with the VerifyAccessToken operation and scope checks, the JSONThreatProtection policy, and the RegularExpressionProtection policy to the API proxy.This configuration combines Apigee's identity and access control policies with message-level threat protection policies at the API gateway layer. By executing these checks on the Apigee proxy before forwarding traffic to Cloud Run, you establish a centralized security boundary that enforces authentication, fine-grained authorization, and payload sanitization.
VerifyAPIKey policy checks at runtime that an incoming request includes a valid, active API key associated with an approved API product.OAuthV2 policy using the VerifyAccessToken operation validates the bearer token's authenticity and expiration, and verifies that the token contains the required OAuth scopes (such as write:billing). Clients lacking the required scope receive an HTTP 403 Forbidden response.JSONThreatProtection policy enforces structural boundaries on incoming JSON payloads—such as maximum container depth, array element counts, and string lengths—to stop parser-exhaustion and denial-of-service attacks.RegularExpressionProtection policy evaluates query parameters, headers, and message payloads against predefined regex patterns to block SQL, NoSQL, and command injection attempts.Each policy addresses a distinct security layer—application identification (VerifyAPIKey), delegated user/client authorization (OAuthV2), structural JSON validation (JSONThreatProtection), and pattern-based injection filtering (RegularExpressionProtection)—providing complete coverage for RESTful JSON APIs.
VerifyAPIKey policy expecting keys in URL query parameters, the SOAPMessageValidation policy to inspect JSON structures, and the CORS policy to restrict unauthorized OAuth 2.0 scopes.While VerifyAPIKey is a valid security policy, this option misuses API key transmission practices and pairs it with policies designed for XML/SOAP schemas and browser cross-origin headers rather than JSON threat protection or OAuth authorization:
VerifyAPIKey via query parameters: Validates an application's API key, but transmitting keys in URLs exposes them in browser histories, server access logs, and URL scanners.SOAPMessageValidation: Validates XML payloads against an XSD schema and SOAP envelopes against a WSDL definition.CORS: Injects Cross-Origin Resource Sharing HTTP headers (such as Access-Control-Allow-Origin) for web browsers.VerifyAPIKey alone cannot validate OAuth 2.0 access tokens or enforce scopes like write:billing.SOAPMessageValidation is designed for XML and SOAP messages—not structural JSON limits such as nesting depth or string length, nor regex-based injection filtering.CORS policy: CORS controls which browser origins may read responses; it is a browser-enforced mechanism, not an access-control policy that validates OAuth scopes or blocks unauthorized server-to-server API callers.CORS policies can be bypassed entirely by non-browser clients such as curl or backend partner scripts.SOAPMessageValidation cannot protect against JSON-specific parser attacks.You were securing a browser-consumed SOAP/XML API that required cross-origin headers and XML schema validation alongside header-based API key checks.
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