From users-return-7330-archive-asf-public=cust-asf.ponee.io@trafficserver.apache.org Fri Nov 2 17:23:05 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id DFCB218062B for ; Fri, 2 Nov 2018 17:23:04 +0100 (CET) Received: (qmail 24076 invoked by uid 500); 2 Nov 2018 16:23:03 -0000 Mailing-List: contact users-help@trafficserver.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@trafficserver.apache.org Delivered-To: mailing list users@trafficserver.apache.org Received: (qmail 24067 invoked by uid 99); 2 Nov 2018 16:23:03 -0000 Received: from mail-relay.apache.org (HELO mailrelay1-lw-us.apache.org) (207.244.88.152) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Nov 2018 16:23:03 +0000 Received: from mail-it1-f177.google.com (mail-it1-f177.google.com [209.85.166.177]) by mailrelay1-lw-us.apache.org (ASF Mail Server at mailrelay1-lw-us.apache.org) with ESMTPSA id 063E8205 for ; Fri, 2 Nov 2018 16:23:03 +0000 (UTC) Received: by mail-it1-f177.google.com with SMTP id h13so3917604itl.1 for ; Fri, 02 Nov 2018 09:23:02 -0700 (PDT) X-Gm-Message-State: AGRZ1gLIn9zTTYD/AHHuSUjD/hG/lofvLXs34UsPXGXEnqLWT5IInuDk n0pddaj79jT2X+eMLZN36zPZAx7Kc+0UvyihZg== X-Google-Smtp-Source: AJdET5fY4C0x6s507CEwkUK8oLAUW7LvT4wBMm8wzoL+0FIuqh3pRG5JEo3vtfKDP3RIAlC9R12cIuCDy1cOJjcsA00= X-Received: by 2002:a24:6757:: with SMTP id u84-v6mr394212itc.28.1541175782527; Fri, 02 Nov 2018 09:23:02 -0700 (PDT) MIME-Version: 1.0 References: <1541174575074-0.post@n7.nabble.com> In-Reply-To: <1541174575074-0.post@n7.nabble.com> From: Miles Libbey Date: Fri, 2 Nov 2018 09:22:51 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: ATS act as S3 endpoint? To: users@trafficserver.apache.org Content-Type: text/plain; charset="UTF-8" On Fri, Nov 2, 2018 at 9:03 AM Jin 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/