repositorypackage
0.0.0-20220928110626-eb41ae7f9cb2
Repository: https://github.com/higebu/iap-token.git
Documentation: pkg.go.dev
# README
iap-token
Generate Google Cloud Identity-Aware Proxy token with Impersonate Service Account
Install
go install github.com/higebu/iap-token@latest
Usage
export CLOUDSDK_AUTH_IMPERSONATE_SERVICE_ACCOUNT=user-sa-name@project-id.iam.gserviceaccount.com
export IAP_CLIENT_ID=xxxxx.apps.googleusercontent.com
curl -H "Authorization: Bearer $(iap-token)" https://example.com
# curl -H "Proxy-Authorization: Bearer $(iap-token)" https://example.com