Cookie or header to send own API to prevent Google Cloud Identity Aware Proxy (IAP) 302?

Viewed 2819

I have setup Cloud IAP on a development environment (spun up with Kubernetes and using Let's Encrypt) and everything is working fine.

The setup is pretty basic for this app:

1) An API that has a number of REST endpoints and a persistent data store, in project A

2) A SPA front end app that utilizes said API, in a different project B

In my browser (tried Chrome and Firefox), I can authenticate my Google user in both apps via the IAP screen (by going to each domain in a browser tab), but once I try to use the SPA and it attempts requests to the API, I see the network requests 302 redirect to the Google IAP sign-in page.

Question: Is there a header or cookie that needs to be sent over via the API requests on behalf of the user so that IAP allows pass-thru?

Note I see these two cookies btw GCP_IAAP_AUTH_TOKEN and GCP_IAAP_XSRF_NONCE.

1 Answers
Related