ruimarinho / gsts

Obtain and store AWS STS credentials to interact with Amazon services by authenticating via G Suite SAML.
MIT License
222 stars 38 forks source link

Potential upcoming breakage - Google blocking login automation? #37

Closed wryun closed 4 years ago

wryun commented 4 years ago

I've just noticed: https://developers.googleblog.com/2020/08/guidance-for-our-effort-to-block-less-secure-browser-and-apps.html

I added the following to gsts, as suggested for testing purposes:

  await page.setExtraHTTPHeaders({
    'Google-Accounts-Check-OAuth-Login': 'true'
  });

Seemed to cause things to fall over, but I may have made a mistake.

Not sure if this is an issue, but since I didn't see an existing one I thought I'd create it (even if it only needs to be closed).

ruimarinho commented 4 years ago

Oh, wow! Thanks for the heads up. Have you faced blocks already (without the header)?

wryun commented 4 years ago

Nope, it's been fine so far. Thanks very much for making this and making everything just work. I haven't had to think about how we auth to AWS for a while, which is a pleasant change (aws-google-auth fell over repeatedly, and I thought 'well, if we're using a real browser surely this will be fine for a while...').

ruimarinho commented 4 years ago

Glad you're enjoying this little tool! My goal was precisely that - to simply use the browser like a real human. In fact, my original idea was to simply point your existing Chrome profile user data dir and cookies would be re-used. Unfortunately, it seems headless mode was made made incompatible with existing profiles on purpose to avoid automation of this kind. It's a matter of time before Google blocks legitimate uses like this one, but let's enjoy it while it lasts! I'll do my best to keep it alive.