[
https://issues.apache.org/jira/browse/HDDS-525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16633910#comment-16633910
]
Elek, Marton commented on HDDS-525:
-----------------------------------
Thanks [~bharatviswa] the update. It looks good to me. And thanks to fix the
missing http/s related config keys in the default xml.
I found only one problem:
1. I tested it with docker and I realized that sometimes the filter is not
called. Especially if there is no mapping for the current url.
For example in case of http://vol1.bucket.host:1234/foo the filter won't be
called as there is no rest endpoint for the /foo (just for the /foo/bar) at
all. We need to annotate the VirtualHostStyleFilter with
javax.ws.rs.container.PreMatching annotation to execute it before the resource
method selection.
2. nit: The line with <name>ozone.s3g.keytab.file</name> is duplicated.
I also found 2 spaces which can be improved, but I suggest to do it in separate
jira (will open them):
a) the host HTTP header sometimes contains the port, sometimes not (with aws
cli we have the port, with mitm proxy we doesn't). Would be easier to remove it
anyway to make it easier to configure.
b) I found that we need to support an url scheme where the volume comes from
the domain (http://vol1.s3g/...) but the bucket is used as path style
(http://vol1.s3g/bucket). It seems that both goofys and the existing s3a unit
tests (not sure, but it seems) requires this schema.
But I would add these in followup jiras. I am +1 this patch if it contains the
the @PreMatching annotation.
> Support virtual-hosted style URLs
> ---------------------------------
>
> Key: HDDS-525
> URL: https://issues.apache.org/jira/browse/HDDS-525
> Project: Hadoop Distributed Data Store
> Issue Type: Sub-task
> Reporter: Elek, Marton
> Assignee: Bharat Viswanadham
> Priority: Major
> Attachments: HDDS-525.00.patch, HDDS-525.02.patch, HDDS-525.03.patch,
> HDDS-525.04.patch
>
>
> AWS supports to kind of pattern for the base url of the s3 rest api:
> virtual-hosted style and path-style.
> Path style: http://s3.us-east-2.amazonaws.com/bucket
> Virtual-hosted style: http://bucket.s3.us-east-2.amazonaws.com
> By default we support the path style method with the volume name in the url:
> http://s3.us-east-2.amazonaws.com/volume/bucket
> Here the endpoint url is http://s3.us-east-2.amazonaws.com/volume/ and the
> bucket is appended.
> Some of the 3rd party s3 tools (goofys is an example) Supports only the
> virtual style method. With goofys we can set a custom endpoint
> (http://localhost:9878) but all the other postfixes after the port are
> removed.
> It can be solved with using virtual-style url which also could include the
> volume name:
> http://bucket.volume..........com
> The easiest way is to support both of them is implementing a
> ContainerRequestFilter which can parse the hostname (based on a configuration
> value) and extend the existing url with adding the missing volume/bucket
> part.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]