I am using a custom DNS with Firebase Hosting to serve a web app, and also to rewrite traffic to a Cloud Run instance. I’ve set it up according to the docs (https://firebase.google.com/docs/hosting/cloud-run) and it is working nicely.
My problem begins when I select Require Authentication in the Cloud run instance. I’ve tried to set up an IAM principal with the Cloud Run Invoker role to all service accounts that seem related to Firebase, but it is not working for me.
Invoking the service using an access token via CLI is working properly, so I assume that I either didn’t select the proper service account of Firebase Hosting, or that it is impossible to set up.
How can I use Firebase Hosting rewrites and authenticate using IAM to my Cloud Run service?
Thanks
I’ve tried to invoke manually through CLI and it worked.
Also, I’ve tried to set all service accounts that has “Firebase” in their email to the cloud run invoker role, but it still didn’t work.
Imri is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.