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 BC461200D3B for ; Fri, 10 Nov 2017 16:36:43 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id B9261160BEE; Fri, 10 Nov 2017 15:36:43 +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 B1BC2160BCB for ; Fri, 10 Nov 2017 16:36:42 +0100 (CET) Received: (qmail 66948 invoked by uid 500); 10 Nov 2017 15:36:41 -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 66926 invoked by uid 99); 10 Nov 2017 15:36:41 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Nov 2017 15:36:41 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id C66F41A45F9; Fri, 10 Nov 2017 15:36:39 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.102 X-Spam-Level: X-Spam-Status: No, score=-0.102 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=li.nux.ro Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 1VrcoFUn_H46; Fri, 10 Nov 2017 15:36:36 +0000 (UTC) Received: from mailserver.lastdot.org (mailserver.lastdot.org [31.193.175.196]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id C9C885FB4E; Fri, 10 Nov 2017 15:36:36 +0000 (UTC) Received: from localhost (localhost [IPv6:::1]) by mailserver.lastdot.org (Postfix) with ESMTP id 6FE78A4095; Fri, 10 Nov 2017 15:36:30 +0000 (GMT) Received: from mailserver.lastdot.org ([IPv6:::1]) by localhost (mailserver.lastdot.org [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id eNS9p0jate5f; Fri, 10 Nov 2017 15:36:28 +0000 (GMT) Received: from localhost (localhost [IPv6:::1]) by mailserver.lastdot.org (Postfix) with ESMTP id 0B30DA4096; Fri, 10 Nov 2017 15:36:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.10.3 mailserver.lastdot.org 0B30DA4096 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=li.nux.ro; s=C605E3A6-F3C6-11E3-AEB0-DFF9218DCAC4; t=1510328188; bh=mNoI3bz1tOD15iWnVFaXUyBb8CDEwEh90wZhD/o1/ZI=; h=Date:From:To:Message-ID:MIME-Version; b=Iu+cocYDMnbEQoVNIg37pc/gceyhCr1TSrvn1k4is7+Dm0srxYk0YOBBUDvHKLSdP 21nuUt3kSFmxpVw4CkN6hG/83TPBgNYmbMIzWSTHjC87JcL9qlqH1ns3NzrEoe3mAa XNtHuf/9uMcSwQ99y3PborIEbnhPMr6JiCsKBXYI= X-Virus-Scanned: amavisd-new at mailserver.lastdot.org Received: from mailserver.lastdot.org ([IPv6:::1]) by localhost (mailserver.lastdot.org [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id YeNCMXUgTGgg; Fri, 10 Nov 2017 15:36:27 +0000 (GMT) Received: from mailserver.lastdot.org (mailserver.lastdot.org [31.193.175.196]) by mailserver.lastdot.org (Postfix) with ESMTP id C21BAA4095; Fri, 10 Nov 2017 15:36:27 +0000 (GMT) Date: Fri, 10 Nov 2017 15:36:27 +0000 (GMT) From: Nux! To: dev Cc: Wido den Hollander , Khosrow Moossavi , Will Stevens , users Message-ID: <2102575241.1695.1510328187286.JavaMail.zimbra@li.nux.ro> 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> 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-Mailer: Zimbra 8.7.0_GA_1659 (ZimbraWebClient - FF52 (Linux)/8.7.0_GA_1659) Thread-Topic: HTTPS LB and x-forwarded-for Thread-Index: PjD/Mj5f6g+QptlBUIXZ2mqz3qXeZw== archived-at: Fri, 10 Nov 2017 15:36:43 -0000 Pierre-Luc, Haproxy docs say it should work for any kind of traffic as long as both end= s 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" , "Will Stevens" > , "Nux!" , "users" > 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? >=20 > Le 10 nov. 2017 09 h 35, "Wido den Hollander" a =C3=A9cr= it : >=20 >> >> > Op 10 november 2017 om 14:27 schreef Pierre-Luc Dion > >: >> > >> > >> > I kind of like the proxy backend type, ill check on our end if that wo= uld >> > 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 many >> > > 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 goog= le >> > > analytics (and these things have gotten more and more aggressively >> 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" > > >> > > > > 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 ton 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 it 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 implem= ent >> > > > > "transarent proxy" (integrate with kernel so to speak) to allow >> > > TCP-level >> > > > > connections to backend (TCP mode, not HTTP mode) but to still >> > > "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 story, >> 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 perspective, >> 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 would >> deploy a >> > > > >> > redundant traefik[1] beside the VR for doing http and https >> > > > >> Load-balancing. >> > > > >> > I think it would also be useful if the API of that traefik >> 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 cloudstack = in >> the >> > > LB >> > > > >> > improvement: >> > > > >> > >> > > > >> > - support http, https (X-Forwarded-For) >> > > > >> >> > > > >> HAProxy also supports the PROXY protocol towards the backends. >> Apache >> > > > >> 2.4.22 supports this natively and Varnish for example can also >> talk >> > > PROXY. >> > > > >> >> > > > >> It adds a littlebit of metadata to the connection so that the >> 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 tool >> 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 between >> > > 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 supp= ort >> > > > >> NetScaler >> > > > >> > as Load-balancer in the past. so one less thing to think abou= t >> :-) >> > > > >> > >> > > > >> > >> > > > >> > [1] https://traefik.io/ >> > > > >> > >> > > > >> > >> > > > >> > PL, >> > > > >> > >> > > > >> > >> > > > >> > >> > > > >> > On Mon, Nov 6, 2017 at 7:10 AM, Nux! wrote: >> > > > >> > >> > > > >> > > Thanks Andrija, >> > > > >> > > >> > > > >> > > LB outside of the VR sounds like a good idea. An appliance >> 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 whenever i= t >> 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 backend >> web SSL >> > > > >> > > servers.... >> > > > >> > > > Not good idea, that is all I can say (custom configuratio= n >> > > thing) - >> > > > >> but >> > > > >> > > the >> > > > >> > > > LB setup is actually good - transparent mode haproxy, wor= ks >> on >> > > TCP >> > > > >> level, >> > > > >> > > > so you can see "real client IP" on the backend servers >> (which >> > > must >> > > > >> use VR >> > > > >> > > > as the default gtw, as per default, so the whole setup wo= rks >> > > > >> 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. to >> enable LB >> > > > >> > > > provisioning SCRIPT (bash, or whatever), where all neede= d >> > > > >> > > > install+configure can be done from client side - otherwi= se >> > > covering >> > > > >> all >> > > > >> > > > user cases, with proper HTTP checks and similar....is >> > > impossible to >> > > > >> do >> > > > >> > > > IMHO. >> > > > >> > > > >> > > > >> > > > Some other clients, actually have internal FW appliance >> (i.e. >> > > > >> multihomed >> > > > >> > > > VM, acting as gtw for all VMs in all networks), and hapro= xy >> > > instaled >> > > > >> on >> > > > >> > > > this device (with NAT configured from VR to this internal >> > > 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! wrote: >> > > > >> > > > >> > > > >> > > >> Hello, >> > > > >> > > >> >> > > > >> > > >> Of the people running an LB (VR) with https backends, ho= w >> do >> > > you >> > > > >> deal >> > > > >> > > with >> > > > >> > > >> the lack of x-forwarded-for since for port 443 there's j= ust >> > > simple >> > > > >> TCP >> > > > >> > > >> balancing? >> > > > >> > > >> >> > > > >> > > >> Has anyone thought of terminating SSL in the VR instead? >> Ideas? >> > > > >> > > >> >> > > > >> > > >> Cheers >> > > > >> > > >> >> > > > >> > > >> -- >> > > > >> > > >> Sent from the Delta quadrant using Borg technology! >> > > > >> > > >> >> > > > >> > > >> Nux! >> > > > >> > > >> www.nux.ro >> > > > >> > > >> >> > > > >> > > > >> > > > >> > > > >> > > > >> > > > >> > > > >> > > > -- >> > > > >> > > > >> > > > >> > > > Andrija Pani=C4=87 >> > > > >> > > >> > > > >> >> > > > > >> > > > > >> > > > > >> > > > > -- >> > > > > >> > > > > Andrija Pani=C4=87 >> > >