There is some additional detail on this task available in Superset on Kubernetes design document.
Superset is built with the Flask Application Builder (FAB) and its authentication system is therefore very flexible.
References:
- https://superset.apache.org/docs/security/
- https://flask-appbuilder.readthedocs.io/en/latest/security.html
Our current Superset instance use the REMOTE_USER authentication type and this authentication is performed by an Apache reverse proxy, linked to the CAS-SSO system.
We would like to take the opportunity to review this authentication mechanism during the migration to Kubernetes and remove the Apache reverse proxy, if possible.
The best way to do that would be to use the OpenID Connect (OIDC) protocol within FAB, linked directly to the same CAS-SSO system. We have several exmples of where the OIDC protocol has been successfully implemented implemented in this way, including DataHub, GitLab, and Netbox.
There are several guides available as to how this can be achieved:
The simplest looking approach appears to be this one, which uses the Authlib package.
Other approaches include this and this, both of which use the flask-oidc package.