Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add IMDSv2 support to AwsCandidateHarvester #294

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

Conversation

dsmeytis
Copy link

Hello, AWS recommend to disable IMDSv1 support for EC2 instances: https://aws.amazon.com/blogs/security/get-the-full-benefits-of-imdsv2-and-disable-imdsv1-across-your-aws-infrastructure/
However it breaks AwsCandidateHarvester functionality because REST endpoints it uses to detect EC2 and obtain private/public IPs become unavailable. I would like to propose the fix that will work for both IMDSv1 and IMDSv2:

  • doTestEc2() will now try to obtain an API token as EC2_TEST_URL is unavailable without a token.
  • added parameters to fetch() to set a method and pass required headers.

@jitsi-jenkins
Copy link

Hi, thanks for your contribution!
If you haven't already done so, could you please make sure you sign our CLA (https://jitsi.org/icla for individuals and https://jitsi.org/ccla for corporations)? We would unfortunately be unable to merge your patch unless we have that piece :(.

@dsmeytis
Copy link
Author

already signed

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

Successfully merging this pull request may close these issues.

2 participants