airwulf
airwulf

Reputation: 11

How to support both OAuth and Basic Auth in FlaskAppBuilder in Superset

I have setup Apache Superset with Google Oauth using the instructions at https://medium.com/@aungmt/superset-with-google-oauth-3ba7a1c1f459. It works just fine. However, is it possible to have both OAuth and the out of the box basic auth? I want to support both modes for auth.

Upvotes: 1

Views: 4169

Answers (1)

David Tobiano
David Tobiano

Reputation: 1268

You can't have both modes of authentication methods enabled at the same time.
See the flask-appbuilder documentation (superset is based off flask-appbuilder): "The framework has 5 authentication methods and you choose one of them, you configure the method to be used on the config.py" [https://flask-appbuilder.readthedocs.io/en/latest/security.html#authentication-methods].

That logic is defined here: https://flask-appbuilder.readthedocs.io/en/latest/_modules/flask_appbuilder/security/manager.html

That being said, if you wanted to extend the code, it should be do-able by creating a custom SecurityManager that re-used both logic.
See https://flask-appbuilder.readthedocs.io/en/latest/security.html#your-custom-security or https://medium.com/@sairamkrish/apache-superset-custom-authentication-and-integrate-with-other-micro-services-8217956273c1

Upvotes: 3

Related Questions