As for adding a user, it is described in the migration to the new version guide, but was mistakenly added to the wrong section - Step 5: Upgrade Airflow DAGs > Drop legacy UI in favor of FAB RBAC UI. In the previous version of this documentation, it was a second step to migrate to Airflow 2.0, but this has been moved to a different section. See: https://github.com/apache/airflow/commit/c204a2ed895250e983e86558f73ffedc2980e718
When it comes to disabling API authentication, it is a bit imprecise, because you can disable authentication, but that doesn't mean you will get all possible permissions right away. If authentication is disabled, then a user with the Public role will be used, which has a limited range of permissions, but you can give him other permissions via Web UI. I also know that there is a problem with giving some permissions to the anonymous user, but we are already working on a fix. See: https://github.com/apache/airflow/issues/13340 . - On Fri, Jan 8, 2021 at 3:39 PM Jarek Potiuk <[email protected]> wrote: > Good points! thanks for feedback! > > BTW. Maybe you would like to make your first contribution and update the > docs? It's always great to get such fixes from the users, as they know > where THEY would look for it :) > > Happy to review it, and for doc contribution itt's rather easy, and you > can do it straight from GitHub interface. > > J. > > > On Fri, Jan 8, 2021 at 3:33 PM Franco Peschiera < > [email protected]> wrote: > >> Hello, >> >> Thanks for all the work put in maintaining and improving airflow! >> >> I’ve been *migrating* to airflow 2.0.0. In fact, migrating is too strong >> of a word: we had almost nothing done (nothing in production, at least) so >> it was more of a “fresh install of airflow 2.0 and see if our previous DAGs >> work”. I have a couple of recommendations for the install instructions of >> airflow 2.0: >> >> 1. >> >> Since now authentication is imposed for the API and the web server, I >> think there should be an explanation on how to create users in the >> installation instructions. Specially since flask complains of the >> lack of users when launching airflow and provides bad advice. After a lot >> of searching in the docs (too long to admit) I decided to ask google and >> Stack >> Overflow was the savior >> <https://stackoverflow.com/questions/48072563/airflow-user-creation>. >> I understand that airflow users create is part of the CLI but if it’s >> not documented during the installation I’m not sure how we’re supposed to >> know how to create a user during the first installation+testing. >> 2. >> >> For local deployment during development in airflow 1.X.X we used to >> set the environmental variable export >> AIRFLOW__API__AUTH_BACKEND=airflow.api.auth.backend.default before >> launching airflow to use the (at the time) “experimental REST API” without >> authentication. This setting no longer works. Although it’s still in the >> docs: https://airflow.apache.org/docs/stable/security/api.html. And >> before you say “ah! but that’s the old docs”, this link is also referred >> in the >> new airflow 2.0 api docs for authentication >> >> <https://airflow.apache.org/docs/apache-airflow/2.0.0/stable-rest-api-ref.html#section/Authentication>, >> right after the phrase “The default is to deny all requests”. Maybe a more >> explicit reference to airflow.api.auth.backend.default in bold should >> be made in order to understand that this configuration is indeed the >> default (it was not in some versions of airflow 1.X.X), as it contradicts >> the link that comes right after that phrase. >> >> The flask warning for (1) was: >> >> [2021-01-07 18:53:07,036] {manager.py:727} WARNING - No user yet created, >> use flask fab command to do it. >> >> Thanks again! >> >> Franco >> > > > -- > > Jarek Potiuk > Polidea <https://www.polidea.com/> | Principal Software Engineer > > M: +48 660 796 129 <+48660796129> > [image: Polidea] <https://www.polidea.com/> > >
