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

Allow authentication type for remote staging to include Screen name/ User Id, not only user's email addresss

    Details

    • Type: Feature Request
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Staging
    • Labels:
      None

      Description

      It would be helpful if Liferay users can successfully access the remotes staged site through authentication type that includes screen name/user_Id and not only email.

      Here is a scenario that explains the situation more clearly:

      1. Unpack two clean bundles
      2. Modify the server.xml of one bundle to run on 9080
      3. Create a portal-ext for both bundle which have the following properties:
      -users.email.address.required=false
      -company.security.auth.type=screenName
      4. Start both bundles
      5. On server 8080 create a site called Zebra
      6. On server 9080 create a site called Zebra Remote
      7. Note the site ID generated when creating Zebra Remote
      8. On server 8080 modify the staging setting of the Zebra Site
      9. Enable Remote Staging to localhost:9080 with the site ID generated from Zebra Remote
      10. On both servers create a user with the screen name User and no email address (an email address will be automatically generated)
      11. Set the passwords for both users
      12. Add the user to the site Zebra on 8080 and Zebra Remote on 9080
      13. Grant the Site Administrator role to this user on each server
      14. Sign in as User on both servers
      15. Ensure that the passwords are still the same, if not change them
      16. On server 8080 create a page on the Zebra site
      17. Publish the page.

      Here is the code by default in Liferay:

      Basically the HttpPrincipal is being generated with email disregarding the company's auth mechanism which is screenname.

      StagingImpl (line 2013)

      HttpPrincipal httpPrincipal = new HttpPrincipal(
      url, user.getEmailAddress(), user.getPassword(),
      user.getPasswordEncrypted());

      // Ping remote host and verify that the group exists

      try

      { GroupServiceHttp.getGroup(httpPrincipal, remoteGroupId); }

      catch (NoSuchGroupException nsge)

      { RemoteExportException ree = new RemoteExportException( RemoteExportException.NO_GROUP); ree.setGroupId(remoteGroupId); throw ree; }

      catch (PrincipalException pe)

      { RemoteExportException ree = new RemoteExportException( RemoteExportException.NO_PERMISSIONS); ree.setGroupId(remoteGroupId); throw ree; }

      catch (SystemException se)

      { RemoteExportException ree = new RemoteExportException( RemoteExportException.BAD_CONNECTION); ree.setURL(url); throw ree; }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                support-lep@liferay.com SE Support
                Reporter:
                ira.chui Ira Chui
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Packages

                  Version Package