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 34DFE200D30 for ; Mon, 30 Oct 2017 17:25:45 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 3341F1609EF; Mon, 30 Oct 2017 16:25:45 +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 79B37160BE4 for ; Mon, 30 Oct 2017 17:25:44 +0100 (CET) Received: (qmail 39946 invoked by uid 500); 30 Oct 2017 16:25:43 -0000 Mailing-List: contact dev-help@airflow.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airflow.incubator.apache.org Delivered-To: mailing list dev@airflow.incubator.apache.org Delivered-To: moderator for dev@airflow.incubator.apache.org Received: (qmail 71066 invoked by uid 99); 30 Oct 2017 16:07:38 -0000 X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.002 X-Spam-Level: X-Spam-Status: No, score=-0.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=disabled From: Ash Berlin-Taylor Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: Experimental API Date: Mon, 30 Oct 2017 16:07:27 +0000 References: <12642590-4186-4591-B5EF-93CFDDA214AD@firemirror.com> To: dev@airflow.incubator.apache.org In-Reply-To: Message-Id: <7FDDE945-835F-41DB-AD9B-D2D94BCA1DA4@firemirror.com> X-Mailer: Apple Mail (2.3273) archived-at: Mon, 30 Oct 2017 16:25:45 -0000 Good work! Oh, /dag_stats and /task_stats were un-authenticated before too. Not = disasterous but not great. -ash > On 30 Oct 2017, at 16:01, Niels Zeilemaker = wrote: >=20 > Hi Ash, >=20 > I made a pull request moving the latest runs call to the web api. >=20 > https://github.com/apache/incubator-airflow/pull/2734 >=20 > Niels >=20 > Op 30 okt. 2017 4:58 p.m. schreef "Ash Berlin-Taylor" < > ash_airflowlist@firemirror.com>: >=20 >> It's available by default. >>=20 >> https://github.com/apache/incubator-airflow/blob/ >> 21e94c7d1594c5e0806d9e1ae1205a41bf98b5d3/airflow/www/app.py#L144 < >> https://github.com/apache/incubator-airflow/blob/ >> 21e94c7d1594c5e0806d9e1ae1205a41bf98b5d3/airflow/www/app.py#L144> >>=20 >> And used in the web front end https://github.com/apache/ >> incubator-airflow/blob/6a9ee0e045cbd14e8b6e70341135c6 >> 22af187fac/airflow/www/templates/airflow/dags.html#L299 < >> https://github.com/apache/incubator-airflow/blob/ >> 6a9ee0e045cbd14e8b6e70341135c622af187fac/airflow/www/ >> templates/airflow/dags.html#L299> >>=20 >> Does this need to be loaded via JSON? Couldn't that be info be sent = on >> initial page load without needing an extra page load? >>=20 >>> On 30 Oct 2017, at 15:44, Andy Hadjigeorgiou >> wrote: >>>=20 >>> Is this experimental API available by default, or does it need a >>> configuration? >>>=20 >>> On Mon, Oct 30, 2017 at 11:42 AM, Ash Berlin-Taylor < >>> ash_airflowlist@firemirror.com> wrote: >>>=20 >>>> Oh gods. >>>>=20 >>>> Something has gone wrong - the methods are decorated with >>>> `@requires_authentication` but they... don't. Oh, because the = default >>>> backend doesn't do any authentication or protection at all. >>>>=20 >>>> I thik this is CVEworthy - using the User+Password auth for the web >> front >>>> end/using default config should not leave the API unprotected. I = think >> the >>>> default API auth backend should deny all rather than allow all? >>>>=20 >>>> -ash >>>>=20 >>>>> On 30 Oct 2017, at 08:51, Niels Zeilemaker < >>>> nielszeilemaker@godatadriven.com> wrote: >>>>>=20 >>>>> Hi All, >>>>>=20 >>>>> I've implemented HTTP Basic Authentication for the experiment API, = see >>>> https://github.com/apache/incubator-airflow/pull/2730. This seems = to >> work >>>> fine. >>>>> However, while implementing this. I noticed, to my surprise, that = the >>>> experimental API was open even though we enabled Password = authentication >>>> for the web-interface. >>>>> This seems like a bug to me, as one would expect that the = experimental >>>> API would use the same auth backend as the web-interface. >>>>>=20 >>>>> Why did Airflow choose to split the authentication for the >>>> web-interface and experimental API? >>>>> And if it's not possible to combine those, is it possible to lock = down >>>> the experimental API if one chooses a non-default web-interface = auth >>>> backend? >>>>>=20 >>>>> Niels >>>>> Ps with an unsecured experimental api it is possible to trigger = dags, >>>> list pools, delete pools, etc. >>>>=20 >>>>=20 >>=20 >>=20