This is an automated email from the ASF dual-hosted git repository.
kamilbregula pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/master by this push:
new f0727b3 Change provider configuration keys for OAuth (#9759)
f0727b3 is described below
commit f0727b379e6c954a48d4c0b52b0539cf57bffb3f
Author: Ephraim Anierobi <[email protected]>
AuthorDate: Fri Aug 21 17:44:19 2020 +0100
Change provider configuration keys for OAuth (#9759)
---
UPDATING.md | 15 +++++++++++++++
airflow/config_templates/default_webserver_config.py | 8 ++++----
2 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/UPDATING.md b/UPDATING.md
index 4279b8c..667e655 100644
--- a/UPDATING.md
+++ b/UPDATING.md
@@ -137,6 +137,21 @@ All changes made are backward compatible, but if you use
the old import paths yo
see a deprecation warning. The old import paths can be abandoned in the future.
+### Breaking Change in OAuth
+
+The flask-ouathlib has been replaced with authlib because flask-outhlib has
+been deprecated in favour of authlib.
+The Old and New provider configuration keys that have changed are as follows
+
+| Old Keys | New keys |
+|---------------------|-------------------|
+| consumer_key | client_id |
+| consumer_secret | client_secret |
+| base_url | api_base_url |
+| request_token_params| client_kwargs |
+
+For more information, visit
https://flask-appbuilder.readthedocs.io/en/latest/security.html#authentication-oauth
+
### Migration Guide from Experimental API to Stable API v1
In Airflow 2.0, we added the new REST API. Experimental API still works, but
support may be dropped in the future.
If your application is still using the experimental API, you should consider
migrating to the stable API.
diff --git a/airflow/config_templates/default_webserver_config.py
b/airflow/config_templates/default_webserver_config.py
index 661b230..ac88cc2 100644
--- a/airflow/config_templates/default_webserver_config.py
+++ b/airflow/config_templates/default_webserver_config.py
@@ -70,15 +70,15 @@ AUTH_TYPE = AUTH_DB
# 'token_key':'access_token',
# 'icon':'fa-google',
# 'remote_app': {
-# 'base_url':'https://www.googleapis.com/oauth2/v2/',
-# 'request_token_params':{
+# 'api_base_url':'https://www.googleapis.com/oauth2/v2/',
+# 'client_kwargs':{
# 'scope': 'email profile'
# },
# 'access_token_url':'https://accounts.google.com/o/oauth2/token',
# 'authorize_url':'https://accounts.google.com/o/oauth2/auth',
# 'request_token_url': None,
-# 'consumer_key': CONSUMER_KEY,
-# 'consumer_secret': SECRET_KEY,
+# 'client_id': GOOGLE_KEY,
+# 'client_secret': GOOGLE_SECRET_KEY,
# }
# }]