Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-12068

Regression against ER1, When HTTP mechanism misconfigured, then deployment doesn't fail anymore

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Blocker
    • 7.1.0.ER3
    • 7.1.0.ER2
    • Security
    • None
    • Hide
      • Run internal TS
        git clone git@gitlab.mw.lab.eng.bos.redhat.com:jbossqe-eap/tests-security.git
        ./build-elytron.sh clean test -Dversion.jboss.bom=7.1.0.GA -Dversion.wildfly.core=3.0.0.Beta28-redhat-1 -Dmaven.repo.local=/home/mchoma/workspace/eap-versions/7.1.0.ER2/jboss-eap-7.1.0.GA-maven-repository/maven-repository   -Djboss.dist.zip=/home/mchoma/workspace/eap-versions/7.1.0.ER2/jboss-eap-7.1.0.ER2.2.zip -Dtest=ConfigurableHttpServerMechanismFactoryTestCase -DtestLogToFile=false
        
      • Manually
        • On ER1
          deploy elytron-app.war
          ./standalone -c standalone-ER1.xml
          deployment fail with "There are no mechanisms available from the HttpAuthenticationFactory"
        • On ER2
          deploy elytron-app.war
          ./standalone -c standalone-ER2.xml
          deployment is deployed
      Show
      Run internal TS git clone git@gitlab.mw.lab.eng.bos.redhat.com:jbossqe-eap/tests-security.git ./build-elytron.sh clean test -Dversion.jboss.bom=7.1.0.GA -Dversion.wildfly.core=3.0.0.Beta28-redhat-1 -Dmaven.repo.local=/home/mchoma/workspace/eap-versions/7.1.0.ER2/jboss-eap-7.1.0.GA-maven-repository/maven-repository -Djboss.dist.zip=/home/mchoma/workspace/eap-versions/7.1.0.ER2/jboss-eap-7.1.0.ER2.2.zip -Dtest=ConfigurableHttpServerMechanismFactoryTestCase -DtestLogToFile= false Manually On ER1 deploy elytron-app.war ./standalone -c standalone-ER1.xml deployment fail with "There are no mechanisms available from the HttpAuthenticationFactory" On ER2 deploy elytron-app.war ./standalone -c standalone-ER2.xml deployment is deployed

    Description

      When only one disabled mechanism is configured for undertow deployment

      	<http-authentication-factory name="elytron-http-authn-factory" http-server-mechanism-factory="wrongConfigurableHttpServerMechanismFactory" security-domain="ApplicationDomain">
      	    <mechanism-configuration>
      		<mechanism mechanism-name="BASIC">
      		    <mechanism-realm realm-name="Some realm"/>
      		</mechanism>
      	    </mechanism-configuration>
      	</http-authentication-factory>
      
      	<configurable-http-server-mechanism-factory name="wrongConfigurableHttpServerMechanismFactory" http-server-mechanism-factory="aggregateHttpServerMechanismFactory">
      	    <filters>
      		<filter pattern="BASIC" enabling="false"/>
      	    </filters>
      	</configurable-http-server-mechanism-factory>
      
      	<application-security-domains>
      	    <application-security-domain name="ApplicationDomain" http-authentication-factory="elytron-http-authn-factory"/>
      	</application-security-domains>
      
      

      And in web.xml is configured BASIC authentication

          <login-config>
              <auth-method>BASIC</auth-method>
              <realm-name>Test realm</realm-name>
          </login-config>
      

      Till ER1 such configuration leads to deployment failure and message "There are no mechanisms available from the HttpAuthenticationFactory"

      07:48:46,765 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8) WFLYSRV0027: Starting deployment of "elytron-app.war" (runtime-name: "elytron-app.war")
      07:48:46,883 INFO  [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-5) ISPN000128: Infinispan version: Infinispan 'Chakra' 8.2.6.Final-redhat-1
      07:48:46,887 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-6) WFLYUT0006: Undertow HTTPS listener https listening on 127.0.0.1:8443
      07:48:46,984 INFO  [org.jboss.ws.common.management] (MSC service thread 1-3) JBWS022052: Starting JBossWS 5.1.8.Final-redhat-1 (Apache CXF 3.1.11.redhat-1) 
      07:48:47,333 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 63) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./elytron-app: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./elytron-app: java.lang.RuntimeException: java.lang.IllegalStateException: WFLYUT0084: There are no mechanisms available from the HttpAuthenticationFactory.
      	at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:84)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:748)
      	at org.jboss.threads.JBossThread.run(JBossThread.java:320)
      Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: WFLYUT0084: There are no mechanisms available from the HttpAuthenticationFactory.
      	at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:241)
      	at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:99)
      	at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:81)
      	... 6 more
      Caused by: java.lang.IllegalStateException: WFLYUT0084: There are no mechanisms available from the HttpAuthenticationFactory.
      	at org.wildfly.extension.undertow.ApplicationSecurityDomainDefinition$ApplicationSecurityDomainService.initialSecurityHandler(ApplicationSecurityDomainDefinition.java:460)
      	at org.wildfly.extension.undertow.ApplicationSecurityDomainDefinition$ApplicationSecurityDomainService.lambda$applyElytronSecurity$2(ApplicationSecurityDomainDefinition.java:422)
      	at io.undertow.servlet.core.DeploymentManagerImpl.setupSecurityHandlers(DeploymentManagerImpl.java:415)
      	at io.undertow.servlet.core.DeploymentManagerImpl.access$600(DeploymentManagerImpl.java:119)
      	at io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:211)
      	at io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:174)
      	at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)
      	at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
      	at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1704)
      	at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1704)
      	at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1704)
      	at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1704)
      	at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:239)
      	... 8 more
      
      07:48:47,341 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "elytron-app.war")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.undertow.deployment.default-server.default-host./elytron-app" => "java.lang.RuntimeException: java.lang.IllegalStateException: WFLYUT0084: There are no mechanisms available from the HttpAuthenticationFactory.
          Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: WFLYUT0084: There are no mechanisms available from the HttpAuthenticationFactory.
          Caused by: java.lang.IllegalStateException: WFLYUT0084: There are no mechanisms available from the HttpAuthenticationFactory."}}
      07:48:47,370 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 37) WFLYSRV0010: Deployed "elytron-app.war" (runtime-name : "elytron-app.war")
      07:48:47,373 INFO  [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
      WFLYCTL0186:   Services which failed to start:      service jboss.undertow.deployment.default-server.default-host./elytron-app: java.lang.RuntimeException: java.lang.IllegalStateException: WFLYUT0084: There are no mechanisms available from the HttpAuthenticationFactory.
      

      In ER2 application is deployed succesfully

      07:50:31,041 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) WFLYSRV0027: Starting deployment of "elytron-app.war" (runtime-name: "elytron-app.war")
      07:50:31,136 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-1) WFLYUT0006: Undertow HTTPS listener https listening on 127.0.0.1:8443
      07:50:31,160 INFO  [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-7) ISPN000128: Infinispan version: Infinispan 'Chakra' 8.2.7.Final-redhat-1
      07:50:31,216 INFO  [org.jboss.ws.common.management] (MSC service thread 1-3) JBWS022052: Starting JBossWS 5.1.8.Final-redhat-1 (Apache CXF 3.1.11.redhat-1) 
      07:50:31,661 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 62) WFLYUT0021: Registered web context: '/elytron-app' for server 'default-server'
      07:50:31,683 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 37) WFLYSRV0010: Deployed "elytron-app.war" (runtime-name : "elytron-app.war")
      

      Attachments

        1. elytron-app.war
          0.8 kB
        2. standalone-ER1.xml
          29 kB
        3. standalone-ER2.xml
          29 kB

        Issue Links

          Activity

            People

              fjuma1@redhat.com Farah Juma
              mchoma@redhat.com Martin Choma
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: