]
Farah Juma reassigned ELY-1282:
-------------------------------
Assignee: Farah Juma (was: Darran Lofthouse)
Regression against ER1, When HTTP mechanism misconfigured, then
deployment doesn't fail anymore
-----------------------------------------------------------------------------------------------
Key: ELY-1282
URL:
https://issues.jboss.org/browse/ELY-1282
Project: WildFly Elytron
Issue Type: Bug
Reporter: Martin Choma
Assignee: Farah Juma
Priority: Blocker
When only one disabled mechanism is configured for undertow deployment
{code}
<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>
{code}
And in web.xml is configured BASIC authentication
{code}
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>Test realm</realm-name>
</login-config>
{code}
Till ER1 such configuration leads to deployment failure and message "There are no
mechanisms available from the HttpAuthenticationFactory"
{code}
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.
{code}
In ER2 application is deployed succesfully
{code}
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")
{code}