This tool allows the generation of a Google ID Token from a service account json key. Such token can be used for authentication in GCP API Gateway and Cloud Endpoints. A valid token represents a legitimate service account.
Generating the token has two phases:
Generating a self-signed JWT with the service account private key.
Using the JWT to call OAuth2 Google endpoint to generate a token.
Installation
Install from source
go get github.com/pmorelli92/generetate-google-id-token
Usage
Flag
Description
Default
Required
saPath
Path to the service account json file.
X
scopes
Space separated list of JWT scopes.
X
expTime
Expiration time in format of nx where n can be any number and x can be s, m, h