GitHub user arodrber-ds closed 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:


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

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]