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

Auth Verifier configurations cannot be enabled after disabling

    Details

      Description

      Description
      An IllegalStateException is thrown when an Auth Verifier configuration is disabled and re-enabled.

      Steps to Reproduce

      1. Go to Control Panel -> System settings -> Foundation
      2. Choose one of the following Auth Verifier Configurations:
        1. Basic Auth Header Verifiers
        2. Digest Authentication Auth Verifiers
        3. Portal Sessions Auth Verifiers
        4. Request Parameter Auth Verifiers
        5. Tunnel Auth Verifiers
      3. Edit the configuration entry
      4. Check if the selected Auth Verifier configuration has the enabled option checked
        1. If enabled is not checked, check it and save
      5. Uncheck enabled option and save
      6. Check enabled option and save
      7. Look at the console log

      Expected behavior: No IllegalStateExceptions are thrown.
      Actual behavior: IllegalStateExceptions are thrown.

      Errors/Logs - Sample Exception for Basic Auth Header Verifiers

      19:43:43,171 ERROR [CM Event Dispatcher (Fire ConfigurationEvent: pid=com.liferay.portal.security.auth.verifier.portal.session.module.configuration.PortalSessionAuthVerifierConfiguration.aead9cba-37fa-42d2-91f5-aac02f522eec)][com_liferay_portal_security_auth_verifier:97] [com.liferay.portal.security.auth.verifier.internal.portal.session.module.PortalSessionAuthVerifierPublisher(400)] The modified method has thrown an exception
      java.lang.IllegalStateException: The service has been unregistered
      	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:206)
      	at com.liferay.portal.security.auth.verifier.internal.module.BaseAuthVerifierPublisher.deactivate(BaseAuthVerifierPublisher.java:63)
      	at com.liferay.portal.security.auth.verifier.internal.portal.session.module.PortalSessionAuthVerifierPublisher.deactivate(PortalSessionAuthVerifierPublisher.java:51)
      	at com.liferay.portal.security.auth.verifier.internal.module.BaseAuthVerifierPublisher.modified(BaseAuthVerifierPublisher.java:72)
      	at com.liferay.portal.security.auth.verifier.internal.portal.session.module.PortalSessionAuthVerifierPublisher.modified(PortalSessionAuthVerifierPublisher.java:64)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:222)
      	at org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:37)
      	at org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:615)
      	at org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:499)
      	at org.apache.felix.scr.impl.helper.ActivateMethod.invoke(ActivateMethod.java:295)
      	at org.apache.felix.scr.impl.manager.SingleComponentManager.invokeModifiedMethod(SingleComponentManager.java:729)
      	at org.apache.felix.scr.impl.manager.SingleComponentManager.modify(SingleComponentManager.java:684)
      	at org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:602)
      	at org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:566)
      	at org.apache.felix.scr.impl.config.ConfigurableComponentHolder.configurationUpdated(ConfigurableComponentHolder.java:419)
      	at org.apache.felix.scr.impl.config.ConfigurationSupport.configurationEvent(ConfigurationSupport.java:315)
      	at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.sendEvent(ConfigurationManager.java:2046)
      	at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.run(ConfigurationManager.java:2014)
      	at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:143)
      	at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:110)
      	at java.lang.Thread.run(Thread.java:745)
      

        Attachments

          Activity

            People

            Assignee:
            sylvia.luan Sylvia Luan
            Reporter:
            eric.yan Eric Yan
            Participants of an Issue:
            Recent user:
            Csaba Turcsan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              5 years, 1 day ago

                Packages

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