mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 05:16:00 +03:00
[PR #1462] [MERGED] Implement AWS IMDSv2 support #1996
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#1996
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?
📋 Pull Request Information
Original PR: https://github.com/s3fs-fuse/s3fs-fuse/pull/1462
Author: @nmeyerhans
Created: 10/29/2020
Status: ✅ Merged
Merged: 11/7/2020
Merged by: @gaul
Base:
master← Head:imdsv2📝 Commits (2)
4fe530bImplement AWS IMDSv2 supporta2ab4ebfixup! Implement AWS IMDSv2 support📊 Changes
5 files changed (+104 additions, -0 deletions)
View changed files
📝
doc/man/s3fs.1(+6 -0)📝
src/curl.cpp(+76 -0)📝
src/curl.h(+9 -0)📝
src/s3fs.cpp(+6 -0)📝
src/s3fs_help.cpp(+7 -0)📄 Description
Relevant Issue (if applicable)
#1445
Details
AWS IMDSv2 is a session oriented method for retrieving instance metadata,
including IAM credentials, in Amazon EC2. It is enabled by default in
non-enforcing mode in AWS (meaning it retains backwards compatibility with
existing IMDSv1 clients), but can be switched to enforcing mode, in which
clients are required to return API tokens with requests.
With this change, we implement support for IMDSv2 and enable it by default when
IAM roles are our source for authentication credentials. In the event that
s3fs is running in cloud environment offering an IMDSv1-compatible API, we
support graceful fallback to that mode. It can also be selected explicitly via
the imdsv1only mount option.
More details on IMDSv2 are available at
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-retrieval.html
and
https://aws.amazon.com/blogs/security/defense-in-depth-open-firewalls-reverse-proxies-ssrf-vulnerabilities-ec2-instance-metadata-service/
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.