mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 05:16:00 +03:00
[GH-ISSUE #1778] Use with IRSA #916
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#916
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 @shaunc on GitHub (Oct 13, 2021).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/1778
Additional Information
The following information is very important in order to help us to help you. Omission of the following details may delay your support request or receive no attention at all.
Keep in mind that the commands we provide to retrieve information are oriented to GNU/Linux Distributions, so you could need to use others if you use s3fs on macOS or BSD
Version of s3fs being used (s3fs --version)
1.85
Version of fuse being used (pkg-config --modversion fuse, rpm -qi fuse, dpkg -s fuse)
2.9.9
Kernel information (uname -r)
4.14.186-146.268.amzn2.x86_64
GNU/Linux Distribution, if applicable (cat /etc/os-release)
NAME="Ubuntu"
VERSION="20.04.3 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.3 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
Details about issue
I am looking for instructions for using with IRSA. In my pod container environment I have AWS_ROLE_ARN and AWS_WEB_IDENTITY_TOKEN_FILE. How can I get s3fs-fuse to consume these?
@gaul commented on GitHub (Oct 14, 2021):
Sorry I'm not familiar with with IRSA. Later versions of s3fs do support IMDSv2 -- does this work for you?
@nmeyerhans do you know anything about this?
@nmeyerhans commented on GitHub (Oct 14, 2021):
Yes, IRSA is "IAM Roles for Service Accounts". It lets an application obtain temporary IAM role credentials based on a token obtained from some OIDC provider. You can read about it at https://aws.amazon.com/blogs/opensource/introducing-fine-grained-iam-roles-service-accounts/ and the API you'd need to call is sts.AssumeRoleWithWebIdentity
The AWS C++ API supports this API. See its documentation for more details that might give some hints about how you might support it in s3fs.
@theis188 commented on GitHub (Dec 7, 2021):
Thanks for opening this issue, I would also find this feature useful.
@albpal commented on GitHub (Jun 14, 2022):
+1. This feature will help us also.
@aru-trackunit commented on GitHub (Sep 1, 2022):
+1
@bressanmarcos commented on GitHub (Oct 29, 2022):
👍 +1
@mak-454 commented on GitHub (Nov 4, 2022):
+1
@yao531441 commented on GitHub (Jan 17, 2023):
+1
@yukinakanaka commented on GitHub (Jan 18, 2023):
+1
@ggtakec commented on GitHub (Jan 22, 2023):
As one solution to this issue:
I have released the following source as a prototype few month ago.
https://github.com/ggtakec/s3fs-fuse-awscred-lib
You can refer to the README.md for how to build/use it.
This library is a DSO that wraps the
aws-sdk-cppauthentication functionality.The code in the master branch of s3fs-fuse includes an option(
credlib) to delegate authentication to an external DSO library.By specifying this library, I think that functions such as authentication tokens provided by AWS works.
If anyone has tried it, I'd love to know the results.
Could anyone use the code from the master branch of s3fs-fuse to try out the
libs3fsawscred.sofile that the above repository creates?@aidandj commented on GitHub (Jan 27, 2023):
I tried it and ended up needing to make these changes for it to work: https://github.com/artificialinc/s3fs-fuse/tree/aidan/ext-creds
It was failing early for me, and then the session token wasn't being set
@ggtakec commented on GitHub (Jan 29, 2023):
@artificial-aidan Thanks for your kindness.
As you pointed out, it was a buggy code.
I am creating a PR #2101 based on your code.(If merged, it will be reflected in the master code.)
If possible, please let me know about
It was failing earlythat you tried in your environment.I would like to know the log when the
dbglevel=info(andcurldbg: but this option makes log file large) option is given when starting s3fs.Also, although the log becomes complicated, if you add
credlib_opts=Infoalong withcredlib=libs3fsawscred.so, you can also record the trace log oflibs3fsawscred.so.@aidandj commented on GitHub (Jan 29, 2023):
Yeah I should be able to reproduce it. I will look back at my logs on Monday.
@aidandj commented on GitHub (Jan 30, 2023):
Reverting back to the old code was more work than I had time for.
I ran into 2 issues. The first was the error
could not determine how to establish security credentials.This is because when using IRSA, like ECS, we need to delay the loading of the credentials. This might cause issues if you were using the external library to load other credentials, I'm not sure. But for IRSA, it needs to be delayedThe second issue was the error message was when I actually got the creds, but then s3fs tried to make a call, and I got a permission denied error. This error turned out to be from not setting the session token.
Here is the output of a successful run:
@ggtakec commented on GitHub (Feb 5, 2023):
@artificial-aidan Sorry about the late reply.
Thank you for your great help.
Since there was a correction omission earlier, I corrected #2101 a little.
And I would like to reconfirm with you whether this problem still remains or not.
Did #2101(or the modified code you originally tried) solve this problems you had?
Or are you still getting
session token not set, etc?I would like to merge #2101 if it solves this problem.
If this problem still remains, I will prepare the environment to use IRSA and investigate, so it will take some time.
Thanks in advance for your assistance.
@aidandj commented on GitHub (Feb 5, 2023):
Let me try it out Monday.
The branch I shared was fully functional for me.
@ggtakec commented on GitHub (Feb 18, 2023):
@artificial-aidan
#2101 has been merged.
Please check and let me know if you have any problems.
@bmihaescu commented on GitHub (May 22, 2023):
@ggtakec I also have enabled IRSA on an EKS pod and it seems that it's still trying to get the role/credentials from instance metadata. What do I need to change to the s3fs command to use the changes you merged with #2101?
I use V1.92 version of s3fs
Thanks
@ggtakec commented on GitHub (Jun 4, 2023):
@bmihaescu
Currently, s3fs does not have IRSA authentication functionality.
Options(
credlibandcredlib_ops) added in #1927(#2101) are the ability to load external authentication libraries into s3fs.Currently, it seems that the only library that supports this is s3fs-fuse-awscred-lib.
For how to use this s3fs-fuse-awscred-lib library refer to its README.
This library uses the
aws-sdk-appand supports all authentication methods provided by AWS(except SSO).If you have any questions about this library, please open as an issue on s3fs-fuse-awscred-lib github.
Please let me know if I misunderstood your question.