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

Bucket Access with IAM role #95

Closed
damc-dev opened this issue Aug 19, 2021 · 4 comments · Fixed by #143
Closed

Bucket Access with IAM role #95

damc-dev opened this issue Aug 19, 2021 · 4 comments · Fixed by #143
Labels
question Further information is requested

Comments

@damc-dev
Copy link

Best practice is to use IAM role provided for S3 client access instead of providing access and secret keys.
Since S3 client instantiation provides explicit access and secret keys it takes precedence over IAM Role.
Should be fixable by not passing in the access and secret keys if environment variable is not set.

@QingWei-Li QingWei-Li added the question Further information is requested label Aug 19, 2021
@QingWei-Li
Copy link
Collaborator

Can you tell me exactly what to do, sorry I don’t understand IAM.

@okdas
Copy link

okdas commented Sep 14, 2021

@QingWei-Li I believe @damc-dev refers to how AWS API keys are getting populated. In AWS world, it is not necessary to provide AWS keys, but AWS SDK will pick up the role/instance profile/EKS-IRSA automatically. https://github.com/aws/aws-sdk-js-v3/tree/main/packages/credential-provider-node#aws-credential-provider-for-nodejs

I have not tested how notea behaves in this scenario. :)

@dcampoyil
Copy link

@QingWei-Li I can see this project is using already the aws-sdk as S3 client. I believe that if you make STORE_ACCESS_KEY and STORE_SECRET_KEY optional and don't add the credentials field when there are undefined, then aws-sdk will be able to pick the AWS credentials up from the role/instance profile/EKS-IRSA automatically.

Happy to help with code or testing if you want.

@QingWei-Li
Copy link
Collaborator

@dcampoyil Thanks! It would be better if you could help, I'm sorry I don't have time to study this yet

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

Successfully merging a pull request may close this issue.

4 participants