guardian / frontend

The Guardian DotCom.
https://theguardian.com
Other
5.82k stars 556 forks source link

Use service account for connecting to Google Ad Manager API #27213

Closed Jakeii closed 4 weeks ago

Jakeii commented 1 month ago

What is the value of this and can you measure success?

Current authentication is tied to a user account of someone on the commercial team.

If for whatever reason their account is removed (when they leave) or they no longer need access to GAM (by changing teams) the credentials stop working and they need to be replaced.

This has happend a few times over the years, by changing to a service account we can stop this mildly inconvenient thing happening now and again!

What does this change?

Replace client id/secret and refresh token with a service account JSON file (still stored in parameter store).

The SDK will only accept a file path so the token is written as a temporary file and then cleaned up using the stop hooks.

Checklist

github-actions[bot] commented 1 month ago

Deploy build 2115 of dotcom:frontend-all to CODE

All deployment options - [Deploy build 2115 of `dotcom:frontend-all` to CODE](https://riffraff.gutools.co.uk/deployment/deployAgain?project=dotcom%3Afrontend-all&build=2115&stage=CODE&updateStrategy=MostlyHarmless&action=deploy) - [Deploy parts of build 2115 to CODE by previewing it first](https://riffraff.gutools.co.uk/preview/yaml?project=dotcom%3Afrontend-all&build=2115&stage=CODE&updateStrategy=MostlyHarmless) - [What's on CODE right now?](https://riffraff.gutools.co.uk/deployment/history?projectName=dotcom%3Afrontend-all&stage=CODE)

From guardian/actions-riff-raff.

prout-bot commented 4 weeks ago

Seen on ADMIN-PROD (merged by @Jakeii 12 minutes and 5 seconds ago)

prout-bot commented 4 weeks ago

Seen on FRONTS-PROD (merged by @Jakeii 13 minutes and 9 seconds ago)