brucemcpherson / desktopliberation

hosting for desktop liberation google plus community
30 stars 1 forks source link

SuperFetch plugin – iam – how to authenticate to Cloud Run from Apps Script #133

Open brucemcpherson opened 2 years ago

brucemcpherson commented 2 years ago

SuperFetch plugin – iam – how to authenticate to Cloud Run from Apps Script

SuperFetch is a proxy for UrlFetchApp with additional features – see SuperFetch – a proxy enhancement to Apps Script UrlFetch for how it works and what it does. In this article I’ll cover how to use the SuperFetch api plugin to access IAM Service Account Credentials to authenticate with Cloud Run.

Motivation In a later article I’ll show how to use the SuperFetch gtb plugin for Gotenberg (converts pretty much anything to PDF files) running on Google Cloud Run

First though, let’s look at in general, how Cloud Run authentication works.

Background This was quite tricky to figure out, but thanks to fellow GDEs Spencer Easton and Ivan Kutil and this post by guillaume blaquiere I was able to add the technique to my SuperFetch library

https://ramblings.mcpher.com/apps-script/superfetch-proxy/plugin-iam/