I am trying to force Weblate running in docker to support SAML2 authentication (we have corporate ADFS). I found plugin for django. So I create own Dockerfile:
from weblate/weblate
RUN set -x \
&& apt-get install --no-install-recommends -y xmlsec1 build-essential \
&& pip install django_saml2_auth
RUN (echo && echo 'execfile("/app/data/settings.override.py")') >> /app/etc/settings.py
content of settings.override.py:
INSTALLED_APPS = INSTALLED_APPS + ('django_saml2_auth',)
SAML2_AUTH = {
'METADATA_AUTO_CONF_URL': 'https://adfs.homecredit.net/federationmetadata/2007-06/federationmetadata.xml',
}
I failed with setting of 'urls.py' as mantioned in plugin's manual (I cannot find this file inside docker container) - I am not python/django developer and don't know how to continue.
Thanks for help.
Weblate already uses python-social-auth, so it's probably easier try it's SAML support first. At least you don't have to care about integration of authentication framework into Weblate, but just on setting up the authentication (what seems to be quite complex thing with SAML anyway).
See their docs for instructions: https://python-social-auth.readthedocs.io/en/latest/backends/saml.html
PS: If you manage to setup this, I'm happy to integrate this into Weblate - at least as documentation or any code changes if something is needed.