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 9D880200C48 for ; Thu, 6 Apr 2017 21:05:03 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 95B31160B91; Thu, 6 Apr 2017 19:05:03 +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 DA5EF160B81 for ; Thu, 6 Apr 2017 21:05:02 +0200 (CEST) Received: (qmail 92385 invoked by uid 500); 6 Apr 2017 19:05:01 -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 Received: (qmail 92371 invoked by uid 99); 6 Apr 2017 19:05:01 -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; Thu, 06 Apr 2017 19:05:01 +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 456D41A03DE for ; Thu, 6 Apr 2017 19:05:01 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -2.522 X-Spam-Level: X-Spam-Status: No, score=-2.522 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=2, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=disabled 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 ZIEc1k_PYWov for ; Thu, 6 Apr 2017 19:04:59 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id 27FC75F2FE for ; Thu, 6 Apr 2017 19:04:57 +0000 (UTC) Received: (qmail 92329 invoked by uid 99); 6 Apr 2017 19:04:56 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Apr 2017 19:04:56 +0000 Received: from mail-oi0-f49.google.com (mail-oi0-f49.google.com [209.85.218.49]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id E580D1A002E for ; Thu, 6 Apr 2017 19:04:55 +0000 (UTC) Received: by mail-oi0-f49.google.com with SMTP id r203so62535249oib.3 for ; Thu, 06 Apr 2017 12:04:55 -0700 (PDT) X-Gm-Message-State: AFeK/H07Ggeu9EET82kgKz2xZ6zdO9JeiReEcVCPHTHZEkMYSylZk5pL7vTnacok57h5gjy8N6eTL+g32rJvgw== X-Received: by 10.202.196.13 with SMTP id u13mr18867744oif.179.1491505495305; Thu, 06 Apr 2017 12:04:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.146.12 with HTTP; Thu, 6 Apr 2017 12:04:54 -0700 (PDT) In-Reply-To: References: From: Thomas Weise Date: Thu, 6 Apr 2017 12:04:54 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Airflow user management To: dev@airflow.incubator.apache.org Content-Type: multipart/alternative; boundary=001a11352de63a7761054c842f36 archived-at: Thu, 06 Apr 2017 19:05:03 -0000 --001a11352de63a7761054c842f36 Content-Type: text/plain; charset=UTF-8 Hi, I finally found that with username/password authentication, the superuser setting in the database is ignored and everyone is a superuser... See diff below after which the filtering behaves as expected. Thanks *diff --git a/airflow/contrib/auth/backends/password_auth.py b/airflow/contrib/auth/backends/password_auth.py* *index 000b9861..7fe00197 100644* *--- a/airflow/contrib/auth/backends/password_auth.py* *+++ b/airflow/contrib/auth/backends/password_auth.py* @@ -89,7 +89,7 @@ class PasswordUser(models.User): def is_superuser(self): '''Access all the things''' - return True + return False On Mon, Apr 3, 2017 at 5:42 PM, Thomas Weise wrote: > I was able to set a password from the command line, now I can login with > the user that was created through the UI. > > Filtering by owner doesn't work though. I confirmed that the user also has > superuser = False, but still it can see DAGs of other users. > > Any suggestions what to look for? > > I tried to put some debug statements into www/views.py but they don't see > to take effect. How do I rebuild the installation (under > /usr/local/lib/python2.7/dist-packages/airflow) after making changes? > > Thanks > > > On Fri, Mar 31, 2017 at 3:10 PM, Thomas Weise wrote: > >> Hi, >> >> I would like to create a few users that only can see their respective >> DAGs and have no global access like user administration. >> I have enabled password authentication and created the initial user as >> instructed here: >> >> https://airflow.incubator.apache.org/security.html?highlight >> =multi%20tenancy#web-authentication >> >> My airflow.cfg has the following settings: >> >> # Set to true to turn on authentication: >> >> # http://pythonhosted.org/airflow/security.html#web-authentication >> >> authenticate = True >> >> auth_backend = airflow.contrib.auth.backends.password_auth >> >> # Filter the list of dags by owner name (requires authentication to be >> enabled) >> >> filter_by_owner = True >> >> The (admin?) user that I created will after login see all DAGs (even >> though filtering was enabled) and is able to create other users. However, >> while creating new users through the UI, there seems to be no way to >> specify a password? >> >> Thanks, >> >> Thomas >> >> >> > --001a11352de63a7761054c842f36--