I am running cloud application on GCP using Cloudrun and ESPv2 as proxy (with gRPC transport layer). Currently I am using only Firebase for authenticating users in browser version of the app. But now I would like to open my app also for external clients, to allow them to work with my app's API. Ideally I would like to generate API Key for every client, which will enable access to my API for them. I found information about way of creating API keys here: https://cloud.google.com/docs/authentication/api-keys#creating_an_api_key
But unfortunatelly, I did not found any useful information how to integrate this with ESPv2.
Currently my ESP config looks like this:
rules:
- selector: "*"
requirements:
- provider_id: firebase
Is there any way of adding another provider_id for GCP Api Keys? Or if not, what is the best approach to handle this scenario? Ideally I would like to leave Firebase authentication like it is and add second auth option only through api key, so external users won't need to pass any JWT tokens but only access key.
