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

enable IMDSv2 for linuxkit #3916

Open
kalyanim7 opened this issue Apr 3, 2023 · 0 comments
Open

enable IMDSv2 for linuxkit #3916

kalyanim7 opened this issue Apr 3, 2023 · 0 comments

Comments

@kalyanim7
Copy link

kalyanim7 commented Apr 3, 2023

Description

Recently , AWS enabled IMDSv2 authentication as mandatory and the existing instances which are using IMDS are highly vulnerable.

Steps to reproduce the issue:

Describe the results you received:

Ensure Instances are configured with IMDSv2


Describe the results you expected:
Code needs to be updated to enable IMDSv2 for this function,
https://github.com/linuxkit/linuxkit/blob/master/pkg/metadata/provider_aws.go#L79

TOKEN=curl -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600"
&& curl -H "X-aws-ec2-metadata-token: $TOKEN" -v http://169.254.169.254/latest/meta-data/

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-retrieval.html

Additional information you deem important (e.g. issue happens only occasionally):

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

No branches or pull requests

1 participant