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

Duplicate Screen Name exceptions are not being logged in SAML context

    Details

      Description

      When using Liferay as a SAML SP, if a user that does not currently exist tries to log in via SAML, the user will be added to the system. If however, another user with the same screen name already exists, the SAML code will not be able to add a user account and this exception will be raised:

      com.liferay.portal.kernel.exception.UserScreenNameException$MustNotBeDuplicate

      When testing with 7.3 EP4, possibly due to changes introduced with https://issues.liferay.com/browse/LPS-105162, it seems that this exception is no longer logged, so admins have no context on why a particular log in failed.  In 7.2 these exceptions were logged.

      Steps to reproduce:

      1. Set up Liferay as a SAML SP and configure to sync via email address and set up the attribute mappings as follows:
        emailAddress=emailAddress
        screenName=screenName
        firstName=firstName
        lastName=lastName
        uuid=uuid
      2. Set up another Liferay instance as an IdP with an attribute as follows:

      static:screenName=clash

      1. Create a user in the IdP, e.g. with email address "user@liferay.com"
      2. Create another user in the IdP e.g. with email address "user2@liferay.com"
      3. Try to log into Liferay with the account "user@liferay.com"
      4. Try to log into Liferay with the account "user2@liferay.com"

      Expected Result:

      The exception com.liferay.portal.kernel.exception.UserScreenNameException$MustNotBeDuplicate is logged with details about the conflicting user accounts.

      Actual result:

      No exception is logged

       

       

        Attachments

          Activity

            People

            Assignee:
            della.wang Della Wang (Inactive)
            Reporter:
            allen.ziegenfus Allen Ziegenfus
            Participants of an Issue:
            Recent user:
            Tibor Lipusz
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              23 weeks, 5 days ago

                Packages

                Version Package
                7.3.X
                7.3.5 CE GA6
                7.3.10 DXP GA1
                Master