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/02/23 07:23:51 UTC

[GitHub] [airflow] srthok opened a new issue #14377: Airflow 2.0 Github Enterprise based OAuth issue

srthok opened a new issue #14377:
URL: https://github.com/apache/airflow/issues/14377


   
   
   **Apache Airflow version**: 2.0.0
   
   
   **Kubernetes version (if you are using kubernetes)** (use `kubectl version`): NA
   
   **Environment**:
   
   - **Cloud provider or hardware configuration**: AWS
   - **OS** (e.g. from /etc/os-release): Ubuntu  18.04.5 LTS (Bionic Beaver)
   - **Kernel** (e.g. `uname -a`):Linux ip-10-144-101-222 5.4.0-1037-aws #39~18.04.1-Ubuntu SMP Fri Jan 15 02:48:42 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
   - **Install tools**:pip
   - **Others**: NA
   
   **What happened**:
   Enabled Github Enterprise authentication in WebServer_config.py.  Here is what happening in browser:
   
   Airflow Home Page -> login page> OAuth provider login page -> Successful login -> Redirecting to following page and getting 404
    https://ghe-url/oauth/authiorize?response_type=code&client_id=4daf8925d11c79456432&redirect_uri=https%3A%2F%2Fairflow-url%2Foauth-authorized%2Fgithub&state=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJuZXh0IjpbImh0dHBzOi8vYWlyZmxvdy1wb2Muc2NpZW5jZS1hdC1zY2FsZS5pby9ob21lIl19.KuJipacU2DolDZ0YQAy_9yKsIwd4WP9FTDPEOt7OC_o
   
   webserver_config.py
   ```
   OAUTH_PROVIDERS = [{
        'name':'github',
        'token_key':'access_token',
        'icon':'fa-github',
            'remote_app': {
                'api_base_url':'https://<ghe-url>/api/v3/users',
                'request_token_params': {"scope": "user"},
                'access_token_url':'https://<ghe-url>/login/oauth/access_token',
                'authorize_url':'https://<ghe-url>/oauth/authiorize',
                'request_token_url': None,
                'client_id': 'xxxxxx,
                'client_secret': 'xxxxxxxxxx',
            }
   }]
   ```
   **What you expected to happen**:
   This should redirect to Airflow home page
   
   
   Something wrong with Authroize URL or authlib implementation for GHE. Cant find any relevant documentation.
   **How to reproduce it**:  With Above webserver_config.py, We can reproduce the issue
   
   How often does this problem occur? Once? Every time etc?  Everytime
   
   


----------------------------------------------------------------
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] potiuk closed issue #14377: Airflow 2.0 Github Enterprise based OAuth issue

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


   


-- 
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] AStevensTaylor commented on issue #14377: Airflow 2.0 Github Enterprise based OAuth issue

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


   Looks like a spelling error in the `authorize_url` parameter, should be `/oauth/authorize` instead of `/oauth/authiorize`.
   Your config should be:
   
   ```python
   OAUTH_PROVIDERS = [{
        'name':'github',
        'token_key':'access_token',
        'icon':'fa-github',
            'remote_app': {
                'api_base_url':'https://<ghe-url>/api/v3/users',
                'request_token_params': {"scope": "user"},
                'access_token_url':'https://<ghe-url>/login/oauth/access_token',
                'authorize_url':'https://<ghe-url>/oauth/authorize',
                'request_token_url': None,
                'client_id': 'xxxxxx,
                'client_secret': 'xxxxxxxxxx',
            }
   }]
   ```
   
   Docs: [authorizing-oauth-apps](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#1-request-a-users-github-identity)


-- 
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] potiuk commented on issue #14377: Airflow 2.0 Github Enterprise based OAuth issue

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


   Looks like spelling indeed. I am closing - @srthok please comment if your problem is not solved.


-- 
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