- We are authenticated using
impersonating-service-account
impersonating-service-account
is granted roleService Account Token Creator
permissions on a service accounttarget-service-account
target-service-account
has permission to read from a bucketimpersonating-service-account
has no permission to read from this bucketimpersonating-service-account
impersonates thetarget-service-account
to enumerate the contents of a bucket.
To test locally :
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/impersonating-service-account-key.json
export TARGET_SERVICE_ACCOUNT=target-service-account@yourproject.iam.gserviceaccount.com
go run ./main.go