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

LDAP users are reimported despite not being modified

    Details

      Description

      Steps to Reproduce

      1. Set users.update.last.login=false in portal-ext.properties
      2. Set up LDAP
      3. Update the log level for com.liferay.portal.security.ldap.internal.exportimport to ALL
      4. Sign in as an LDAP user
      5. Sign out
      6. Sign in as the LDAP user again
      7. Examine the logs

      Expected Results
      The logs will not show the user being updated.

      2020-08-12 21:10:49.043 DEBUG [http-nio-8080-exec-8][DefaultLDAPToPortalConverter:119] Screen name testuser and email address [email protected]
      2020-08-12 21:10:49.061 DEBUG [http-nio-8080-exec-8][LDAPUserImporterImpl:1513] Updating existing user {mvccVersion=7, uuid=3c536893-4db9-b32c-4230-151ad78018a8, externalReferenceCode=, userId=38671, companyId=20101, createDate=Wed Aug 12 21:06:57 GMT 2020, modifiedDate=Wed Aug 12 21:07:44 GMT 2020, defaultUser=false, contactId=38672, password={PBKDF2WITHHMACSHA1}AAAAoAAB9ABXDQCLR2ChoNaZsDntAabWmrs0wuvCscsIlT5i, passwordEncrypted=true, passwordReset=false, passwordModifiedDate=Wed Aug 12 16:55:21 GMT 2020, digest=79a5850d0aa94a23107d9acc0b07321b,559abf8885d392059ebe580b5ff3cef1,660de5b814b070d6def59089b32ee09d, reminderQueryQuestion=, reminderQueryAnswer=, graceLoginCount=0, screenName=testuser, [email protected], facebookId=0, googleUserId=, ldapServerId=38669, openId=, portraitId=0, languageId=en_US, timeZoneId=UTC, greeting=Welcome testuser testuser!, comments=, firstName=testuser, middleName=, lastName=testuser, jobTitle=, loginDate=Wed Aug 12 21:07:44 GMT 2020, loginIP=127.0.0.1, lastLoginDate=Wed Aug 12 21:07:18 GMT 2020, lastLoginIP=127.0.0.1, lastFailedLoginDate=null, failedLoginAttempts=0, lockout=false, lockoutDate=null, agreedToTermsOfUse=false, emailAddressVerified=true, status=0} from LDAP server 38669 to company 20101
      2020-08-12 21:10:49.315 DEBUG [http-nio-8080-exec-8][LDAPUserImporterImpl:1648] Finished update for user {mvccVersion=7, uuid=3c536893-4db9-b32c-4230-151ad78018a8, externalReferenceCode=, userId=38671, companyId=20101, createDate=Wed Aug 12 21:06:57 GMT 2020, modifiedDate=Wed Aug 12 16:55:21 GMT 2020, defaultUser=false, contactId=38672, password={PBKDF2WITHHMACSHA1}AAAAoAAB9AB1HTZ44+QN2eShpugDGQLCNL+ZOW0Cf7g8CMra, passwordEncrypted=true, passwordReset=false, passwordModifiedDate=Wed Aug 12 16:55:21 GMT 2020, digest=79a5850d0aa94a23107d9acc0b07321b,559abf8885d392059ebe580b5ff3cef1,660de5b814b070d6def59089b32ee09d, reminderQueryQuestion=, reminderQueryAnswer=, graceLoginCount=0, screenName=testuser, [email protected], facebookId=0, googleUserId=, ldapServerId=38669, openId=, portraitId=0, languageId=en_US, timeZoneId=UTC, greeting=Welcome testuser testuser!, comments=, firstName=testuser, middleName=, lastName=testuser, jobTitle=, loginDate=Wed Aug 12 21:07:44 GMT 2020, loginIP=127.0.0.1, lastLoginDate=Wed Aug 12 21:07:18 GMT 2020, lastLoginIP=127.0.0.1, lastFailedLoginDate=null, failedLoginAttempts=0, lockout=false, lockoutDate=null, agreedToTermsOfUse=false, emailAddressVerified=true, status=0} in 254ms
      2020-08-12 21:10:57.409 DEBUG [http-nio-8080-exec-3][DefaultLDAPToPortalConverter:119] Screen name testuser and email address [email protected]
      2020-08-12 21:10:57.412 DEBUG [http-nio-8080-exec-3][LDAPUserImporterImpl:1513] Updating existing user {mvccVersion=8, uuid=3c536893-4db9-b32c-4230-151ad78018a8, externalReferenceCode=, userId=38671, companyId=20101, createDate=Wed Aug 12 21:06:57 GMT 2020, modifiedDate=Wed Aug 12 16:55:21 GMT 2020, defaultUser=false, contactId=38672, password={PBKDF2WITHHMACSHA1}AAAAoAAB9AB1HTZ44+QN2eShpugDGQLCNL+ZOW0Cf7g8CMra, passwordEncrypted=true, passwordReset=false, passwordModifiedDate=Wed Aug 12 16:55:21 GMT 2020, digest=79a5850d0aa94a23107d9acc0b07321b,559abf8885d392059ebe580b5ff3cef1,660de5b814b070d6def59089b32ee09d, reminderQueryQuestion=, reminderQueryAnswer=, graceLoginCount=0, screenName=testuser, [email protected], facebookId=0, googleUserId=, ldapServerId=38669, openId=, portraitId=0, languageId=en_US, timeZoneId=UTC, greeting=Welcome testuser testuser!, comments=, firstName=testuser, middleName=, lastName=testuser, jobTitle=, loginDate=Wed Aug 12 21:07:44 GMT 2020, loginIP=127.0.0.1, lastLoginDate=Wed Aug 12 21:07:18 GMT 2020, lastLoginIP=127.0.0.1, lastFailedLoginDate=null, failedLoginAttempts=0, lockout=false, lockoutDate=null, agreedToTermsOfUse=false, emailAddressVerified=true, status=0} from LDAP server 38669 to company 20101
      

      Actual Results
      The logs show the user being updated.

      2020-08-12 21:07:18.031 DEBUG [http-nio-8080-exec-2][DefaultLDAPToPortalConverter:119] Screen name testuser and email address [email protected]
      2020-08-12 21:07:18.034 DEBUG [http-nio-8080-exec-2][LDAPUserImporterImpl:1513] Updating existing user {mvccVersion=3, uuid=3c536893-4db9-b32c-4230-151ad78018a8, externalReferenceCode=, userId=38671, companyId=20101, createDate=Wed Aug 12 21:06:57 GMT 2020, modifiedDate=Wed Aug 12 21:06:57 GMT 2020, defaultUser=false, contactId=38672, password={PBKDF2WITHHMACSHA1}AAAAoAAB9AAARG9lqZeJKunaW9ACnsSLWyVzgnSBo83ITj27, passwordEncrypted=true, passwordReset=false, passwordModifiedDate=Wed Aug 12 16:55:21 GMT 2020, digest=79a5850d0aa94a23107d9acc0b07321b,559abf8885d392059ebe580b5ff3cef1,660de5b814b070d6def59089b32ee09d, reminderQueryQuestion=, reminderQueryAnswer=, graceLoginCount=0, screenName=testuser, [email protected], facebookId=0, googleUserId=, ldapServerId=38669, openId=, portraitId=0, languageId=en_US, timeZoneId=UTC, greeting=Welcome testuser testuser!, comments=, firstName=testuser, middleName=, lastName=testuser, jobTitle=, loginDate=Wed Aug 12 21:06:57 GMT 2020, loginIP=127.0.0.1, lastLoginDate=Wed Aug 12 21:06:57 GMT 2020, lastLoginIP=, lastFailedLoginDate=null, failedLoginAttempts=0, lockout=false, lockoutDate=null, agreedToTermsOfUse=false, emailAddressVerified=true, status=0} from LDAP server 38669 to company 20101
      2020-08-12 21:07:18.193 DEBUG [http-nio-8080-exec-2][LDAPUserImporterImpl:1648] Finished update for user {mvccVersion=3, uuid=3c536893-4db9-b32c-4230-151ad78018a8, externalReferenceCode=, userId=38671, companyId=20101, createDate=Wed Aug 12 21:06:57 GMT 2020, modifiedDate=Wed Aug 12 21:07:18 GMT 2020, defaultUser=false, contactId=38672, password={PBKDF2WITHHMACSHA1}AAAAoAAB9AB4eNG7zJVPIiTAl/MtG5zghp8EFtYKR7uo4Fr+, passwordEncrypted=true, passwordReset=false, passwordModifiedDate=Wed Aug 12 16:55:21 GMT 2020, digest=79a5850d0aa94a23107d9acc0b07321b,559abf8885d392059ebe580b5ff3cef1,660de5b814b070d6def59089b32ee09d, reminderQueryQuestion=, reminderQueryAnswer=, graceLoginCount=0, screenName=testuser, [email protected], facebookId=0, googleUserId=, ldapServerId=38669, openId=, portraitId=0, languageId=en_US, timeZoneId=UTC, greeting=Welcome testuser testuser!, comments=, firstName=testuser, middleName=, lastName=testuser, jobTitle=, loginDate=Wed Aug 12 21:06:57 GMT 2020, loginIP=127.0.0.1, lastLoginDate=Wed Aug 12 21:06:57 GMT 2020, lastLoginIP=, lastFailedLoginDate=null, failedLoginAttempts=0, lockout=false, lockoutDate=null, agreedToTermsOfUse=false, emailAddressVerified=true, status=0} in 160ms
      2020-08-12 21:07:44.163 DEBUG [http-nio-8080-exec-7][DefaultLDAPToPortalConverter:119] Screen name testuser and email address [email protected]
      2020-08-12 21:07:44.165 DEBUG [http-nio-8080-exec-7][LDAPUserImporterImpl:1513] Updating existing user {mvccVersion=5, uuid=3c536893-4db9-b32c-4230-151ad78018a8, externalReferenceCode=, userId=38671, companyId=20101, createDate=Wed Aug 12 21:06:57 GMT 2020, modifiedDate=Wed Aug 12 21:07:18 GMT 2020, defaultUser=false, contactId=38672, password={PBKDF2WITHHMACSHA1}AAAAoAAB9AB4eNG7zJVPIiTAl/MtG5zghp8EFtYKR7uo4Fr+, passwordEncrypted=true, passwordReset=false, passwordModifiedDate=Wed Aug 12 16:55:21 GMT 2020, digest=79a5850d0aa94a23107d9acc0b07321b,559abf8885d392059ebe580b5ff3cef1,660de5b814b070d6def59089b32ee09d, reminderQueryQuestion=, reminderQueryAnswer=, graceLoginCount=0, screenName=testuser, [email protected], facebookId=0, googleUserId=, ldapServerId=38669, openId=, portraitId=0, languageId=en_US, timeZoneId=UTC, greeting=Welcome testuser testuser!, comments=, firstName=testuser, middleName=, lastName=testuser, jobTitle=, loginDate=Wed Aug 12 21:07:18 GMT 2020, loginIP=127.0.0.1, lastLoginDate=Wed Aug 12 21:06:57 GMT 2020, lastLoginIP=127.0.0.1, lastFailedLoginDate=null, failedLoginAttempts=0, lockout=false, lockoutDate=null, agreedToTermsOfUse=false, emailAddressVerified=true, status=0} from LDAP server 38669 to company 20101
      2020-08-12 21:07:44.308 DEBUG [http-nio-8080-exec-7][LDAPUserImporterImpl:1648] Finished update for user {mvccVersion=5, uuid=3c536893-4db9-b32c-4230-151ad78018a8, externalReferenceCode=, userId=38671, companyId=20101, createDate=Wed Aug 12 21:06:57 GMT 2020, modifiedDate=Wed Aug 12 21:07:44 GMT 2020, defaultUser=false, contactId=38672, password={PBKDF2WITHHMACSHA1}AAAAoAAB9ABXDQCLR2ChoNaZsDntAabWmrs0wuvCscsIlT5i, passwordEncrypted=true, passwordReset=false, passwordModifiedDate=Wed Aug 12 16:55:21 GMT 2020, digest=79a5850d0aa94a23107d9acc0b07321b,559abf8885d392059ebe580b5ff3cef1,660de5b814b070d6def59089b32ee09d, reminderQueryQuestion=, reminderQueryAnswer=, graceLoginCount=0, screenName=testuser, [email protected], facebookId=0, googleUserId=, ldapServerId=38669, openId=, portraitId=0, languageId=en_US, timeZoneId=UTC, greeting=Welcome testuser testuser!, comments=, firstName=testuser, middleName=, lastName=testuser, jobTitle=, loginDate=Wed Aug 12 21:07:18 GMT 2020, loginIP=127.0.0.1, lastLoginDate=Wed Aug 12 21:06:57 GMT 2020, lastLoginIP=127.0.0.1, lastFailedLoginDate=null, failedLoginAttempts=0, lockout=false, lockoutDate=null, agreedToTermsOfUse=false, emailAddressVerified=true, status=0} in 143ms
      

      The difference is the second instance of the "Finished update for user" message. There is no debug logging when the method returns early and does not perform an update on the user so this is the only difference that is easily seen without the need of debugging.

        Attachments

          Activity

            People

            Assignee:
            della.wang Della Wang (Inactive)
            Reporter:
            jonathan.mccann Jonathan McCann
            Participants of an Issue:
            Recent user:
            Tomáš Polešovský
            Engineering Assignee:
            Jonathan McCann
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              1 year, 4 weeks, 3 days ago

                Packages

                Version Package
                7.2.10 DXP FP8
                7.2.10.3 DXP SP3
                7.2.X
                7.3.5 CE GA6
                7.3.10 DXP GA1
                Master