Replies: 2 comments 1 reply
-
Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval. |
Beta Was this translation helpful? Give feedback.
-
Questions like that should behav discussions not issues. Hopefully someone will help but opening an issue instead of discussion does not raise the "priority" or likelihood of getting answer. Issues are distincly different from discussions. Discussion are where you have troubleshooting question or you are not sure how things work. Issues are indicating that there is a clear bug in Airflow with repproducibility and it's quite apparent (for example from earlier discussion) that this is an airflow issue. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using OAuth2 for login, but I keep getting an "invalid_client" error. I'm quite sure that the client_id and client_secret are correct. Could it be that there's something wrong with the configuration?
from future import annotations
import os
from airflow.www.security import AirflowSecurityManager
from airflow.www.fab_security.manager import AUTH_OAUTH
basedir = os.path.abspath(os.path.dirname(file))
WTF_CSRF_ENABLED = True
WTF_CSRF_TIME_LIMIT = None
AUTH_TYPE = AUTH_OAUTH
OAUTH_BASE_URL = 'http://yjy.dev.jinxin234.cloud:9000'
OAUTH_PROVIDERS = [{
'name': 'leaf-auth',
'token_key': 'access_token',
'icon': 'fa-leaf-auth',
'remote_app': {
'api_base_url': f'{OAUTH_BASE_URL}/auth2/oauth2',
'client_kwargs': {
'scope': 'all openid profile'
},
'access_token_url': f'{OAUTH_BASE_URL}/auth2/oauth2/token',
'authorize_url': f'{OAUTH_BASE_URL}/auth2/oauth2/authorize',
'request_token_url': None,
'client_id': 'auth-for-airflow',
'client_secret': 'secret'
}
}]
class CustomSecurityManager(AirflowSecurityManager):
def oauth_user_info(self, provider, response):
if provider == 'leaf-auth':
SECURITY_MANAGER_CLASS = CustomSecurityManager
AUTH_USER_REGISTRATION = True
AUTH_USER_REGISTRATION_ROLE = 'Admin'
Originally posted by @yjySun in #53751
Beta Was this translation helpful? Give feedback.
All reactions