Securing a migrated web app with Identity-Aware Proxy

PCD By islever Editorial Last updated

Designing secure applications. Deploying applications to Cloud Run.

Short answer

B Configure Identity-Aware Proxy so employees authenticate with their corporate identity and reach the application through its public IP address without app code changes.

Question

Your web application is deployed to the corporate intranet. You need to migrate the web application to Google Cloud. The web application must be available only to company employees and accessible to employees as they travel. You need to ensure the security and accessibility of the web application while minimizing application changes. What should you do?
  1. Configure the application to check authentication credentials for each HTTP(S) request to the application.
  2. Configure Identity-Aware Proxy to allow employees to access the application through its public IP address. Correct Answer
  3. Configure a Compute Engine instance that requests users to log in to their corporate account. Change the web application DNS to point to the proxy Compute Engine instance. After authenticating, the Compute Engine instance forwards requests to and from the web application.
  4. Configure a Compute Engine instance that requests users to log in to their corporate account. Change the web application DNS to point to the proxy Compute Engine instance. After authenticating, the Compute Engine issues an HTTP redirect to a public IP address hosting the web application.

Key Takeaways

Identity-Aware Proxy is the right way to expose a migrated intranet web app to traveling employees: it authenticates each request against the corporate Google Workspace identity at the load balancer, so access stays employee-only over the public IP address with no application code changes. Option B wins because IAP enforces identity outside the app, while per-request credential checks, a Compute Engine login proxy, and a redirect to a public IP either rewrite the application or leave it publicly reachable.

Expert Analysis

B. IAP secures the migrated web app by authenticating via Google Workspace identity without VPN. VPN (A) requires client software. Cloud DNS (C) only resolves names. External LB (D) doesn't provide auth.

The deciding constraint is minimizing application changes while keeping the app available only to company employees who are traveling. Identity-Aware Proxy (IAP) enforces access at the Google Cloud load balancer tier, inserting the Google Workspace identity assertion into each proxied request, so the application code itself never has to verify credentials. That is precisely why option B holds: employees reach the app through its public IP address behind the HTTPS load balancer, IAP authenticates them against the corporate Workspace directory, and the on-premises intranet application needs no code changes beyond trusting a header from the proxy.

Option A fails the minimization requirement outright. Reconfiguring the application to check authentication credentials on every HTTP(S) request means rewriting the application's request handling — exactly the change the scenario forbids — and it leaves the authorization decision inside an app that has no knowledge of the corporate identity provider.

Option C builds a home-grown proxy on a Compute Engine instance: it prompts for a corporate login, then forwards traffic to and from the web application. This requires standing up and patching a VM, writing login and forwarding logic, and managing TLS and session state by hand — a far larger change footprint than IAP, and it still offers no per-request identity context to the backend. Option D is weaker still: after authenticating, the Compute Engine instance merely issues an HTTP redirect to a public IP address that hosts the web application, so once the redirect fires the browser talks directly to that public IP with no authentication layer left in the path. Any traveling user who learns or guesses the public IP bypasses the corporate login entirely, and the redirect itself leaks the destination address.

A mechanism this question relies on but never states: IAP is only available in front of an HTTPS load balancer backed by an App Engine, Cloud Run, or Compute Engine NEG/instance-group backend, and it requires the backend to be reachable from the Google Front End through a Server-Side NEGF. Once enabled, IAP verifies the signed identity header on every request and can be paired with an access policy listing Workspace groups, which is how "company employees only" is expressed as an allowlist rather than as code. For a migrated legacy web app, the standard path is an HTTPS LB with IAP enabled and the app configured to consume the x-goog-authenticated-user-email header, keeping application changes to a trusted-header check instead of a full authentication implementation.

So B satisfies all three constraints at once: employee-only access enforced by corporate identity, reachability for traveling users over the public internet without VPN client software, and near-zero application modification.

Official Reference

https://cloud.google.com/iap/docs/concepts-overview

This link opens the official vendor documentation in a new tab.

Exam Strategy

When a scenario stresses "minimizing application changes" alongside employee-only access, look for the option that moves authentication out of the application and into Google Cloud infrastructure — that pattern points to IAP or a managed identity layer, not to custom proxy code or app-level credential checks. Also watch for options that end in a redirect or a bare public IP: any control that stops protecting the traffic once the browser leaves the proxy is a red flag for access-control questions.

Practice All PCD Questions

Access 84 questions with complete answers and detailed explanations.

View Full PCD Practice Test →

← Back to PCD Study Guide