This is a plugin for Insomnia that creates an OICD token for calling your services behind IAP using a sevice account credentials
Install the insomnia-plugin-googlejwt plugin from Preferences > Plugins
Add the Google JWT Creator template tag underneath the Authorization Bearer token spot
Fill in the target audience field, which is located in your Google Cloud Console.
- Go to Cloud IAP page.
- Find the resource you want to access, then click More > Edit OAuth Client
- On the Credentials page that appears, the "Client ID" is your Target Audience.
Fill in the credentials location with the fully unqualified location of your service account credentials.
That's it! 🎉