You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/01/19 00:18:03 UTC

[GitHub] [airflow] kovaliovsg opened a new issue #13754: Configure Azure OATH Authentication

kovaliovsg opened a new issue #13754:
URL: https://github.com/apache/airflow/issues/13754


   **Apache Airflow version**: 2.0.0
   
   
   **Kubernetes version (if you are using kubernetes)** (use `kubectl version`): None
   
   **Environment**: Local PC
   
   - **Cloud provider or hardware configuration**: Azure AAD
   - **OS** (e.g. from /etc/os-release): Linux
   - **Kernel** (e.g. `uname -a`):
   - **Install tools**:
   - **Others**:
   
   **What happened**:
   
   Getting "Invalid Login" message after configuring Azure OAUTH authentication following the instructions on this page: 
   https://flask-appbuilder.readthedocs.io/en/latest/security.html#authentication-oauth 
   
   using their referenced example:
   
   https://github.com/dpgaspar/Flask-AppBuilder/blob/master/examples/oauth/config.py
   
   **What you expected to happen**:
   
   Expected the user will be able to access Airflow after successful Azure authentication
   
   **How to reproduce it**:
   
   Configure the authentication using the attached file webserver_config.py replacing the values of the client id, client secret and tenant id with your actual values.
   Also attached airflow.cfg and the screenshot of the error message in a zip file.
   I run Airflow on my local PC.
   
   **Anything else we need to know**:
   
   I can successfully authenticate to Azure using my credentials, so the issue does not relate to my username or password.
   
   [temp.zip](https://github.com/apache/airflow/files/5832849/temp.zip)
   
   
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] boring-cyborg[bot] commented on issue #13754: Configure Azure OATH Authentication

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #13754:
URL: https://github.com/apache/airflow/issues/13754#issuecomment-762525164


   Thanks for opening your first issue here! Be sure to follow the issue template!
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] kovaliovsg commented on issue #13754: Configure Azure OATH Authentication

Posted by GitBox <gi...@apache.org>.
kovaliovsg commented on issue #13754:
URL: https://github.com/apache/airflow/issues/13754#issuecomment-763001815


   Resolved the issue !!
   My assumption was the Airflow will automatically register the user if it doesn't exist in Airflow (It keeps the user's email in Airflow table in database)
   My assumption was wrong, the user has to register for the first time he access Airflow, only then he will be able to authenticate.
   So don't forget to include these parameters in bold in your webserver_congig.py file 
   
   import os
   
   from airflow.configuration import conf
   from flask_appbuilder.security.manager import AUTH_OAUTH
   basedir = os.path.abspath(os.path.dirname(__file__))
   
   SQLALCHEMY_DATABASE_URI = conf.get("core", "SQL_ALCHEMY_CONN")
   CSRF_ENABLED = True
   
   **AUTH_TYPE = AUTH_OAUTH
   AUTH_USER_REGISTRATION_ROLE = "Admin"
   AUTH_USER_REGISTRATION = True**
   
   OAUTH_PROVIDERS = [
   {
     "name": "azure",
     "icon": "fa-user-o",
     "token_key": "access_token",
     "remote_app": { .........................................................................
   ............................................................................................................


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] kovaliovsg closed issue #13754: Configure Azure OATH Authentication

Posted by GitBox <gi...@apache.org>.
kovaliovsg closed issue #13754:
URL: https://github.com/apache/airflow/issues/13754


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org