manish dev
manish dev

Reputation: 97

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.

Upvotes: 2

Views: 3293

Answers (2)

Matthew Sachs
Matthew Sachs

Reputation: 1585

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.

Upvotes: 2

Maxim
Maxim

Reputation: 4431

Unfortunately, this is currently not possible to do using the gcloud CLI. There's a Feature Request for it here, in which you may show your interest by clicking on the star button next to the Issue ID. Other than that, the only way to generate the OAuth Client ID is through the Credentials page as per the documentation.

Upvotes: 0

Related Questions