Skip to content
This repository has been archived by the owner on Sep 24, 2021. It is now read-only.

allow usage of IMDSv2 #66

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

clhuang
Copy link

@clhuang clhuang commented Nov 1, 2020

Description of changes:
Current implementation panics at string(body[0 : len(body)-1]) if the instance requires IMDSv2, as the metadata endpoint returns status 401 and empty body. In this case, instead fetch the metadata token and use that to actually fetch the metadata.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@himberjack
Copy link

What's up with that? We really need this.
Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants