简体   繁体   中英

How to know my Google Cloud Identity from the command line?

I'm running Python code on my computer that makes calls to Google Cloud Platform. I'm trying to know if my application is using my own credentials or service account keys to get authorizations on GCP.

On AWS, I could use aws sts get-caller-identity to know who the caller is (IAM user or IAM role).

Is there a GCP equivalent, something like gcloud whoami , that I could run from the command line or from my Python code itself to know the identity used by my application?

Use the command gcloud auth list in your cli to view the active credentials account.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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