This page walks you through deploying an App Engine standard or flexible environment application and securing it with Identity-Aware Proxy (IAP). The quickstart includes sample code for an App Engine standard environment web app that verifies a logged-in user's name.
If you plan to serve resources from a content delivery network (CDN), see the best practices guide for important information.
To secure resources not on Google Cloud, see Securing on-premises apps and resources.
Before you begin
To enable IAP for App Engine, you need the following:
- A Google Cloud console project with billing enabled.
If you don't have your App Engine instance set up already, see Deploying App Engine for a complete walkthrough.
IAP uses a Google-managed OAuth client to authenticate users. Only users within the organization can access the IAP-enabled application. If you want to allow access to users outside of your organization, see Enable IAP for external applications.
Enabling IAP
Console
The Google-managed OAuth client is not available when enabling IAP using the Google Cloud console.
gcloud
API
Test user authentication
Access the app URL from a Google account that you added to IAP with the IAP-secured Web App User role as described above. You should have unrestricted access to the app.
Use an incognito window in Chrome to access the app and sign in when prompted. If you try to access the app with an account that isn't authorized with the IAP-secured Web App User role, you'll see a message saying that you don't have access.
Next steps
- Set richer context rules by applying access levels.
- See access requests by enabling Cloud Audit Logs.
- Learn more about IAP.
- Learn about getting the user's identity and develop your own App Engine app.