-
Notifications
You must be signed in to change notification settings - Fork 656
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
Fallback to anonymous credentials in S3 client #3992
Conversation
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
Nice point. However, I'm not understanding why it should happen. when the anonymous is specified this branch should be taken that uses the nextflow/plugins/nf-amazon/src/main/nextflow/cloud/aws/nio/S3FileSystemProvider.java Lines 838 to 839 in 1daebee
Also worth adding an integration tests in the |
I guess it's because the nextflow/plugins/nf-amazon/src/main/nextflow/cloud/aws/nio/S3FileSystemProvider.java Lines 836 to 840 in 1daebee
As for the e2e test, how would we negate the CI runner's AWS creds before running the test? |
I see, you're talking about |
Since I'll be out, if you can get it to work, a simple e2e test would be: println file('s3://ngi-igenomes/igenomes/Homo_sapiens/Ensembl/GRCh37/Annotation/README.txt').text |
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Ok, added the integration tests and refactored the anonymous class to |
This commit fixed the access to public AWS S3 buckets when no AWS credentials are available in the hosting environment. It uses a custom credentials provider that fallbacks to `AnonymousAWSCredentials` class when no creds are detected. Signed-off-by: Ben Sherman <bentshermann@gmail.com> Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com> Co-authored-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Where is the integration test? I don't see it in the PR |
You are right. It went lost 👉 680f0a9 |
@pditommaso should we deprecate the |
I still can be useful to avoid the normal auth flow when using non-aws cloud, I guess |
…o#3992) This commit fixed the access to public AWS S3 buckets when no AWS credentials are available in the hosting environment. It uses a custom credentials provider that fallbacks to `AnonymousAWSCredentials` class when no creds are detected. Signed-off-by: Ben Sherman <bentshermann@gmail.com> Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com> Co-authored-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Close #3989
Based on the default S3 credentials provider, which uses the default provider chain with a fallback to anonymous credentials. Since Nextflow doesn't use the default provider chain anymore, I think we have to add this fallback ourselves.