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/02/19 19:36:23 UTC
[GitHub] [superset] pingusix opened a new issue #13243: Can't open Settings -> List Users when using OAuth with Google for an Admin user
pingusix opened a new issue #13243:
URL: https://github.com/apache/superset/issues/13243
A clear and concise description of what the bug is.
### Expected results
User list displays and users can be edited When settings -> List Users is selected
### Actual results
Get an access denied popup and return to dashboard
#### How to reproduce the bug
Enable AUTH_TYPE=AUTH_OAUTH in config.py
Snippet of config.py:
AUTH_TYPE = AUTH_OAUTH
AUTH_USER_REGISTRATION = True
AUTH_USER_REGISTRATION_ROLE = "Admin"
PUBLIC_ROLE_LIKE_GAMMA = True
OAUTH_PROVIDERS = [
{
"name": "google",
"icon": "fa-google",
"token_key": "access_token",
"remote_app": {
"client_id": "xxx",
"client_secret": "xxx",
"api_base_url": "https://www.googleapis.com/oauth2/v2/",
"client_kwargs": {"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",
}
}
]
Register a new user using Google as a provider.
Go to settings-> List Users
Also changed auth type back to AUTH_DB and logged in as admin. I then deleted permissions for new google-based admin user and added them back in so they matched the currently authorised admin. Logged out, changed config.py back to use oauth and logged in as google-based admin user. Problem remains (also created a new auth_db based user with same permissions and worked correctly)
### Environment
(please complete the following information):
Ubuntu 18.04.3
Superset 1.0.1
Python 3.7.5
Node 8.10.0
----------------------------------------------------------------
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] calfzhou commented on issue #13243: Can't open Settings -> List Users when using OAuth with Google for an Admin user
Posted by GitBox <gi...@apache.org>.
calfzhou commented on issue #13243:
URL: https://github.com/apache/superset/issues/13243#issuecomment-969061698
facing the same issue on my first day of using Superset 🥲
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
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] rrittsteiger commented on issue #13243: Can't open Settings -> List Users when using OAuth with Google for an Admin user
Posted by GitBox <gi...@apache.org>.
rrittsteiger commented on issue #13243:
URL: https://github.com/apache/superset/issues/13243#issuecomment-793557618
We are also struggling with this problem.
----------------------------------------------------------------
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] pmarini commented on issue #13243: Can't open Settings -> List Users when using OAuth with Google for an Admin user
Posted by GitBox <gi...@apache.org>.
pmarini commented on issue #13243:
URL: https://github.com/apache/superset/issues/13243#issuecomment-847270040
Hi, I can confirm the same issue in my installation with LDAP authentication.
## Environment
Ubuntu Server 20.04
Python 3.8.5
Apache Superset 1.1.0
--
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] pingusix commented on issue #13243: Can't open Settings -> List Users when using OAuth with Google for an Admin user
Posted by GitBox <gi...@apache.org>.
pingusix commented on issue #13243:
URL: https://github.com/apache/superset/issues/13243#issuecomment-844865731
Thanks for that, I've tried the above with 1.1.0 but am still getting the same issue -on login I appear to have a profile of Admin and can list roles (and can see the users assigned to the roles), etc but clicking on List Users gives an access denied.
Out of interest I implemented LDAP authentication against our production dc and am getting the same issue.
Reverting to AUTH_DB allows me to list and edit users.
Can I check my understanding that the expected behaviour of an admin user via OAUTH or LDAP is that they should be able to list and edit users within the app?
--
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] apratsunrthd commented on issue #13243: Can't open Settings -> List Users when using OAuth with Google for an Admin user
Posted by GitBox <gi...@apache.org>.
apratsunrthd commented on issue #13243:
URL: https://github.com/apache/superset/issues/13243#issuecomment-1025705472
Also facing this issue.
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
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] danielewood commented on issue #13243: Can't open Settings -> List Users when using OAuth with Google for an Admin user
Posted by GitBox <gi...@apache.org>.
danielewood commented on issue #13243:
URL: https://github.com/apache/superset/issues/13243#issuecomment-843654609
I'm not having this problem with Superset 1.1.0 running on Kubernetes, here is my google auth config for you to compare:
```yaml
extraEnv:
OAUTH_HOME_DOMAIN: 'mydomain.com'
OAUTH_WHITELIST_REGEX: '@mydomain.com$'
extraSecretEnv:
# GCP API Keys: https://console.cloud.google.com/apis/credentials
# GCP ClientID: superset-oauth2
GOOGLE_KEY: xxxxxxx.apps.googleusercontent.com
GOOGLE_SECRET: xxxxxxxxxx
configOverrides:
enable_proxy_fix: |
# This will make sure the redirect_uri is properly computed, even with SSL offloading
ENABLE_PROXY_FIX = True
enable_debug: |
LOG_LEVEL = 'DEBUG'
enable_oauth: |
from flask_appbuilder.security.manager import (AUTH_DB, AUTH_OAUTH)
AUTH_TYPE = AUTH_OAUTH
OAUTH_PROVIDERS = [
{
"name": "google",
"whitelist": [ os.getenv("OAUTH_WHITELIST_REGEX", "") ],
"icon": "fa-google",
"token_key": "access_token",
"remote_app": {
"client_id": os.getenv("GOOGLE_KEY"),
"client_secret": os.getenv("GOOGLE_SECRET"),
"api_base_url": "https://www.googleapis.com/oauth2/v2/",
"client_kwargs": {"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",
"authorize_params": {"hd": os.getenv("OAUTH_HOME_DOMAIN", "")}
}
}
]
# Map Authlib roles to superset roles
AUTH_ROLE_ADMIN = 'Admin'
AUTH_ROLE_PUBLIC = 'Public'
# Will allow user self registration, allowing to create Flask users from Authorized User
AUTH_USER_REGISTRATION = True
# The default user self registration role
AUTH_USER_REGISTRATION_ROLE = "Admin"
```
--
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] danielewood commented on issue #13243: Can't open Settings -> List Users when using OAuth with Google for an Admin user
Posted by GitBox <gi...@apache.org>.
danielewood commented on issue #13243:
URL: https://github.com/apache/superset/issues/13243#issuecomment-978268626
> for instance I recommend that you pass the credentials via configmap or secrets
I'm not sure what the critique here is. Could you expand upon your statement?
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
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] calfzhou edited a comment on issue #13243: Can't open Settings -> List Users when using OAuth with Google for an Admin user
Posted by GitBox <gi...@apache.org>.
calfzhou edited a comment on issue #13243:
URL: https://github.com/apache/superset/issues/13243#issuecomment-969061698
facing the same issue on my first day of using Superset 🥲
re-run `superset init` fixed it :-p
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
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] danielewood commented on issue #13243: Can't open Settings -> List Users when using OAuth with Google for an Admin user
Posted by GitBox <gi...@apache.org>.
danielewood commented on issue #13243:
URL: https://github.com/apache/superset/issues/13243#issuecomment-845291218
> Can I check my understanding that the expected behaviour of an admin user via OAUTH or LDAP is that they should be able to list and edit users within the app?
Yes. I do not even create a local admin account for my clusters anymore.
--
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] TheRum edited a comment on issue #13243: Can't open Settings -> List Users when using OAuth with Google for an Admin user
Posted by GitBox <gi...@apache.org>.
TheRum edited a comment on issue #13243:
URL: https://github.com/apache/superset/issues/13243#issuecomment-859252263
I was also facing the same issue. But just now I ran `superset init` and it worked !
(I also use OAuth for authentication.)
--
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] nxmbiar commented on issue #13243: Can't open Settings -> List Users when using OAuth with Google for an Admin user
Posted by GitBox <gi...@apache.org>.
nxmbiar commented on issue #13243:
URL: https://github.com/apache/superset/issues/13243#issuecomment-855818040
Even I had run into the same issue with my LDAP setup. Running a `superset init` resolved it
--
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] shawnzhu commented on issue #13243: Can't open Settings -> List Users when using OAuth with Google for an Admin user
Posted by GitBox <gi...@apache.org>.
shawnzhu commented on issue #13243:
URL: https://github.com/apache/superset/issues/13243#issuecomment-899791277
I have similar problem when initializing superset with `AUTH_TYPE = AUTH_OAUTH` in config but used `AUTH_TYPE = AUTH_OAUTH` after OAUTH2 config works.
I found the problem is about missing permissions like `can (list|edit|userinfo|show|add|delete) UserOAuthModelView`, which explained why it works after re-run `superset init` which basically sync role definitions.
So when switching authentication methods, the user data model name changes: https://github.com/dpgaspar/Flask-AppBuilder/blob/1fb6d985910d306a821a8da072cd3c93e41311ac/flask_appbuilder/security/mongoengine/manager.py#L43-L52
which means after switching authentication methods, it needs re-run `superset init`, or adding required permissions to the `Admin` role.
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
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] alejandroparra commented on issue #13243: Can't open Settings -> List Users when using OAuth with Google for an Admin user
Posted by GitBox <gi...@apache.org>.
alejandroparra commented on issue #13243:
URL: https://github.com/apache/superset/issues/13243#issuecomment-978253383
> I'm not having this problem with Superset 1.1.0 running on Kubernetes, here is my google auth config for you to compare:
>
> ```yaml
> extraEnv:
> OAUTH_HOME_DOMAIN: 'mydomain.com'
> OAUTH_WHITELIST_REGEX: '@mydomain.com$'
> extraSecretEnv:
> # GCP API Keys: https://console.cloud.google.com/apis/credentials
> # GCP ClientID: superset-oauth2
> GOOGLE_KEY: xxxxxxx.apps.googleusercontent.com
> GOOGLE_SECRET: xxxxxxxxxx
>
> configOverrides:
> enable_proxy_fix: |
> # This will make sure the redirect_uri is properly computed, even with SSL offloading
> ENABLE_PROXY_FIX = True
> enable_debug: |
> LOG_LEVEL = 'DEBUG'
> enable_oauth: |
> from flask_appbuilder.security.manager import (AUTH_DB, AUTH_OAUTH)
> AUTH_TYPE = AUTH_OAUTH
> OAUTH_PROVIDERS = [
> {
> "name": "google",
> "whitelist": [ os.getenv("OAUTH_WHITELIST_REGEX", "") ],
> "icon": "fa-google",
> "token_key": "access_token",
> "remote_app": {
> "client_id": os.getenv("GOOGLE_KEY"),
> "client_secret": os.getenv("GOOGLE_SECRET"),
> "api_base_url": "https://www.googleapis.com/oauth2/v2/",
> "client_kwargs": {"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",
> "authorize_params": {"hd": os.getenv("OAUTH_HOME_DOMAIN", "")}
> }
> }
> ]
>
> # Map Authlib roles to superset roles
> AUTH_ROLE_ADMIN = 'Admin'
> AUTH_ROLE_PUBLIC = 'Public'
>
> # Will allow user self registration, allowing to create Flask users from Authorized User
> AUTH_USER_REGISTRATION = True
>
> # The default user self registration role
> AUTH_USER_REGISTRATION_ROLE = "Admin"
> ```
for instance I recommend that you pass the credentials via configmap or secrets
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
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] TheRum commented on issue #13243: Can't open Settings -> List Users when using OAuth with Google for an Admin user
Posted by GitBox <gi...@apache.org>.
TheRum commented on issue #13243:
URL: https://github.com/apache/superset/issues/13243#issuecomment-859252263
I'm also facing the same issue. I tried clearing permission/role tables and also tried `superset init` but nothing works.
Surprisingly, able to see 'List Users' when I switch to AUTH_DB.
--
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