Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
7.0.X, 7.1.X, 7.2.X, Master
-
7.2.x, 7.1.x, 7.0.x
-
Committed
-
4
-
Security
Description
toolReproduction steps:
- In instance settings configure LDAP integration: add a LDAP server, enable LDAP integration and enable export.
- Set log level of category "com.liferay.portal.security.ldap.internal.DefaultPortalLDAP" to DEBUG
- 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