Reputation: 65
I have an API (AppEngine in Project 1) that calls out to another API (AppEngine in Project 2). Is it possible to restrict access to the API in AppEngine in Project 2, so that it can only be called from the AppEngine in Project 1.
Upvotes: 1
Views: 310
Reputation: 75715
You have to activate IAP on App Engine, and then to select the services on which you want to activate it.
Then, when you deploy a service on App Engine, you can now define an identity, i.e. the service account which is used by App Engine to generate an identity token.
Because the identity is unique to a service (for example Project 1), you can ONLY grant that identity the capacity to reach App Engine on Project 2.
Note: you can define service account per service and not per project. Here I mention the project because it was your example, but it can be service 1 that calls service 2 in the same project, and only service 2 is protected by IAP
Upvotes: 3