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

Remote Services using Liferay Tunnel Servlet does not work for APIs originating from modules

    Details

    • Fix Priority:
      5

      Description

      Description
      Remotely accessing Liferay Services using Liferay Tunnel Servlet only works for portal-core services and not services originating from modules.

      Steps to Reproduce

      1. Setup two Liferay DXP instances
        • Client Instance
        • Remote Instance
      2. Add these portal properties to both instances
        tunnel.servlet.hosts.allowed=CLIENT_INSTANCE_IP
        tunnel.servlet.https.required=false
        tunneling.servlet.shared.secret=1234567890123456
        
        • Make sure to replace CLIENT_INSTANCE_IP with the Client Instance's actual IP Address
          • Ex: tunnel.servlet.hosts.allowed=172.25.0.5
      3. Startup Both Instances
      4. Using Remote Instance:
        1. Navigate to Control Panel --> System Settings
        2. Search for tunnel
        3. Select 'Tunnel Auth Verifiers'
        4. Select '/api/liferay/do'
        5. Append Client Instance's IP Address to Hosts allowed field
          • Ex: 127.0.0.1,SERVER_IP,172.25.0.5
        6. Update
      5. Using Client Instance:
        1. Navigate to Control Panel --> Server Administration --> Script
        2. Select Language Groovy
        3. See attached groovy script: test_tunnel.groovy
          • Update the fields under Remote Settings to reflect your test Remote Instance
        4. Copy the content inside the script into the Script field
        5. Execute the script

      Expected Results: Script should run successfully for both UserServiceUtil and JournalArticleServiceUtil.

      Actual Results: Script does not successfully return method invoked for JournalArticleServiceUtil. ClassNotFoundException is observed on the remote server.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                2 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  1 year, 23 weeks, 6 days ago

                  Packages

                  Version Package