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

IMDSv2 breaks plugin #87

Open
caspergasper opened this issue Apr 25, 2022 · 0 comments
Open

IMDSv2 breaks plugin #87

caspergasper opened this issue Apr 25, 2022 · 0 comments
Labels

Comments

@caspergasper
Copy link

Describe the bug
If IMDSv1 is disabled plugin doesn't work

To Reproduce
Steps to reproduce the behavior:

  1. Spin up ec2 instance with HttpTokens required

aws ec2 describe-instances --instance-ids <instance_id> | jq '.Reservations[0].Instances[0].MetadataOptions.HttpTokens'

Logs
yum repolist
Loaded plugins: extras_suggestions, langpacks, priorities, s3iam, update-motd
Could not access AWS credentials

Expected behavior
S3 repos to work

Additional context
Looking at the code I can't see any support for tokens, it just seems to use imdsv1:

def get_role(self):
    """Read IAM role from AWS metadata store."""
    request = urllib2.Request(
        urlparse.urljoin(
            "http://169.254.169.254",
            "/latest/meta-data/iam/security-credentials/"
        ))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant