Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B1F34200D3D for ; Mon, 13 Nov 2017 15:19:13 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id AF2F6160BE4; Mon, 13 Nov 2017 14:19:13 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 822A8160BF3 for ; Mon, 13 Nov 2017 15:19:12 +0100 (CET) Received: (qmail 21083 invoked by uid 500); 13 Nov 2017 14:19:11 -0000 Mailing-List: contact users-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@cloudstack.apache.org Delivered-To: mailing list users@cloudstack.apache.org Received: (qmail 20997 invoked by uid 99); 13 Nov 2017 14:19:10 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Nov 2017 14:19:10 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id E34D4180840; Mon, 13 Nov 2017 14:19:09 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.3 X-Spam-Level: X-Spam-Status: No, score=0.3 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id P2J8CXkLJxRT; Mon, 13 Nov 2017 14:19:02 +0000 (UTC) Received: from se01-out.mail.pcextreme.nl (se01-out.mail.pcextreme.nl [185.66.251.200]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id AF2E15F569; Mon, 13 Nov 2017 14:19:01 +0000 (UTC) Date: Mon, 13 Nov 2017 15:18:42 +0100 (CET) From: Wido den Hollander To: dev@cloudstack.apache.org, users@cloudstack.apache.org, Pierre-Luc Dion Message-ID: <155403812.4713.1510582722328@ox.pcextreme.nl> In-Reply-To: References: <1750999994.6369.1509476065042.JavaMail.zimbra@li.nux.ro> <1778806379.4501.1510211582337@ox.pcextreme.nl> <1657929870.1138.1510253995466.JavaMail.zimbra@li.nux.ro> <940185856.4522.1510296264699@ox.pcextreme.nl> <580263127.4633.1510324476134@ox.pcextreme.nl> <2102575241.1695.1510328187286.JavaMail.zimbra@li.nux.ro> Subject: Re: HTTPS LB and x-forwarded-for MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Priority: 3 Importance: Medium X-Mailer: Open-Xchange Mailer v7.8.3-Rev22 X-Originating-Client: open-xchange-appsuite X-Originating-IP: 2a00:f10:400:2:425:b2ff:fe00:1c1 X-SpamExperts-Domain: out.pcextreme.nl X-SpamExperts-Username: 2a00:f10:400:2:425:b2ff:fe00:1c1 Authentication-Results: mail.pcextreme.nl; auth=pass smtp.auth=2a00:f10:400:2:425:b2ff:fe00:1c1@out.pcextreme.nl X-SpamExperts-Outgoing-Class: ham X-SpamExperts-Outgoing-Evidence: SB/global_tokens (0.00727283661395) X-Recommended-Action: accept X-Filter-ID: EX5BVjFpneJeBchSMxfU5vkKLJzGhzzpAhASBeHk6W7j1g3/PwYZaTCzSym8uE9HFRq5nvK+I4VM Qe8lsXPFV09zCWuhlyreXLJKAJ4ekgV2krQR5JtPe5SDqFOQHN8WfVA/fPoFXyzEJTT8evgprrNN oKBfIk3tf1EMKXAUn7hMc1rc4c8gTdWHq8LmAzmxVI3xhdlnT1QkJGn7obvRnxI7+ctq55o3paXd 8fRhMeWSa2gLS857IxRqB1DzTxMLD2XMeQGVQYpeVvZJYW5yppW9Jpe8cOmywk/kVmAxWzAif6RK Y0jj73EtCvgIX8qE6X9gO+9iGYpNt5JUNShZQDlZxSuF283QYfU4Ni/WV6HMJ1FN3Akvhf7CDT3a RtZS3hVUrkBsjmn+boOlpjWRJGnP4fM8Re4C/2z1wTPNhpijNQQluq2s/SR5WtHDyzEZQSonZiFo dgo9fgcdxbh+YkjJJv4h1sxfrADXgpCmiAGRERvFGB2C4PIsYH9TzJm8aaBZ7XV1CHHn3sMPKS1q Yp4GB/vOcTtWJTYLKoI5MQjbdYWZ/x+YqveaPZoICKmvcxw3qqhc+N6cuEg4XWh5FjQMM5IpKtVL LAXl2cBhb97jPzyrAz03AeYtDc7QxFtTV9x0KdLjoJ//quFCmLZTN4F0VDlIE1MZdT81Ah127Zpz kaDNNeSg0LwTlajwGL5ltakHktpVlCs+m/uK8NJpSkXHTK2lBqs57HIc9EHkGZpLsD+TKfp5FG6d SlH8TdCEGlHXyPw52IzMwuf0UAxme0UEPgbWYWfkgo+hMa1K/+z+QKRqwzl+qGU1dCmePZ2L2whT VVQKiiFtcAKY7E0oMhtAe6O0b1yMTt5BsJqr1NCC6g1lgmAs18pG7ls6dk/0XPWlFdaGOH191uXj gjQN/W+tRDyRWX527aRQTb9BJ8uycTyze0JWCLk/DGGKaOZWBPrZEjtMCvIoNbbfX56Zusj3jf19 mXHQVH6R+DBAjem0+chAlTJ0TBaLLx+hijkH48p0NnIuLsHt9CUAA7rXL9EVjOklEz4aoTGVnwKP NZiAdnDtU06FkUB8dxnUnm2plIHzdgEhLXE87ngtim19Vc4jAeV7LVcf12qMUwcbz3jEcFcRvMlm 94l6353EReBx X-Report-Abuse-To: spam@semaster01.mail.pcextreme.nl archived-at: Mon, 13 Nov 2017 14:19:13 -0000 > Op 13 november 2017 om 15:14 schreef Pierre-Luc Dion = : >=20 >=20 > Hi, >=20 > This is looking quite promising, I have a colleague that tested that last > Friday, look like the proxy proto v1 work out of the box with Nginx, but > would need an extra package for Apache 2.4 ? It depends. You need HTTPd 2.4.28, see: https://httpd.apache.org/docs/trunk= /mod/mod_remoteip.html#remoteipproxyprotocol It's there upstream, but not in all packages.=20 It can from this module: - https://github.com/roadrunner2/mod-proxy-protocol - https://roadrunner2.github.io/mod-proxy-protocol/mod_proxy_protocol.html They donated the code to go upstream and went into mod_remoteip but landed = in 2.4.28 It will probably make it into Ubuntu 18.04 and CentOS 7.4. Wido > Otherwise, it seems to be a good way to do https LB without complicated > configuration and huge changes in CloudStack. >=20 >=20 >=20 > On Fri, Nov 10, 2017 at 10:36 AM, Nux! wrote: >=20 > > Pierre-Luc, > > > > Haproxy docs say it should work for any kind of traffic as long as both > > ends are PROXY-aware and it look like a majority of software is. > > So, in short, yes. > > > > -- > > Sent from the Delta quadrant using Borg technology! > > > > Nux! > > www.nux.ro > > > > ----- Original Message ----- > > > From: "Pierre-Luc Dion" > > > To: "Wido den Hollander" > > > Cc: "dev" , "Khosrow Moossavi" < > > kmoossavi@cloudops.com>, "Will Stevens" > > > , "Nux!" , "users" < > > users@cloudstack.apache.org> > > > Sent: Friday, 10 November, 2017 15:32:38 > > > Subject: Re: HTTPS LB and x-forwarded-for > > > > > Hi Wido, do you know if this would work for https traffic too? > > > > > > Le 10 nov. 2017 09 h 35, "Wido den Hollander" a =C3= =A9crit : > > > > > >> > > >> > Op 10 november 2017 om 14:27 schreef Pierre-Luc Dion < > > pdion@cloudops.com > > >> >: > > >> > > > >> > > > >> > I kind of like the proxy backend type, ill check on our end if tha= t > > would > > >> > work but definitely a simple and efficient approach! > > >> > > > >> > > >> See: https://www.haproxy.com/blog/haproxy/proxy-protocol/ > > >> > > >> Apache HTTPd supports PROXY since 2.4.28: > > https://httpd.apache.org/docs/ > > >> trunk/mod/mod_remoteip.html#remoteipproxyprotocol > > >> > > >> "RemoteIPProxyProtocol is only available in httpd 2.4.28 and newer" > > >> > > >> Wido > > >> > > >> > > > >> > > > >> > Le 10 nov. 2017 01 h 44, "Wido den Hollander" a > > =C3=A9crit : > > >> > > > >> > > > > >> > > > Op 9 november 2017 om 19:59 schreef Nux! : > > >> > > > > > >> > > > > > >> > > > Wido, > > >> > > > > > >> > > > Excellent suggestion with the "transparent proxy", I was not > > aware of > > >> > > that. > > >> > > > I think that would be a great idea and wouldn't require too ma= ny > > >> > > modifications, especially as Haproxy comes already with the VR. > > >> > > > > > >> > > > > >> > > It's indeed just a matter of a HAProxy config setting. We could > > make it > > >> > > configurable per backend in HAProxy. Regular HTTP, TCP or PROXY = for > > >> example. > > >> > > > > >> > > That way your problem would be solved. > > >> > > > > >> > > Wido > > >> > > > > >> > > > To Paul: > > >> > > > - imho the LB solution ACS ships now is a bit handicaped since > > you do > > >> > > not know the remote host ip. You're flying blind unless you use > > google > > >> > > analytics (and these things have gotten more and more aggressive= ly > > >> filtered > > >> > > by adblocks). > > >> > > > Enhancing Haproxy as Wido suggested would go a long way, it > > wouldn't > > >> > > break existing functionality and would also keep SSL processing = off > > >> the VR. > > >> > > > > > >> > > > -- > > >> > > > Sent from the Delta quadrant using Borg technology! > > >> > > > > > >> > > > Nux! > > >> > > > www.nux.ro > > >> > > > > > >> > > > ----- Original Message ----- > > >> > > > > From: "Andrija Panic" > > >> > > > > To: "users" > > >> > > > > Cc: "Khosrow Moossavi" , "Will > > Stevens" < > > >> > > wstevens@cloudops.com>, "dev" > > >> > > > > , "Pierre-Luc Dion" < > > pdion@cloudops.com > > >> > > > >> > > > > Sent: Thursday, 9 November, 2017 13:10:58 > > >> > > > > Subject: Re: HTTPS LB and x-forwarded-for > > >> > > > > > >> > > > > Wido, > > >> > > > > > > >> > > > > backend servers are not Linux only, for example we have a to= n of > > >> > > Windows > > >> > > > > customers, some WEB solutions / IIS etc... > > >> > > > > > > >> > > > > @all - If we try to please/solve everyone's proxying > > >> > > solution/requirement - > > >> > > > > this is impossible IMHO - I'm thinking more about some "do i= t as > > >> you > > >> > > like" > > >> > > > > solution, to let customer write his own haproxy config and > > upoad it > > >> > > (for > > >> > > > > example, or something better?). > > >> > > > > > > >> > > > > We can support newer version of haproxy (1.5+) which also > > implement > > >> > > > > "transarent proxy" (integrate with kernel so to speak) to a= llow > > >> > > TCP-level > > >> > > > > connections to backend (TCP mode, not HTTP mode) but to stil= l > > >> > > "preserve" > > >> > > > > remote IP by faking it (fake soruce IP =3D transarent proxy)= . > > >> > > > > > > >> > > > > For the rest of configuration options, I would leave it to = the > > >> > > customer > > >> > > > > how he/she wants to configure rest of haproxy configuration, > > >> inlcuding > > >> > > > > custom checks, etc. Haproxy configuration is never-ending st= ory, > > >> and we > > >> > > > > probably should allow custom sripts/configuration instead of > > >> trying to > > >> > > > > provide GUI/API way to configure everything (which is > > >> impossible...) > > >> > > > > > > >> > > > > Just my 2 cents... > > >> > > > > > > >> > > > > On 9 November 2017 at 08:13, Wido den Hollander > > > > >> > > wrote: > > >> > > > > > > >> > > > >> > > >> > > > >> > Op 8 november 2017 om 14:59 schreef Pierre-Luc Dion < > > >> > > pdion@cloudops.com > > >> > > > >> >: > > >> > > > >> > > > >> > > > >> > > > >> > > > >> > Same challenge here too! > > >> > > > >> > > > >> > > > >> > Let's look at improving Load-balancing offering from > > >> cloudstack, I > > >> > > guest > > >> > > > >> we > > >> > > > >> > should do a feature spec draft soon.., from my perspecti= ve, > > >> doing > > >> > > SSL > > >> > > > >> > offload on the VR could be problematic if the VR spec if = too > > >> small, > > >> > > and > > >> > > > >> the > > >> > > > >> > default spec of the VR being 1vcpu@256MB, considering it = can > > >> be the > > >> > > > >> router > > >> > > > >> > of a VPC, doing VPN termination, adding HTTPS is a bit > > ish... > > >> What > > >> > > would > > >> > > > >> > be your thought about this ? > > >> > > > >> > > > >> > > > >> > I'd be curious to have a LB offering in ACS where it woul= d > > >> deploy a > > >> > > > >> > redundant traefik[1] beside the VR for doing http and htt= ps > > >> > > > >> Load-balancing. > > >> > > > >> > I think it would also be useful if the API of that traefi= k > > >> instance > > >> > > would > > >> > > > >> > be available from within the VPC or LBnetwork so is API > > would be > > >> > > > >> accessible > > >> > > > >> > to other apps orchestration tools such as kubernetes or > > >> rancher. > > >> > > > >> > > > >> > > > >> > traefik or not, here is what I think is needed by cloudst= ack > > in > > >> the > > >> > > LB > > >> > > > >> > improvement: > > >> > > > >> > > > >> > > > >> > - support http, https (X-Forwarded-For) > > >> > > > >> > > >> > > > >> HAProxy also supports the PROXY protocol towards the backen= ds. > > >> Apache > > >> > > > >> 2.4.22 supports this natively and Varnish for example can a= lso > > >> talk > > >> > > PROXY. > > >> > > > >> > > >> > > > >> It adds a littlebit of metadata to the connection so that t= he > > >> backend > > >> > > > >> knows the original IP the connection came from for example: > > >> > > > >> https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt > > >> > > > >> > > >> > > > >> Wido > > >> > > > >> > > >> > > > >> > - basic persistence tuning (API already exist) > > >> > > > >> > - better backend monitoring, currently only a tcp connect > > >> validate > > >> > > if the > > >> > > > >> > webserver is up. > > >> > > > >> > - ssl offload > > >> > > > >> > - metric collection, more stats, maybe just export the to= ol > > >> status > > >> > > page > > >> > > > >> to > > >> > > > >> > the private network. > > >> > > > >> > - Container world support, right now if you have Rancher = or > > >> > > kubernetes > > >> > > > >> > cluster, you need to deploy your own LB solution behing > > >> mostlikely a > > >> > > > >> static > > >> > > > >> > nat., If cloudstack would deploy a traefik instance, Kub = or > > >> Rancher > > >> > > could > > >> > > > >> > reuse this instance and managed it to properly do LB betw= een > > >> > > containers. > > >> > > > >> > > > >> > > > >> > > > >> > > > >> > What would be your prefered LB tool: > > >> > > > >> > haproxy, traefik or nginx? > > >> > > > >> > > > >> > > > >> > CloudStack already have to code to handle SSL certs per > > >> projects and > > >> > > > >> > accounts if not mistaking because that code was added to > > support > > >> > > > >> NetScaler > > >> > > > >> > as Load-balancer in the past. so one less thing to think > > about > > >> :-) > > >> > > > >> > > > >> > > > >> > > > >> > > > >> > [1] https://traefik.io/ > > >> > > > >> > > > >> > > > >> > > > >> > > > >> > PL, > > >> > > > >> > > > >> > > > >> > > > >> > > > >> > > > >> > > > >> > On Mon, Nov 6, 2017 at 7:10 AM, Nux! wrot= e: > > >> > > > >> > > > >> > > > >> > > Thanks Andrija, > > >> > > > >> > > > > >> > > > >> > > LB outside of the VR sounds like a good idea. An applia= nce > > >> based > > >> > > on, > > >> > > > >> say > > >> > > > >> > > cloud-init + ansible and so on could do the trick; alas > > it'd > > >> need > > >> > > to be > > >> > > > >> > > outside ACS. > > >> > > > >> > > I guess as users we could maybe come up with a spec for= an > > >> > > > >> improvement, at > > >> > > > >> > > least we'd have something the devs could look at whenev= er > > it > > >> is > > >> > > > >> possible. > > >> > > > >> > > > > >> > > > >> > > Regards, > > >> > > > >> > > Lucian > > >> > > > >> > > > > >> > > > >> > > -- > > >> > > > >> > > Sent from the Delta quadrant using Borg technology! > > >> > > > >> > > > > >> > > > >> > > Nux! > > >> > > > >> > > www.nux.ro > > >> > > > >> > > > > >> > > > >> > > ----- Original Message ----- > > >> > > > >> > > > From: "Andrija Panic" > > >> > > > >> > > > To: "dev" > > >> > > > >> > > > Cc: "users" > > >> > > > >> > > > Sent: Thursday, 2 November, 2017 23:21:37 > > >> > > > >> > > > Subject: Re: HTTPS LB and x-forwarded-for > > >> > > > >> > > > > >> > > > >> > > > We used to make some special stuff for one of the > > clients, > > >> > > where all > > >> > > > >> LB > > >> > > > >> > > > configuration work is done from outside of the ACS, i= .e. > > >> python > > >> > > > >> script to > > >> > > > >> > > > feed/configure VR - install latest haproxy 1.5.x for > > >> transparent > > >> > > > >> proxy, > > >> > > > >> > > > since client insisted on SSL termination done on back= end > > >> web SSL > > >> > > > >> > > servers.... > > >> > > > >> > > > Not good idea, that is all I can say (custom > > configuration > > >> > > thing) - > > >> > > > >> but > > >> > > > >> > > the > > >> > > > >> > > > LB setup is actually good - transparent mode haproxy, > > works > > >> on > > >> > > TCP > > >> > > > >> level, > > >> > > > >> > > > so you can see "real client IP" on the backend server= s > > >> (which > > >> > > must > > >> > > > >> use VR > > >> > > > >> > > > as the default gtw, as per default, so the whole setu= p > > works > > >> > > > >> properly). > > >> > > > >> > > > > > >> > > > >> > > > I'm still looking forward to see some special support= of > > LB > > >> > > inside > > >> > > > >> VR via > > >> > > > >> > > > ACS - proper LB setup inside VR via GUI/API - i.e. t= o > > >> enable LB > > >> > > > >> > > > provisioning SCRIPT (bash, or whatever), where all > > needed > > >> > > > >> > > > install+configure can be done from client side - > > otherwise > > >> > > covering > > >> > > > >> all > > >> > > > >> > > > user cases, with proper HTTP checks and similar....is > > >> > > impossible to > > >> > > > >> do > > >> > > > >> > > > IMHO. > > >> > > > >> > > > > > >> > > > >> > > > Some other clients, actually have internal FW applian= ce > > >> (i.e. > > >> > > > >> multihomed > > >> > > > >> > > > VM, acting as gtw for all VMs in all networks), and > > haproxy > > >> > > instaled > > >> > > > >> on > > >> > > > >> > > > this device (with NAT configured from VR to this inte= rnal > > >> > > FW/VM, so > > >> > > > >> > > remote > > >> > > > >> > > > IP can be seen properly) - this setup is fully under > > >> customer > > >> > > > >> control, > > >> > > > >> > > and > > >> > > > >> > > > can provide any kind of special haproxy config... > > >> > > > >> > > > > > >> > > > >> > > > > > >> > > > >> > > > > > >> > > > >> > > > > > >> > > > >> > > > > > >> > > > >> > > > > > >> > > > >> > > > On 31 October 2017 at 19:54, Nux! wro= te: > > >> > > > >> > > > > > >> > > > >> > > >> Hello, > > >> > > > >> > > >> > > >> > > > >> > > >> Of the people running an LB (VR) with https backends= , > > how > > >> do > > >> > > you > > >> > > > >> deal > > >> > > > >> > > with > > >> > > > >> > > >> the lack of x-forwarded-for since for port 443 there= 's > > just > > >> > > simple > > >> > > > >> TCP > > >> > > > >> > > >> balancing? > > >> > > > >> > > >> > > >> > > > >> > > >> Has anyone thought of terminating SSL in the VR inst= ead? > > >> Ideas? > > >> > > > >> > > >> > > >> > > > >> > > >> Cheers > > >> > > > >> > > >> > > >> > > > >> > > >> -- > > >> > > > >> > > >> Sent from the Delta quadrant using Borg technology! > > >> > > > >> > > >> > > >> > > > >> > > >> Nux! > > >> > > > >> > > >> www.nux.ro > > >> > > > >> > > >> > > >> > > > >> > > > > > >> > > > >> > > > > > >> > > > >> > > > > > >> > > > >> > > > -- > > >> > > > >> > > > > > >> > > > >> > > > Andrija Pani=C4=87 > > >> > > > >> > > > > >> > > > >> > > >> > > > > > > >> > > > > > > >> > > > > > > >> > > > > -- > > >> > > > > > > >> > > > > Andrija Pani=C4=87 > > >> > > > >