google-cloud-platformgoogle-iap

Get the Client ID from the command line in GCP


I need to authenticate using IAP in Google Cloud Platform, but I am not able to get the Client ID of the proxy that protects the Airflow web server.

I need a command to do so as I can't use the JSON keys of a service account.


Solution

  • Not through gcloud, but you could try something like: curl --verbose https://url-for-your-app/ | grep Location: | sed 's/.*client_id=//' | sed 's/&.*//'

    Or through gcloud, I think gcloud compute backend-services describe will show it.