繁体   English   中英

从 GCP 中的命令行获取客户端 ID

[英]Get the Client ID from the command line in GCP

我需要在 Google Cloud Platform 中使用 IAP 进行身份验证,但我无法获取保护 Airflow Web 服务器的代理的客户端 ID。

我需要一个命令来执行此操作,因为我无法使用服务帐户的JSON密钥。

不是通过 gcloud,但您可以尝试以下操作: curl --verbose https://url-for-your-app/ | grep Location: | sed 's/.*client_id=//' | sed 's/&.*//' curl --verbose https://url-for-your-app/ | grep Location: | sed 's/.*client_id=//' | sed 's/&.*//'

或者通过 gcloud,我认为gcloud compute backend-services describe显示出来

不幸的是,目前无法使用gcloud CLI 做到这gcloud 有一个功能要求它在这里,在其中您可以显示通过点击星号按钮的兴趣旁边的问题ID。 除此之外,生成 OAuth 客户端 ID 的唯一方法是根据文档通过凭据页面。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM