title: Airflow basic auth - cannot create user
body: <p>I'm running airflow v 1.9.0. I am trying to get some form of authentication working but have so far failed to get github auth and password auth working.  The password auth feels like it should be pretty straight forward and I'm hoping someone can point me in the right direction.   My airflow.cfg has the following</p>
  
  <pre><code>[webserver]
  authenticate = True
  auth_backend = airflow.contrib.auth.backends.password_auth
  </code></pre>
  
  <p>Following the instructions here <a href="https://airflow.incubator.apache.org/security.html#password" rel="nofollow noreferrer">https://airflow.incubator.apache.org/security.html#password</a> I've logged into my airflow web server and run the following interactive python to try to create a user which gives me an error</p>
  
  <pre><code>airflow@airflow-web-66fbccc84c-vmqbp:~$ python3
  Python 3.6.4 (default, Feb 15 2018, 13:07:07)
  [GCC 4.9.2] on linux
  Type "help", "copyright", "credits" or "license" for more information.
  &gt;&gt;&gt; import airflow
  &gt;&gt;&gt; from airflow import models, settings
  &gt;&gt;&gt; from airflow.contrib.auth.backends.password_auth import PasswordUser
  &gt;&gt;&gt; user = PasswordUser(models.User())
  &gt;&gt;&gt; user.username = 'admin'
  &gt;&gt;&gt; user.password = 'airflowWTF'
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
      File "/usr/local/lib/python3.6/site-packages/sqlalchemy/ext/hybrid.py", line 873, in __set__
          raise AttributeError("can't set attribute")
          AttributeError: can't set attribute
  </code></pre>
  
  <p>Going through the web UI to create a user I just get an exception.   Here is the end of the exception.    <a href="https://www.dropbox.com/s/7cxwi6hdde61wnb/Screenshot%202018-02-21%2013.52.16.png?dl=0" rel="nofollow noreferrer">https://www.dropbox.com/s/7cxwi6hdde61wnb/Screenshot%202018-02-21%2013.52.16.png?dl=0</a></p>
  
  <p>Any tips appreciated.<br>
  Thanks!</p>