You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "Utsavjain4561 (via GitHub)" <gi...@apache.org> on 2023/06/28 09:51:28 UTC

[GitHub] [superset] Utsavjain4561 opened a new issue, #24540: Getting 401 Unauth. response while requesting access_token from custom OAuth provider

Utsavjain4561 opened a new issue, #24540:
URL: https://github.com/apache/superset/issues/24540

   Hi everyone
   I was trying to integrate a custom OAuth provider in superset with the following config 
   
   ```
   AUTH_TYPE = AUTH_OAUTH
   AUTH_ROLES_SYNC_AT_LOGIN = True
   AUTH_USER_REGISTRATION = True
   AUTH_USER_REGISTRATION_ROLE = "Public"
   OAUTH_PROVIDERS = [
       {
           "name": "olympus",
           "icon": "fa-icon",
           "token_key": "access_token",
           "remote_app": {
               "client_id": "GARFIELD_NB6",
               "client_secret": "033c042e-298a-479a-9c19-a5cf1bd73530",
               "access_token_params": {
                   "client_id": "GARFIELD_NB6",
                   "client_secret": "033c042e-298a-479a-9c19-a5cf1bd73530",
                   "grant_type": "authorization_code"
               },
               "access_token_method": "POST",
               "api_base_url": "https://olympus-im-stage.phonepe.com/",
               "client_kwargs": {"scope": "email groups read write"},
               "request_token_url": None,
               "access_token_url": "https://olympus-im-stage.phonepe.com/olympus/im/v1/oauth/token",
               "authorize_url": "https://olympus-im-stage.phonepe.com/olympus/im/v1/oauth/authorize"
           }
       }
   ]
   ```
   
   While following the authentication flow, I am getting 401 response while requesting for `access_token`
   Checked with my OAuth provider but nothing has changed from their end 
   
   Below is the error 
   
   ```
   2023-06-28 09:07:14,705:DEBUG:flask_appbuilder.security.views:Provider: olympus
   2023-06-28T09:07:14.708315628Z 2023-06-28 09:07:14,707:DEBUG:flask_appbuilder.security.views:Going to call authorize for: olympus
   2023-06-28T09:07:14.723122503Z 172.18.0.1 - - [28/Jun/2023:09:07:14 +0000] "GET /login/olympus?next= HTTP/1.1" 302 851 "http://localhost:8088/login/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
   2023-06-28T09:07:20.933369506Z 2023-06-28 09:07:20,932:DEBUG:flask_appbuilder.security.views:Authorized init
   2023-06-28T09:07:20.951534214Z 2023-06-28 09:07:20,950:DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): olympus-im-stage.phonepe.com:443
   2023-06-28T09:07:21.904032465Z 2023-06-28 09:07:21,903:DEBUG:urllib3.connectionpool:https://olympus-im-stage.phonepe.com:443 "POST /olympus/im/v1/oauth/token HTTP/1.1" 401 255
   2023-06-28T09:07:21.915088923Z 2023-06-28 09:07:21,913:DEBUG:flask_appbuilder.security.views:OAUTH Authorized resp: {'code': 'INVALID_TOKEN', 'message': 'Token data is either not available or empty', 'context': {'message': 'JWT processing failed. Additional details: [[17] Unexpected exception encountered while processing JOSE object (java.lang.NullPointerException): null]'}}
   2023-06-28T09:07:21.915850840Z 2023-06-28 09:07:21,915:ERROR:flask_appbuilder.security.views:Error returning OAuth user info: 'access_token'
   2023-06-28T09:07:21.925776173Z 
   ```
   
   
   Can you please help in resolving this as we are blocked on this for some quiet long time to complete the OAuth integration 


-- 
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] Utsavjain4561 commented on issue #24540: Getting 401 Unauth. response while requesting access_token from custom OAuth provider

Posted by "Utsavjain4561 (via GitHub)" <gi...@apache.org>.
Utsavjain4561 commented on issue #24540:
URL: https://github.com/apache/superset/issues/24540#issuecomment-1612624880

   @giftig sure we are checking with them as well, but as per the config is concerned, do you see any miss in that config from our side or its all good ?


-- 
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] giftig commented on issue #24540: Getting 401 Unauth. response while requesting access_token from custom OAuth provider

Posted by "giftig (via GitHub)" <gi...@apache.org>.
giftig commented on issue #24540:
URL: https://github.com/apache/superset/issues/24540#issuecomment-1612615909

   That error's come from your OAuth provider, not from superset; you'll have to try to debug against the OAuth component you're trying to integrate and/or raise an issue with that project.


-- 
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


Re: [I] Getting 401 Unauth. response while requesting access_token from custom OAuth provider [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #24540:
URL: https://github.com/apache/superset/issues/24540#issuecomment-1977325460

   Closing this as stale since it's been silent for so long, and we're trying to steer toward a more actionable Issues backlog. If people are still encountering this in current versions (currently 3.x) please re-open this issue, open a new Issue with updated context, or raise a PR to address the problem. Thanks!
   


-- 
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


Re: [I] Getting 401 Unauth. response while requesting access_token from custom OAuth provider [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed issue #24540: Getting 401 Unauth. response while requesting access_token from custom OAuth provider
URL: https://github.com/apache/superset/issues/24540


-- 
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