/google-auth-bash

dancing with google microservices since 2024

Primary LanguageJavaScript

Poor Man's Google Service Account Key

this converts your service account JSON key into a curl that gets an access token for brute access to GCP APIs in places where it's unfeasible to drag @google-cloud/* libraries

Usage

use it in your god-awful bash scripts

  • token="$(./get-token.js ~/Downloads/service-account-xxxxx.json | sh | jq '.access_token')"
  • curl -H "Authorization: Bearer ${token}" https://....

Google products outside Cloud Platform