I have a Node.js/Express web app running on the Google Cloud Platform App Engine.

I'm restricting access to this application using the Identity Aware Proxy (IAP), so that only people in my company can access the website when they are logged on to Google using their corporate accounts.

This works great, only one thing annoys me:

For the OAuth 2 client that restricts the access, I have configured the URL of a privacy and data policy page which is linked from the Google login form that is shown to users when they try to access the website.

Google login form

This privacy page is also served by my web application, so when people who are not yet logged in click on the link presented on the login form, they are asked to log in to view the privacy page, since all my web app's pages are protected by the IAP. A chicken-and-egg type of problem.

Is there a way to exclude specific URLs from the IAP and allow access without logging in?


There's no exception you're asking about - at least there's no exception to that rule anywhere mentioned.

However you have several workarounds; you can:

  1. run second app in GAE just to serve your "policy rules" (pointless ??)
  2. serve static webpage with policy from a GCP VM (an overkill)
  3. serve policy from a GCP bucket (it would be my choice)
  4. serve policy from a 3rd party webserver (2nd best solution IMHO)

All of those solution require setting up a External HTTPS load balancer and use of Forwarding Rules to send all request for viewing policy to a proper endpoint.

  • Thanks for pointing out the workarounds, I'll try GCP bucket, then – Patrick Hund Oct 5 '20 at 13:35
  • Thanks for the confirmation ! – Wojtek_B Oct 6 '20 at 6:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.