Skip to content

non amazonaws endpoint support (+ force PATH_STYLE)#505

Closed
blajoie wants to merge 1 commit into
samtools:masterfrom
blajoie:s3cmd_fix
Closed

non amazonaws endpoint support (+ force PATH_STYLE)#505
blajoie wants to merge 1 commit into
samtools:masterfrom
blajoie:s3cmd_fix

Conversation

@blajoie
Copy link
Copy Markdown

@blajoie blajoie commented Apr 8, 2017

Hi,

Using the new v1.4 (current master)

It looks like when both ~/.s3cfg and ~/.aws credentials exist, then ~/.aws credentials will be used and ~/.s3cfg will be ignored.

We (@NHJohnson, @egor-dolzhenko) have a need to use the new host_base value extracted from the ~/.s3cfg (for non amazonaws endpoint), but we also do not want to force users to remove/disable ~/.aws credentials (this looks to be the only way to force htslib to always read (host_base) from ~/.s3cfg?)

This PR makes a few changes to hfile_s3.c.

  1. always read from both ~/.s3cfg and ~/.aws/credentials, placing priority on ~/.aws for id/secret/token. This allows host_base to always be extracted and used. We are using a local S3 and specifying a non-amazonaws endpoint is required.
  2. Following the logic outlined here (Disable dns support for buckets when "host_bucket" hostname doesn't have a %(bucket)s item in it. s3tools/s3cmd#416), we also have the need to always force PATH_STYLE over VIRTUAL_STYLE urls. Our s3 resource does not support VIRTUAL_STYLE urls. To achieve this, a user can set host_base and host_bucket to be equal, which then forces PATH_STYLE urls within htslib.

Any feedback is welcomed!

Thanks

@blajoie
Copy link
Copy Markdown
Author

blajoie commented Apr 8, 2017

Sorry - just realized this was made to master instead of develop - will resubmit.

@blajoie blajoie closed this Apr 8, 2017
@blajoie blajoie deleted the s3cmd_fix branch April 8, 2017 01:23
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