keycloaksamlwildfly-26

How do I configure the Keycloak SAML client for Wildfly26?


The Keycloak SAML adapter for Wildfly26 is not working. Is SAML not supported by Keycloak for Wildfly26?

I upgraded from Wildfly24 and migrated from legacy-security to Elytron. I have installed Keycloak20.0.3 modules to Wildfly26 and I have run the adapter-elytron-install-saml.cli. Upon startup I get this when it tries to deploy my web application:

2023-01-19 11:51:48,243 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.deployment.subunit."production-saml.ear"."prod-7.1.0.war".DEPENDENCIES: org.jboss.msc.service.StartException in service jboss.deployment.subunit."production-saml.ear"."prod-7.1.0.war".DEPENDENCIES: WFLYSRV0153: Failed to process phase DEPENDENCIES of subdeployment "prod-7.1.0.war" of deployment "production-saml.ear"
    at org.jboss.as.server@18.1.0.Final//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:189)
    at org.jboss.msc@1.4.13.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739)
    at org.jboss.msc@1.4.13.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701)
    at org.jboss.msc@1.4.13.Final//org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)
    at org.jboss.threads@2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
    at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
    at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
    at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1363)
    at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.RuntimeException: Legacy WildFly security layer is no longer supported by the Keycloak WildFly adapter
    at org.keycloak.keycloak-saml-wildfly-subsystem@20.0.3//org.keycloak.subsystem.adapter.saml.extension.KeycloakDependencyProcessorWildFly.addPlatformSpecificModules(KeycloakDependencyProcessorWildFly.java:42)
    at org.keycloak.keycloak-saml-wildfly-subsystem@20.0.3//org.keycloak.subsystem.adapter.saml.extension.KeycloakDependencyProcessor.deploy(KeycloakDependencyProcessor.java:68)
    at org.jboss.as.server@18.1.0.Final//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:182)
    ... 8 more

2023-01-19 11:51:48,258 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "production-saml.ear")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.subunit.\"production-saml.ear\".\"prod-7.1.0.war\".DEPENDENCIES" => "WFLYSRV0153: Failed to process phase DEPENDENCIES of subdeployment \"prod-7.1.0.war\" of deployment \"production-saml.ear\"
    Caused by: java.lang.RuntimeException: Legacy WildFly security layer is no longer supported by the Keycloak WildFly adapter"}}


Solution

  • Currently there are no Keycloak adapters available for Wildfly 26.

    Currently there is only support for Wildfly versions <= 23. See https://www.keycloak.org/downloads