首页 > 解决方案 > 一次登录 Apache Superset 集成

问题描述

我已经使用掌舵图将一次登录集成到超集。以下是通过一次登录进行身份验证的配置的一部分:

configOverrides:
  enable_oauth: |
    # This will make sure the redirect_uri is properly computed, even with SSL offloading
    ENABLE_PROXY_FIX = True

    from flask_appbuilder.security.manager import (AUTH_OAUTH, AUTH_DB)
    AUTH_TYPE = AUTH_OAUTH
    OAUTH_PROVIDERS = [
        {   "name":"onelogin",
            "token_key":"access_token",
            "icon":"fa-address-card",
            "remote_app": {
                "client_id":"aaa-bbb-ccc-ddd",
                "client_secret":"client-secret-here",
                "client_kwargs":{
                    "scope": "openid"
                },
                "server_metadata_url": "https://<organisation>.onelogin.com/oidc/2/.well-known/openid-configuration"
            }
        }
    ]

每当我尝试通过单一登录提供程序登录超集时,都会收到以下错误消息。(我确认客户端 ID 是正确的):

File "/usr/local/lib/python3.7/site-packages/authlib/oauth2/client.py", line 205, in fetch_token
    headers=headers, **session_kwargs
  File "/usr/local/lib/python3.7/site-packages/authlib/oauth2/client.py", line 226, in _fetch_token
    return self.parse_response_token(resp.json())
  File "/usr/local/lib/python3.7/site-packages/authlib/oauth2/client.py", line 380, in parse_response_token
    self.handle_error(error, description)
  File "/usr/local/lib/python3.7/site-packages/authlib/integrations/requests_client/oauth2_session.py", line 117, in handle_error
    raise OAuthError(error_type, error_description)
authlib.integrations.base_client.errors.OAuthError: invalid_client: client authentication failed

我试过在秘密上使用base64,但同样的问题。

可能是什么问题?

标签: flaskapache-supersetoneloginauthlib

解决方案


推荐阅读