0
votes

I want to configure my deployment of superset so that users can signing using gitlab as OAuth2 provider.

Superset is a flask app that uses authlib to enable OAuth2 (https://superset.apache.org/docs/installation/configuring-superset). The problem I'm encountering is that although the redirect_uri configured in gitlab is https, the redirect_uri used is http.

Here is the log:

127.0.0.1 - - [16/Aug/2021:07:36:56 +0000] "GET /health HTTP/1.1" 200 2 "-" "curl/7.64.0" 2021-08-16 07:37:02,011:DEBUG:authlib.integrations.base_client.base_app:Saving authorize data: {'redirect_uri': 'http://my-superset-webserver/oauth-authorized/gitlab', 'url': 'https://my-gitlab-webserver/oauth/authorize?response_type=code&client_id=[...]&redirect_uri=http%3A%2F%2Fmy-superset-webserver%2Foauth-authorized%2Fgitlab&scope=api+read_user+read_api+read_repository+openid+profile&state=SOME_STATE', 'state': 'SOME_STATE'}

1

1 Answers

1
votes

I believe I had a similar issue, and added this to superset_config.py

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