mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 13:26:00 +03:00
[GH-ISSUE #1445] Support AWS IMDSv2 for role credentials #757
Labels
No labels
bug
bug
dataloss
duplicate
enhancement
feature request
help wanted
invalid
need info
performance
pull-request
question
question
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/s3fs-fuse#757
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @nmeyerhans on GitHub (Oct 9, 2020).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/1445
As described in AWS blog posts and documentation, the IMDSv2 is a revision of the EC2 instance metadata service that provides security benefits over the original metadata service.
The addition of IMDSv2 support to the ec2metadata command might serve as a useful example to illustrate the API changes. In the case of s3fs, if support for IMDS-compatible services outside of Amazon EC2 is desired, it may be necessary to fall back to IMDSv1 support in the event that the token API returns a 404. Alternatively, it might be reasonable to ask the user to explicitly choose to enable IMDSv2 support if it's desired.
@gaul commented on GitHub (Oct 10, 2020):
@nmeyerhans This seems straightforward to implement; would you like to submit a pull request?
@nmeyerhans commented on GitHub (Oct 10, 2020):
I have not started on the implementation, but I don't mind doing so. I'll try to get a PR to you in the next few days.
@gaul commented on GitHub (Sep 2, 2021):
@nmeyerhans Could you look at https://stackoverflow.com/questions/69031023/how-to-make-s3fs-use-imds-v2-when-mounting-s3-buckets-from-ec2-instance ?
@erka commented on GitHub (Sep 2, 2021):
@gaul it isn't fully supported. There is an issue with getting the ec2 role from metadata automatic. It is called without token and failed.
@nmeyerhans commented on GitHub (Sep 2, 2021):
@gaul I've posted an update on that stackoverflow post. It appears that
S3fsCurl::LoadIAMRoleFromMetaData()was never updated to include tokens, soiam_role=autodoesn't work if tokens are required. Explicitly specifying a role name should work.I can prepare a PR to fix
S3fsCurl::LoadIAMRoleFromMetaData()