kahing / goofys

a high-performance, POSIX-ish Amazon S3 file system written in Go
Apache License 2.0
5.19k stars 520 forks source link

sts endpoint for non aws S3 (ceph) #667

Open caduceus24 opened 2 years ago

caduceus24 commented 2 years ago

It appears that the aws sdk for golang allows for custom sts endpoints when using iam roles:

https://docs.aws.amazon.com/sdk-for-go/api/aws/endpoints/

Is this available with Goofys? I want to set the sts endpoint to something in my own domain .. If so, how do I set it?

Thanks!

dannycjones commented 2 years ago

This might be a bit late for you but I'll share in case others have a similar question.

I don't see a way to set the STS endpoint for Goofys itself. A workaround if you're able to use the AWS configuration (typically at $HOME/.aws/config) would be to set the credential_process entry. The command provided would return credentials in a standard format. More information can be found here: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sourcing-external.html

Ultimately, we probably want to allow this to be configurable within Goofys. I see that Goofys does have code for using a custom STS endpoint but it doesn't expose it as a command line flag yet.

https://github.com/kahing/goofys/blob/829d8e5ce20faa3f9f6f054077a14325e00e9249/api/common/conf_s3.go#L37