You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/03/03 21:51:19 UTC
[GitHub] [superset] viniciuszani opened a new issue #13445: [docker-compose] Missing authlib when AUTH_OAUTH is used
viniciuszani opened a new issue #13445:
URL: https://github.com/apache/superset/issues/13445
I have followed the steps described in [the documentation](https://superset.apache.org/docs/installation/installing-superset-using-docker-compose) to setup superset using docker-compose.
On top of that, I tried to configure superset to use AUTH_OAUTH, but it fails when Flask tries to load the `authlib` python library (flask).
### Expected results
Superset runs and I can log in using some OAUTH provider.
### Actual results
what actually happens.
#### Logs
```
[2021-03-03 21:39:11 +0000] [11] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
worker.init_process()
File "/usr/local/lib/python3.7/site-packages/gunicorn/workers/gthread.py", line 92, in init_process
super().init_process()
File "/usr/local/lib/python3.7/site-packages/gunicorn/workers/base.py", line 119, in init_process
self.load_wsgi()
File "/usr/local/lib/python3.7/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi
self.wsgi = self.app.wsgi()
File "/usr/local/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
self.callable = self.load()
File "/usr/local/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 49, in load
return self.load_wsgiapp()
File "/usr/local/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
return util.import_app(self.app_uri)
File "/usr/local/lib/python3.7/site-packages/gunicorn/util.py", line 411, in import_app
app = app(*args, **kwargs)
File "/app/superset/app.py", line 69, in create_app
raise ex
File "/app/superset/app.py", line 62, in create_app
app_initializer.init_app()
File "/app/superset/app.py", line 552, in init_app
self.init_app_in_ctx()
File "/app/superset/app.py", line 521, in init_app_in_ctx
self.configure_fab()
File "/app/superset/app.py", line 592, in configure_fab
appbuilder.init_app(self.flask_app, db.session)
File "/usr/local/lib/python3.7/site-packages/flask_appbuilder/base.py", line 202, in init_app
self.sm = self.security_manager_class(self)
File "/usr/local/lib/python3.7/site-packages/flask_appbuilder/security/sqla/manager.py", line 51, in __init__
super(SecurityManager, self).__init__(appbuilder)
File "/usr/local/lib/python3.7/site-packages/flask_appbuilder/security/manager.py", line 250, in __init__
from authlib.integrations.flask_client import OAuth
ModuleNotFoundError: No module named 'authlib'
```
#### How to reproduce the bug
1. Setup Superset using docker-compose
2. Try to configure it to use AUTH_OAUTH
### Environment
- superset version: `git / master` (also tried `git / latest`)
- docker-compose version: `1.28.4`
### superset_config_docker.py
```python
AUTH_USER_REGISTRATION = True
AUTH_USER_REGISTRATION_ROLE = "Public"
AUTH_TYPE = AUTH_OAUTH
OAUTH_PROVIDERS = [
{
'name':'google',
'token_key':'access_token',
'icon':'fa-google',
'remote_app': {
'client_id': 'some-id',
'client_secret': 'some-secret',
'client_kwargs': {
'scope': 'email profile'
},
'base_url': 'https://www.googleapis.com/oauth2/v2/',
'access_token_url': 'https://accounts.google.com/o/oauth2/token',
'authorize_url': 'https://accounts.google.com/o/oauth2/auth'
}
}
]
```
### Checklist
Make sure to follow these steps before submitting your issue - thank you!
- [x] I have checked the superset logs for python stacktraces and included it here as text if there are 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.
### Additional context
Add any other context about the problem here.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] amitmiran137 closed issue #13445: [docker-compose] Missing authlib when AUTH_OAUTH is used
Posted by GitBox <gi...@apache.org>.
amitmiran137 closed issue #13445:
URL: https://github.com/apache/superset/issues/13445
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] algers commented on issue #13445: [docker-compose] Missing authlib when AUTH_OAUTH is used
Posted by GitBox <gi...@apache.org>.
algers commented on issue #13445:
URL: https://github.com/apache/superset/issues/13445#issuecomment-791733741
You'll need to instruct docker to install `authlib` in `/docker/requirements-local.txt` as its a non-standard library.
[More info](https://github.com/apache/superset/tree/master/docker#local-packages)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org