stephenplusplus / google-auto-auth

Making it as easy as possible to authenticate a Google API request
MIT License
34 stars 9 forks source link

fix: check for proper response from metadata #24

Closed ofrobots closed 7 years ago

ofrobots commented 7 years ago

A missing path doesn't result in an error, but rather it results in a

  1. Properly handle such responses from the metadata service.
ofrobots commented 7 years ago

Working on a better alternative.

ofrobots commented 7 years ago

Re-opening in light of https://github.com/stephenplusplus/google-auto-auth/pull/25#issuecomment-323485512

ofrobots commented 7 years ago

You could argue that this validation belongs in gcp-metadata. That it should return non-error only when response is valid. I think that is semver major for gcp-metadata, and I would be happy to do this either way. LMK if you want me to open a PR there.

stephenplusplus commented 7 years ago

I like that idea-- putting the fix in over in gcp-metadata 👍

ofrobots commented 7 years ago

https://github.com/stephenplusplus/gcp-metadata/pull/5

stephenplusplus commented 7 years ago

Fix from https://github.com/stephenplusplus/gcp-metadata/pull/5 released under google-auto-auth@0.7.2