GitHub user arodrber-ds edited a discussion: Airflow 3 and Oauth Git 
authentication

Description
Hello, Today I use airflow on Kubernetes and it's version 2.11.0 and to log 
into the application I use Git's oauth, below are the configurations:


```yaml
config:
    webserver:
       authenticate: "True"
       auth_backend: "airflow.contrib.auth.backends.github_enterprise_auth"
``` 

```yaml
webserverConfig: |
    import os
    import requests
    from flask_appbuilder.security.manager import AUTH_OAUTH
    from airflow.www.security import AirflowSecurityManager
    # Configuração OAuth
    AUTH_TYPE = AUTH_OAUTH
    AUTH_USER_REGISTRATION = True
    AUTH_USER_REGISTRATION_ROLE = "Admin" 
    CSRF_ENABLED = True
    # Configurar OAuth com GitHub
    OAUTH_PROVIDERS = [
        {
            "name": "github",
            "icon": "fa-github",
            "token_key": "access_token",
            "remote_app": {
                "client_id": os.environ.get("GITHUB_CLIENT_ID"),
                "client_secret": os.environ.get("GITHUB_CLIENT_SECRET"),
                "api_base_url": "https://api.github.com/";,
                "client_kwargs": {
                    "scope": "read:user, read:org",
                },
                "access_token_url": 
"https://github.com/login/oauth/access_token";,
                "authorize_url": "https://github.com/login/oauth/authorize";,
                "request_token_url": None,
            },
        }
    ]
``` 

However, when I tried to update to Airflow 3, I am unable to perform the same 
type of action, and the webserver_config.py file is no longer being created in 
the api-server pod, thus keeping the basic authentication type as below:

![image](https://github.com/user-attachments/assets/7ef4bbbf-b182-4b45-b647-6aa2f2b249ff)

![image](https://github.com/user-attachments/assets/13ded495-31ce-4e1d-b38d-da4331e5d884)

What do I need to do to enable this authentication in Airflow 3?

![image](https://github.com/user-attachments/assets/e8559ae9-7dfd-425f-8342-c5a0c6c4bc7d)


GitHub link: https://github.com/apache/airflow/discussions/51600

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to