Superset Google OAuth issue
Make sure these boxes are checked before submitting your issue - thank you!
- [ X] I have checked the superset logs for python stacktraces and included it here as text if any
- [ X] I have reproduced the issue with at least the latest released version of superset
- [X ] I have checked the issue tracker for the same issue and I haven't found one similar
Superset version
0.28.0
Python version
3.6.6
Expected results
When Superset configured to use Google OAuth as an Authentication provider I expect to enable Sign In to the registered in Superset users only.
Actual results
When Superset configured to use Google OAuth as an Authentication provider first user Sign In creates a record in ad_user table after the successful authentication with Google. I expect to enable Sign In to the previously registered users only.
the problem I see here:
- Signing in unregistered user to Superset, kind of automatic registration on a first Sigh in
Steps to reproduce
On a first Sigh In of user [email protected], a new record created in ad_user table without any prompt to register first or at least avoid to sign in.
On a first Sigh In of user [email protected], the welcome page of Superset is accessible, means Sigh In successful, new record added to the ad_user table.
This behavior is always reproducible.
My superset_config.py
from flask_appbuilder.security.manager import AUTH_OID, AUTH_REMOTE_USER, AUTH_DB, AUTH_LDAP, AUTH_OAUTH
basedir = os.path.abspath(os.path.dirname(__file__))
ROW_LIMIT = 5000
SUPERSET_WORKERS = 2
WTF_CSRF_ENABLED = True
SECRET_KEY = 'xxx'
SQLALCHEMY_DATABASE_URI = 'postgresql://user@host_name:pass@database_url:54/superset_db'
AUTH_TYPE=AUTH_OAUTH
AUTH_USER_REGISTRATION = True
AUTH_USER_REGISTRATION_ROLE = "Alpha"
OAUTH_PROVIDERS = [
{
'name': 'google',
'icon': 'fa-google',
'token_key': 'access_token',
'remote_app': {
'base_url': 'https://www.googleapis.com/oauth2/v2/',
'request_token_params': {
'scope': 'email profile'
},
'request_token_url': None,
'access_token_url': 'https://accounts.google.com/o/oauth2/token',
'authorize_url': 'https://accounts.google.com/o/oauth2/auth',
'consumer_key': 'xxx.apps.googleusercontent.com',
'consumer_secret': 'xxxsecret'
}
}
]
Try to change this in superset_config.py:
# Will allow user self registration
AUTH_USER_REGISTRATION = False
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Where is the superset_config.py file located at?
Where is the superset_config.py file located at?
/app/pythonpath/superset_config.py