How to test IAM permissions in GCP

How to Test Iam Permissions in GCP - for the current user

From cloud shell

curl -X POST \
-H "Authorization: Bearer "$(gcloud auth application-default print-access-token) \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
https://cloudresourcemanager.googleapis.com/v1/projects/project-id:testIamPermissions

From a Browser

POST https://cloudresourcemanager.googleapis.com/v1/projects/project-id:testIamPermissions

Summary

This is a quick recipe on how to test your current user's IAM permissions on GCP.

 
Need an experienced Cloud Professional to help out with your Public Cloud Strategy? Set up a time with Anuj Varma.

anuj

I am passionate about getting cloud solutions right the first time. I help customers transition to the public cloud with the appropriate security controls and guardrails. GCP, AWS and Azure Security Specialist. <a href="https://calendly.com/anujvarma/google-cloud-architect-initial-consultation">Initial Consultation</a>

Leave a reply

Your email address will not be published. Required fields are marked *