Identity-Aware Proxy overview

This page describes the basic concepts of Identity-Aware Proxy (IAP).

IAP lets you establish a central authorization layer for applications accessed by HTTPS, so you can use an application-level access control model instead of relying on network-level firewalls.

IAP policies scale across your organization. You can define access policies centrally and apply them to all of your applications and resources. When you assign a dedicated team to create and enforce policies, you protect your project from incorrect policy definition or implementation in any application.

When to use IAP

Use IAP when you want to enforce access control policies for applications and resources. IAP works with signed headers or the App Engine standard environment Users API to secure your app. With IAP, you can set up group-based application access: a resource could be accessible for employees and inaccessible for contractors, or only accessible to a specific department.

How IAP works

When an application or resource is protected by IAP, it can only be accessed through the proxy by members, also known as users, who have the correct Cloud Identity and Access Management (Cloud IAM) role. When you grant a user access to an application or resource by IAP, they're subject to the fine-grained access controls implemented by the product in use without requiring a VPN. When a user tries to access a IAP-secured resource, IAP performs authentication and authorization checks.

App Engine
diagram of request path to App Engine when using Cloud IAP
Compute Engine
diagram of request path to Compute Engine and Kubernetes Engine when using Cloud IAP
GKE
diagram of request path to Compute Engine and Kubernetes Engine when using Cloud IAP
On-premises
diagram of request path to an on-premises app when using Cloud IAP

Authentication

Requests to your Google Cloud resources come through App Engine or Cloud Load Balancing (HTTPS). The serving infrastructure code for these products checks if IAP is enabled for the app or backend service. If IAP is enabled, information about the protected resource is sent to the IAP authentication server. This includes information like the Google Cloud project number, the request URL, and any IAP credentials in the request headers or cookies.

Next, IAP checks the user's browser credentials. If none exist, the user is redirected to an OAuth 2.0 Google Account sign-in flow that stores a token in a browser cookie for future sign-ins. If you need to create Google Accounts for your existing users, you can use Google Cloud Directory Sync to synchronize with your Active Directory or LDAP server.

If the request credentials are valid, the authentication server uses those credentials to get the user's identity (email address and user ID). The authentication server then uses the identity to check the user's Cloud IAM role and check if the user is authorized to access the resource.

If you're using Compute Engine or Google Kubernetes Engine, users who can access the application-serving port of the Virtual Machine (VM) can bypass IAP authentication. Compute Engine and GKE firewall rules can't protect against access from code running on the same VM as the IAP-secured application. Firewall rules can protect against access from another VM, but only if properly configured. Learn about your responsibilities to ensure security.

Authorization

After authentication, IAP applies the relevant Cloud IAM policy to check if the user is authorized to access the requested resource. If the user has the IAP-secured Web App User role on the Cloud Console project where the resource exists, they're authorized to access the application. To manage the IAP-secured Web App User role list, use the IAP panel on the Cloud Console.

When you turn on IAP for a resource, it automatically creates an OAuth 2.0 client ID and secret. If you delete the automatically generated OAuth 2.0 credentials, IAP won't function correctly. You can view and manage OAuth 2.0 credentials in the Cloud Console APIs & services.

Your responsibilities

IAP secures authentication and authorization of all requests to App Engine or Cloud Load Balancing HTTP(S). IAP doesn't protect against activity within a project, such as another VM inside the project.

To ensure security, you must take the following precautions:

  • Configure your firewall and load balancer to protect against traffic that doesn't come through the serving infrastructure.
  • Use signed headers or the App Engine standard environment Users API.

What's next

هل كانت هذه الصفحة مفيدة؟ يرجى تقييم أدائنا:

إرسال تعليقات حول...

Identity-Aware Proxy Documentation