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

Added feature to fetch s3 credential from aws provider chain #30

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

shhnwz
Copy link

@shhnwz shhnwz commented May 30, 2024

Introduced a new boolean server option "use_credential_provider", by default its set to FALSE. In case of TRUE, AWS credentials will be fetched through DefaultAWSCredentialProviderChain, and it follows the following credential probe order.

Default Credential Provider Chain

The default credential provider chain does the following:

    Checks your environment variables for AWS Credentials
    Checks your $HOME/.aws/credentials file for a profile and credentials
    Contacts and logs in to a trusted identity provider (Cognito, Login with Amazon, Facebook, Google). The sdk looks for the login information to these providers either on the environment variables: AWS_ROLE_ARN, AWS_WEB_IDENTITY_TOKEN_FILE, AWS_ROLE_SESSION_NAME. Or on a profile in your $HOME/.aws/credentials.
    Checks for an external method set as part of a profile on $HOME/.aws/config to generate or look up credentials that isn't directly supported by AWS.
    Contacts the ECS TaskRoleCredentialsProvider service to request credentials if Environment variable AWS_CONTAINER_CREDENTIALS_RELATIVE_URI has been set.
    Contacts the EC2MetadataInstanceProfileCredentialsProvider service to request credentials if AWS_EC2_METADATA_DISABLED is NOT set to ON.`

@ChuckHend
Copy link

This addresses #28

@shhnwz shhnwz marked this pull request as ready for review June 3, 2024 18:21
@shhnwz shhnwz changed the title WIP: Added feature to fetch s3 credential from aws provider chain Added feature to fetch s3 credential from aws provider chain Jun 3, 2024
@shhnwz
Copy link
Author

shhnwz commented Jun 3, 2024

Test Diffs with the with and without code changes.
regression_diff.zip

@ChuckHend
Copy link

@hrkuma, any chance we could get a review or discussion on this?

@ChuckHend
Copy link

We'd love to see this feature get moved forward and merged. In the meantime, we'll be running using this feature off this fork.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants