Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-58240

With LDAP configured through Control Panel, custom mappings are not being imported



      When setting up custom mappings from LDAP that was configured through the Control Panel, if the custom mappings are not defined in the portal-ext.properties prior to enabling LDAP, the mappings do not get imported. If the custom mappings are defined in the portal-ext.properties prior to enabling LDAP, the mappings do get imported properly. However, any additional custom mappings that are added to the portal-ext.properties (after enabling LDAP) do not get imported. When configuring LDAP solely through portal-ext.properties, this issue does not occur (i.e. it doesn't matter whether you set the custom mappings before or after enabling LDAP, they will be imported properly)

      Steps to Reproduce:
      1. Start up portal and configure LDAP through the control panel (LDAP settings listed below)

      • Microsoft Active Directory Server
      • Base Provider URL: ldap://
      • Base DN: OU=DessertUsers,DC=windows2008r2,DC=ntlm
      • Principal: CN=Administrator,CN=Users,DC=windows2008r2,DC=ntlm
      • Credentials: liferay
      • Authentication Search Filter: (&(objectCategory=person)([email protected][email protected]))
      • Import Search Filter: (objectClass=person)
      • Screen Name: sAMAccountName
      • Email Address: userprincipalname
      • Password: unicodePwd
      • First Name: givenName
      • Middle Name: middleName
      • Last Name: sn
      • Full Name: cn
      • Group: memberOf

      2. In Control Panel > Portal Settings, set users authenticate by screen name and save
      3. Check LDAP enabled/required/Import enabled/Import on start up and save
      4. Go to Control Panel > Custom Fields and add Key: testfield, Type: Text Field - Indexed, and save
      5. After creating a test user in LDAP, sign out and sign in as test user
      6. Shut down portal and add the following property in the portal-ext


      7. Start up portal and sign in as test LDAP user
      8. Sign out and sign in as admin
      9. Go to Control Panel > Users and Organizations > test LDAP user > Custom Fields
      Expected Behavior: custom mapping is imported
      Actual Behavior: since custom mapping was set after enabling LDAP, it is not imported

      Note: The property ldap.user.custom.mappings.0= cannot be set in the Control Panel, and can only be set in the portal properties

      If ldap.user.custom.mappings.0=testfield=givenName is set before enabling LDAP, it is imported properly

      Also, there is a workaround for this by disabling LDAP in the Control Panel and deleting the LDAP server, and then re-adding the LDAP server and enabling the LDAP settings. From there, the custom mappings that are already set in the portal-ext get imported. There is still the issue of adding any new custom mappings, which would require disabling and deleting LDAP again.


          Issue Links



              shitian.zhang Shitian "Shelton" Zhang (Inactive)
              christopher.kian Christopher Kian
              Participants of an Issue:
              Recent user:
              Esther Sanz
              0 Vote for this issue
              1 Start watching this issue


                Days since last comment:
                6 years, 48 weeks, 2 days ago


                  Version Package
                  6.2.4 CE GA5
                  6.2.X EE
                  7.0.0 Alpha 1