takus / fluent-plugin-ec2-metadata

Fluentd output plugin to add Amazon EC2 metadata into messages
Other
44 stars 28 forks source link

migrate to IMDSv2 #47

Closed mtanda closed 4 years ago

mtanda commented 4 years ago

Use new Instance Metadata Service to get metadata.

https://aws.amazon.com/blogs/security/defense-in-depth-open-firewalls-reverse-proxies-ssrf-vulnerabilities-ec2-instance-metadata-service/

This change will help to disable IMDSv1 in the public instance. To keep compatible with ec2-classic environment, I add imdsv2 option.

mtanda commented 4 years ago

The GitLab check seems to not work.

cosmo0920 commented 4 years ago

Any chance to add testcases using VCR cassettes?

mtanda commented 4 years ago

@cosmo0920 I added test. Would you review the changes?

mtanda commented 4 years ago

@cosmo0920 Thanks for review :-) Would you check this again?

cosmo0920 commented 4 years ago

@takus GitLab CI seems not to be working. Could you take a look?

takus commented 4 years ago

@mtanda @cosmo0920 Thanks for letting me know. I temporally disabled the check by Gitlab. Since this pull request doesn't touch any dependencies, the risk for disabling the check is low. I'll investigate the Gitlab issue soon and enable it again.

cosmo0920 commented 4 years ago

OK. Then, let's merge this PR! Thank you for your contribution, @mtanda !

mtanda commented 4 years ago

Thank you for merge and help!