Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
En esta página, se describen las prácticas recomendadas para usar Identity-Aware Proxy (IAP).
Almacenamiento en caché
No utilices una CDN de terceros delante de tu aplicación. Las CDN pueden almacenar en caché contenido y entregar páginas almacenadas en caché a usuarios no autenticados.
Si tienes recursos grandes y no confidenciales que deseas entregar desde una CDN, usa un dominio independiente como images.yourapp.com para estos recursos. Usa la CDN con ese dominio y agrega el encabezado de respuesta HTTP Cache-control:
private a todos los objetos que solo se tengan que entregar a los usuarios autenticados.
Si deseas más protección, verifica la IP de origen de las solicitudes de tu aplicación para asegurarte de que correspondan al mismo rango de IP que permite la regla de firewall.
En la Google Cloud consola, IAP muestra un error o una advertencia si las reglas de firewall parecen estar configuradas incorrectamente. La consola de IAP Google Cloud no detecta qué VM se usa para cada servicio, por lo que el análisis de firewall no incluye funciones avanzadas, como redes no predeterminadas ni etiquetas de reglas de firewall. Para omitir este análisis, habilita IAP con el comando gcloud compute backend-services update.
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Información o código de muestra incorrectos","incorrectInformationOrSampleCode","thumb-down"],["Faltan la información o los ejemplos que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-09-04 (UTC)"],[[["\u003cp\u003eIdentity-Aware Proxy (IAP) best practices are outlined on this page, including caching, securing applications, and firewall configuration.\u003c/p\u003e\n"],["\u003cp\u003eAvoid using third-party CDNs directly in front of applications protected by IAP to prevent serving cached content to unauthenticated users.\u003c/p\u003e\n"],["\u003cp\u003eTo properly secure applications, use signed headers for App Engine standard environment, Compute Engine, and GKE.\u003c/p\u003e\n"],["\u003cp\u003eEnsure all requests to Compute Engine or GKE are routed through the load balancer and verify traffic is from a Google Front End (GFE) IP.\u003c/p\u003e\n"],["\u003cp\u003eIAP will display errors or warnings if firewall rules appear to be set incorrectly, however, not all advanced features are detectable.\u003c/p\u003e\n"]]],[],null,["# Best practices\n\nThis page describes best practices for using Identity-Aware Proxy\n(IAP).\n\nCaching\n-------\n\n- Don't use a third-party CDN in front of your application. CDNs may cache content and serve cached pages to unauthenticated users.\n - If you have large, non-sensitive resources that you want to serve from a CDN, use a separate domain such as `images.yourapp.com` for these resources. Use the CDN with that domain and add the `Cache-control:\n private` HTTP response header to all objects that should only be served to authenticated users.\n\nSecuring your app\n-----------------\n\nTo properly secure your app, you must use [signed headers](/iap/docs/signed-headers-howto)\nfor [App Engine standard environment](/appengine/docs/about-the-standard-environment),\nCompute Engine, and GKE applications.\n\nConfiguring your firewall\n-------------------------\n\n- Make sure all requests to Compute Engine or GKE are routed through the load balancer:\n - [Configure a firewall rule to allow health checking](/load-balancing/docs/health-checks) and make sure that all traffic to your Virtual Machine (VM) is from a Google Front End (GFE) IP.\n - For additional protection, check the source IP of requests in your app to make sure they're from the same IP range that the firewall rule allows.\n- In the Google Cloud console, IAP displays an error or warning if your firewall rules appear to be set up incorrectly. The IAP Google Cloud console doesn't detect which VM is used for each service, so the firewall analysis doesn't include advanced features like non-default networks and firewall rule tags. To bypass this analysis, enable IAP through the `gcloud compute backend-services update` command."]]