On Fri, Nov 2, 2018 at 9:03 AM Jin <[email protected]> wrote: > > I am thinking to build something like this: > > clients -> ats server -> s3 (ceph, aws...) > > By doing this, users do not need to change existing code to use ats as > proxy. Instead, ats becomes an S3 endpoint. > > I have a working ats setup that clients may utilize ats as proxy to access > s3 store. > > curl -vx ats-server.corp.com http://s3-store.corp.com/bucket/object
A few thoughts: - I think curl assumes port 1080 if you don't specify one with -x. So, if ats-server.corp.com is running on port 80, you'd need curl -vx ats-server.corp.com:80 http://s3-store.corp.com/bucket/object - Is your Amazon bucket public? If not, you'll want the s3 plugin -- and if you have multiple buckets with different keys, you'll need different remaps for each to configure those secrets. - s3 will want the Host: header to be s3.amazonaws... so, need to check/override the https://docs.trafficserver.apache.org/en/8.0.x/admin-guide/files/records.config.en.html#proxy.config.url_remap.pristine_host_hdr if it's not the default. Seems like your remap rules would look like map http://s3-store.corp.com/private/bucket http://s3.amazonaws.com/private/bucket \ @plugin=s3_auth.so @pparam=--config @pparam= ... map http://s3-store.corp.com/public/bucket http://s3.amazonaws.com/public/bucket ... > Trying to work out several different remap rules but couldn't get it. Is it > possible that users do 'curl ats-server.corp.com/bucket/object' directly > with some remap rules? > > Thank you. > > > Jin. > > > > > > -- > Sent from: http://apache-traffic-server.24303.n7.nabble.com/
