xwikisas / application-activedirectory

Provides the UI to set up LDAP for Active Directory
GNU Lesser General Public License v2.1
1 stars 2 forks source link

Active Directory authenticator overrides the previously registered authenticator #96

Closed trrenty closed 3 months ago

trrenty commented 5 months ago

Steps to reproduce:

  1. Have a xwiki instance with Integration Azure OAuth installed
  2. Install Application Active Directory
  3. Try to login using Azure Expected: Successful login Result: The login failed and you are redirected to Main without being logged

This is because this listener https://github.com/xwikisas/application-activedirectory/blob/master/application-activedirectory-api/src/main/java/com/xwiki/activedirectory/internal/ActiveDirectorySetupListener.java simply overrides the existing auth service.

Note that the same might happen in the case of Azure OAuth Integration. Since it registers the auth service in the same manner.

A possible solution would be for the auth service to fallback on the previously registered authenticator in case if it fails to login.