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

Viewed 1000

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?

1 Answers

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

Related