Hello,
We have a running openedx in production managed by tutor, and we would like to add authentication via LDAP.
For this authentication, according to this answer, we neet to install packages (ibsasl2-dev python-dev libldap2-dev libssl-dev python-ldap django-auth-ldap)
We found only one solution: add this packages to dockerfile at end of apt install command which Install useful system requirements vi "$(tutor config printroot)/env/build/openedx/dockerfile"
How we should install this packages in right way? Via new plugin? I don’t see such possibility via plugin.
if possibly_authenticated_user is None:
with transaction.atomic(): # should be tested for performance and correct use
possibly_authenticated_user = authenticate(
username=request.POST.get('email', ''), password=request.POST.get('password', ''), request=request)
if possibly_authenticated_user:
password = normalize_password(request.POST.get('password', ''))
possibly_authenticated_user.set_password(password)
possibly_authenticated_user.save()
profile = UserProfile(user=possibly_authenticated_user)
try:
profile.save()
except Exception:
log.exception(f"UserProfile creation failed for user {user.id}.")
raise
user = possibly_authenticated_user