I have a Cloud Run service running on /
.
I have a second Cloud Run service running on /admin
.
I'm using a HTTP global loadbalancer to be able to use a custom hostname. I want to protect /admin
with IAP. /
is public so IAP is off for that backend service.
I've configured the backend service to use IAP, which is working. However, when I go through the oauth consent screen, I get redirected to the root. That redirects me to the backend service where IAP is not enabled.
The root url gets a querystring like ?gcp-iap-mode=AUTHENTICATING&redirect_token_v2=...
that IAP is supposed to check an convert into a cookie on the custom hostname of my app.
In the console on the IAP page, I see the menu option for the backend service Go to OAuth configuration
. Going there I see options for redirects, but all the options are disable. On the top of the page is a message This automatically generated OAuth client ID is required for your project. It can't be modified.
What am I missing?