Identity-aware proxy: protect apps with user identity and access policy
Understand the request path through an identity-aware proxy, the backend-bypass risks to close, and how to verify the app's user identity and permissions.
Identity-aware proxy: protect apps with user identity and access policy
An identity-aware proxy (IAP) checks a requester's identity and an access policy before forwarding a request to a protected application. Instead of first placing a user on an internal network as a traditional VPN does, it can make an access decision for a particular app or resource. A proxy in front of an app does not make the app safe by itself: restrict direct access to the origin backend and make the application validate the identity asserted by the proxy.
A typical request flow
A user requests the URL of a protected app.
The proxy checks whether the user is authenticated and, if needed, redirects the browser through sign-in.
It evaluates the authenticated user, requested resource, and applicable policy to decide whether to allow access.
If allowed, it forwards the request to the backend. The app validates and uses the identity information supplied by the proxy.
Authentication failures and policy denials are blocked rather than passed through as ordinary app requests.
An IAP commonly provides identity-based authorization, but it does not replace origin-network firewalls, the app's own data permissions, or session lifecycle controls. If the app's own permission is narrower, the app should still check access to the specific resource after the proxy allows the request.
Checks before placing a proxy
**Block direct backend access.** Check whether a user can reach a VM port, container URL, or alternate domain without passing through the load balancer or proxy. A public endpoint that remains reachable can bypass proxy protection.
**Validate the asserted identity.** Do not trust ordinary user headers simply because they appear to come from the proxy. Google Cloud IAP documentation says the app should validate the signed `x-goog-iap-jwt-assertion` on each request; compatibility email and user-ID headers alone should not drive security decisions.
**Scope users and roles narrowly.** Define eligible people and work reasons for each resource instead of granting broad access to a whole group or organization.
**Review other access paths.** Document how jobs from internal VMs, batch processes, health checks, and administration tools interact with proxy policy.
**Check sessions and policy changes.** Verify when existing browser sessions, WebSockets, download links, and API requests stop working after a user loses access or a session expires.
**Plan for failures and audit.** Decide how to handle proxy, identity-provider, and backend outages, retries, operator access, user support, and audit records.
Google Cloud IAP as an example
Google Cloud Identity-Aware Proxy can provide a central authorization layer for HTTPS applications. It checks the signed-in principal's IAM policy before forwarding a request to a protected resource. Google documents support for Cloud Run, App Engine, Compute Engine, and GKE, as well as sign-in through Google Accounts, Workforce Identity Federation, and Identity Platform for customer identities. These are Google Cloud product details; they do not imply that every IAP or zero-trust network access service behaves the same way.
Backend reachability needs particular attention. For example, enabling IAP on a load balancer does not necessarily close a VM backend port that is directly reachable. For Cloud Run behind a load balancer, the auto-assigned URL may not be protected by IAP, depending on the configuration. Google's documentation advises restricting such direct paths and having the app use a signed assertion or a supported user-identity API. Before deployment, follow current service-specific documentation and verify each request path.
A safe pilot sequence
Select one low-impact app and list its public and direct backend paths.
With test users, verify successful sign-in, denial for an unauthorized user, access removal, an expired session, and attempts to bypass the proxy.
Confirm that the application uses validated proxy identity information and does not trust forged headers supplied by a client.
Limit exceptions for health checks and automated callers so they cannot reach sensitive user data.
Record a request ID that links authentication results to resource access in logs, and measure how long policy changes take to take effect.
If any path or bypass is unresolved, adjust ingress and firewall settings and check again before exposing the app broadly.
For example, when an internal support tool is placed behind a proxy, verify both that only authorized employees can sign in and that the origin URL is blocked. Customer records inside the tool may still need a separate permission check based on each employee's assigned work. This is a hypothetical example, not a report of a product deployment or test.
References
[Google Cloud Identity-Aware Proxy overview](https://docs.cloud.google.com/iap/docs/concepts-overview) — authentication and authorization flow, and backend direct-access precautions
[Getting the user's identity with IAP](https://docs.cloud.google.com/iap/docs/identity-howto) — signed JWT validation and compatibility-header cautions
[Securing your app with signed headers](https://docs.cloud.google.com/iap/docs/signed-headers-howto) — JWT verification requirements and bypass risks