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

AuthVerifier configurations generate multiple unnecessary OSGI configuration change events during startup

    Details

      Description

      Description
      The master node is being notified multiple times that AuthVerifier configurations are being modified, while a slave node is starting up.

      Note: This only happens when using a bundled instance, when the com.liferay.portal.security.auth.verifier module is deployed via LPKG.

      Steps to Reproduce: Bundle + DE-8 fixpack

      1. Configure two Liferay DXP bundles + DE-8 fixpack
      2. Configure Multicast Clustering between the two nodes
      3. Startup the first node in the cluster
      4. Start a debugger for the first node
        1. Breakpoint on: Line 72
          1. Class: com/liferay/portal/security/auth/verifier/internal/module/BaseAuthVerifierPublisher.java
          2. Method: protected void modified(BundleContext bundleContext, Map<String, Object> properties)
          3. Line: deactivate();
        2. Sample Breakpoint: sample_breakpoint_settings.png
      5. Make sure the 1st node is completed started
      6. Startup the 2nd node
        1. Make sure to clear osgi/state folder if Node 2 is not a fresh instance
      7. Notice the breakpoints
        1. Can add logging instead of suspending the call on breakpoint (at least in intellij)

      Expected behavior: The master node is not being notified regarding AuthVerifier configurations being modified.
      Actual behavior: The master node is being notified multiple times regarding AuthVerifier configurations being modified.

      Sample Breakpoint Log

      com.liferay.portal.security.auth.verifier.basic.auth.header.BasicAuthHeaderAuthVerifier@7c853f6a
      com.liferay.portal.security.auth.verifier.basic.auth.header.BasicAuthHeaderAuthVerifier@6f8d81be
      com.liferay.portal.security.auth.verifier.portal.session.PortalSessionAuthVerifier@4a567eb9
      com.liferay.portal.security.auth.verifier.portal.session.PortalSessionAuthVerifier@37661f14
      com.liferay.portal.security.auth.verifier.tunnel.TunnelAuthVerifier@5421778a
      com.liferay.portal.security.auth.verifier.tunnel.TunnelAuthVerifier@3e08f715
      

      Steps to demonstrate that the issue is not reproducible when not deployed via lpkg

      1. Continuing from the steps above
      2. Shutdown Node 2
      3. Find com.liferay.portal.security.auth.verifier-2.0.2.jar within osgi/marketplace/Liferay Foundation.lpkg
      4. Copy com.liferay.portal.security.auth.verifier-2.0.2.jar to the osgi/marketplace/override folder
      5. Startup the 2nd node
        1. Make sure to clear osgi/state folder if Node 2 is not a fresh instance

      Actual behavior: The master node is not being notified regarding the AuthVerifier configurations being modified.

        Attachments

          Activity

            People

            • Assignee:
              joyce.wang Joyce Wang
              Reporter:
              eric.yan Eric Yan
              Participants of an Issue:
              Recent user:
              Csaba Turcsan
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                2 years, 46 weeks, 2 days ago

                Packages

                Version Package
                7.0.0 DXP FP10
                7.0.0 DXP SP2
                7.0.3 CE GA4
                Master