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

Password is not exported to LDAP when adding a new user

Details

    Description

      toolReproduction steps:

      1. In instance settings configure LDAP integration: add a LDAP server, enable LDAP integration and enable export.
      2. Set log level of category "com.liferay.portal.security.ldap.internal.DefaultPortalLDAP" to DEBUG
      3. Run this groovy script from server administration:

       

      import com.liferay.portal.kernel.service.ServiceContext;
      import com.liferay.portal.kernel.util.*
      
      com.liferay.portal.kernel.service.UserLocalServiceUtil.addUser(
      Long.parseLong(userInfo.get("liferay.user.id")),
      Long.parseLong(userInfo.get("liferay.company.id")),
      false,
      "password",
      "password",
      false,
      "usr",
      "[email protected]",
      0,
      "",
      LocaleUtil.SPAIN,
      "firstName",
      "middleName",
      "lastName",
      1,
      1,
      true,
      6,
      13,
      1985,
      "jobTitle",
      [] as long[],
      [] as long[],
      [] as long[],
      [] as long[],
      false,
      new ServiceContext()
      )
      

      Expected behavior:

      • In Liferay log one log trace has been written for password LDAP user attribute ('userPassword' attribute) and for each of the other LDAP user attributes exported.

       

      2019-08-09 09:54:11.731 DEBUG [http-nio-8080-exec-3][DefaultPortalLDAP:729] LDAP user attribute cn: usr2
      2019-08-09 09:54:11.732 DEBUG [http-nio-8080-exec-3][DefaultPortalLDAP:729] LDAP user attribute mail: [email protected]
      2019-08-09 09:54:11.733 DEBUG [http-nio-8080-exec-3][DefaultPortalLDAP:729] LDAP user attribute title: jobTitle
      2019-08-09 09:54:11.734 DEBUG [http-nio-8080-exec-3][DefaultPortalLDAP:729] LDAP user attribute givenName: firstName
      2019-08-09 09:54:11.735 DEBUG [http-nio-8080-exec-3][DefaultPortalLDAP:722] LDAP user attribute userPassword: ********
      2019-08-09 09:54:11.736 DEBUG [http-nio-8080-exec-3][DefaultPortalLDAP:729] LDAP user attribute sn: lastName
      

       

       

      Actual behavior:

      • In Liferay log each attribute is logged except the password. The password has not been exported to LDAP:
      2019-08-09 09:35:28.125 DEBUG [http-nio-8080-exec-7][DefaultPortalLDAP:729] LDAP user attribute cn: usr
      2019-08-09 09:35:28.126 DEBUG [http-nio-8080-exec-7][DefaultPortalLDAP:729] LDAP user attribute mail: [email protected]
      2019-08-09 09:35:28.127 DEBUG [http-nio-8080-exec-7][DefaultPortalLDAP:729] LDAP user attribute title: jobTitle
      2019-08-09 09:35:28.128 DEBUG [http-nio-8080-exec-7][DefaultPortalLDAP:729] LDAP user attribute givenName: firstName
      2019-08-09 09:35:28.133 DEBUG [http-nio-8080-exec-7][DefaultPortalLDAP:729] LDAP user attribute sn: lastName
      

      Attachments

        Activity

          People

            della.wang Della Wang (Inactive)
            javier.moral Javier Moral
            Kiyoshi Lee Kiyoshi Lee
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              3 years, 42 weeks, 4 days ago

              Packages

                Version Package
                7.0.0 DXP FP86
                7.0.10.12 DXP SP12
                7.0.X
                7.1.10 DXP FP13
                7.1.X
                7.2.10 DXP FP2
                7.2.10.1 DXP SP1
                7.2.1 CE GA2
                7.2.X
                7.3.10 DXP GA1
                Master