You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "mrtsrdm (via GitHub)" <gi...@apache.org> on 2023/03/17 08:45:59 UTC
[GitHub] [superset] mrtsrdm opened a new issue, #23407: cannot signin when make "AUTH_USER_REGISTRATION = false"
mrtsrdm opened a new issue, #23407:
URL: https://github.com/apache/superset/issues/23407
I am trying to make Custom OAuth2 Configuration.
This is mu "superset_config.py" file ->
**from flask_appbuilder.security.manager import AUTH_OAUTH
from custom_sso_security_manager import CustomSsoSecurityManager
CUSTOM_SECURITY_MANAGER = CustomSsoSecurityManager
AUTH_TYPE = AUTH_OAUTH
OAUTH_PROVIDERS = [
{ 'name':'egaSSO',
'token_key':'acces_token', # Name of the token in the response of access_token_url
'icon':'fa-address-card', # Icon for the provider
'remote_app': {
'client_id':'ca4ca995-3b1e-4e01-81e1-1f226686a3f7', # Client Id (Identify Superset application)
'client_secret':'86086186-f97a-442e-925b-35ed25882d0a', # Secret for this Client Id
'client_kwargs':{
'scope': 'offline_access' # Scope for the Authorization
},
'access_token_method':'POST', # HTTP Method to call access_token_url
'access_token_params':{ # Additional parameters for calls to access_token_url
'grant_type':'authorization_code',
'client_id':'ca4ca995-3b1e-4e01-81e1-1f226686a3f7',
'client_secret':'86086186-f97a-442e-925b-35ed25882d0a'
},
'api_base_url':'http://my-test.com:5100',
'access_token_url':'http://my-test.com:5100/oauth/token',
'authorize_url':'http://my-test.com:5100/connect/authorize',
"request_token_url": None,
}
}
]
_AUTH_USER_REGISTRATION = True_
AUTH_USER_REGISTRATION_ROLE = "Public"**
and this is my "custom_sso_security_manager.py" file ->
**from superset.security import SupersetSecurityManager
class CustomSsoSecurityManager(SupersetSecurityManager):
def oauth_user_info(self, provider, response=None):
if provider == 'egaSSO':
return { 'name' : 'mrt', 'email' : 'murat.test@test.com.tr', 'id' : '1', 'username' : 'mrt', 'first_name':'', 'last_name':''}**
There is no issue with these configs. However, when ı make _AUTH_USER_REGISTRATION = False_ ,
ı cannot signin. Do ı need to add another configs when ı make it false ?
--
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.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] mrtsrdm commented on issue #23407: cannot signin when make "AUTH_USER_REGISTRATION = false"
Posted by "mrtsrdm (via GitHub)" <gi...@apache.org>.
mrtsrdm commented on issue #23407:
URL: https://github.com/apache/superset/issues/23407#issuecomment-1474958343
@mdeshmu how can ı assign Gamma role, if ı make "AUTH_USER_REGISTRATION = false" ?
--
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] mrtsrdm commented on issue #23407: cannot signin when make "AUTH_USER_REGISTRATION = false"
Posted by "mrtsrdm (via GitHub)" <gi...@apache.org>.
mrtsrdm commented on issue #23407:
URL: https://github.com/apache/superset/issues/23407#issuecomment-1475412940
thank you @mdeshmu
--
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] mdeshmu commented on issue #23407: cannot signin when make "AUTH_USER_REGISTRATION = false"
Posted by "mdeshmu (via GitHub)" <gi...@apache.org>.
mdeshmu commented on issue #23407:
URL: https://github.com/apache/superset/issues/23407#issuecomment-1475113918
If you are using AUTH_USER_REGISTRATION = True then change AUTH_USER_REGISTRATION_ROLE = "Gamma"
If you are using AUTH_USER_REGISTRATION = False then you will have to manually adjust roles using an admin user. If you do not have an admin then probably you should fallback to AUTH_TYPE = AUTH_DB, connect using admin/admin, update the user role then enable oauth again with AUTH_TYPE = AUTH_OAUTH
--
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] mrtsrdm closed issue #23407: cannot signin when make "AUTH_USER_REGISTRATION = false"
Posted by "mrtsrdm (via GitHub)" <gi...@apache.org>.
mrtsrdm closed issue #23407: cannot signin when make "AUTH_USER_REGISTRATION = false"
URL: https://github.com/apache/superset/issues/23407
--
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] mdeshmu commented on issue #23407: cannot signin when make "AUTH_USER_REGISTRATION = false"
Posted by "mdeshmu (via GitHub)" <gi...@apache.org>.
mdeshmu commented on issue #23407:
URL: https://github.com/apache/superset/issues/23407#issuecomment-1474955386
I don't think a Public role can login. You will need Minimum Gamma role to allow login.
--
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