From 1b9a3bf51a9ec585996018d48775e68a94a2333b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Barto=C5=A1?= Date: Tue, 12 Jul 2022 14:45:24 +0200 Subject: [PATCH] Cannot use WebAuthn with WildFly distribution Fixes #12762 --- .../keycloak-server-galleon-pack-licenses.xml | 22 +++++++++++++ .../jackson/core/jackson-core/main/module.xml | 26 +++++++++++++++ .../core/jackson-databind/main/module.xml | 32 +++++++++++++++++++ .../account/AbstractWebAuthnAccountTest.java | 14 ++++++-- 4 files changed, 91 insertions(+), 3 deletions(-) create mode 100644 distribution/galleon-feature-packs/server-galleon-pack/src/main/resources/modules/system/layers/keycloak/com/fasterxml/jackson/core/jackson-core/main/module.xml create mode 100644 distribution/galleon-feature-packs/server-galleon-pack/src/main/resources/modules/system/layers/keycloak/com/fasterxml/jackson/core/jackson-databind/main/module.xml diff --git a/distribution/galleon-feature-packs/server-galleon-pack/src/license/keycloak-server-galleon-pack-licenses.xml b/distribution/galleon-feature-packs/server-galleon-pack/src/license/keycloak-server-galleon-pack-licenses.xml index fc7dbfd02e..359ab6a5a1 100644 --- a/distribution/galleon-feature-packs/server-galleon-pack/src/license/keycloak-server-galleon-pack-licenses.xml +++ b/distribution/galleon-feature-packs/server-galleon-pack/src/license/keycloak-server-galleon-pack-licenses.xml @@ -225,6 +225,28 @@ + + com.fasterxml.jackson.core + jackson-databind + 2.13.2 + + + Apache Software License 2.0 + https://www.apache.org/licenses/LICENSE-2.0.txt + + + + + com.fasterxml.jackson.core + jackson-core + 2.13.2 + + + Apache Software License 2.0 + https://www.apache.org/licenses/LICENSE-2.0.txt + + + diff --git a/distribution/galleon-feature-packs/server-galleon-pack/src/main/resources/modules/system/layers/keycloak/com/fasterxml/jackson/core/jackson-core/main/module.xml b/distribution/galleon-feature-packs/server-galleon-pack/src/main/resources/modules/system/layers/keycloak/com/fasterxml/jackson/core/jackson-core/main/module.xml new file mode 100644 index 0000000000..73df631464 --- /dev/null +++ b/distribution/galleon-feature-packs/server-galleon-pack/src/main/resources/modules/system/layers/keycloak/com/fasterxml/jackson/core/jackson-core/main/module.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/distribution/galleon-feature-packs/server-galleon-pack/src/main/resources/modules/system/layers/keycloak/com/fasterxml/jackson/core/jackson-databind/main/module.xml b/distribution/galleon-feature-packs/server-galleon-pack/src/main/resources/modules/system/layers/keycloak/com/fasterxml/jackson/core/jackson-databind/main/module.xml new file mode 100644 index 0000000000..d8f38d4f59 --- /dev/null +++ b/distribution/galleon-feature-packs/server-galleon-pack/src/main/resources/modules/system/layers/keycloak/com/fasterxml/jackson/core/jackson-databind/main/module.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/webauthn/src/test/java/org/keycloak/testsuite/webauthn/account/AbstractWebAuthnAccountTest.java b/testsuite/integration-arquillian/tests/other/webauthn/src/test/java/org/keycloak/testsuite/webauthn/account/AbstractWebAuthnAccountTest.java index f7560f9f91..fcf48cdd27 100644 --- a/testsuite/integration-arquillian/tests/other/webauthn/src/test/java/org/keycloak/testsuite/webauthn/account/AbstractWebAuthnAccountTest.java +++ b/testsuite/integration-arquillian/tests/other/webauthn/src/test/java/org/keycloak/testsuite/webauthn/account/AbstractWebAuthnAccountTest.java @@ -47,6 +47,9 @@ import org.keycloak.testsuite.webauthn.pages.WebAuthnLoginPage; import org.keycloak.testsuite.webauthn.pages.WebAuthnRegisterPage; import org.openqa.selenium.virtualauthenticator.VirtualAuthenticatorOptions; +import javax.ws.rs.ClientErrorException; + +import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.notNullValue; import static org.hamcrest.MatcherAssert.assertThat; import static org.keycloak.models.AuthenticationExecutionModel.Requirement.REQUIRED; @@ -133,10 +136,15 @@ public abstract class AbstractWebAuthnAccountTest extends AbstractAuthTest imple RequiredActionProviderSimpleRepresentation requiredAction = new RequiredActionProviderSimpleRepresentation(); requiredAction.setProviderId(WebAuthnRegisterFactory.PROVIDER_ID); requiredAction.setName("blahblah"); - testRealmResource().flows().registerRequiredAction(requiredAction); - requiredAction.setProviderId(WebAuthnPasswordlessRegisterFactory.PROVIDER_ID); - testRealmResource().flows().registerRequiredAction(requiredAction); + try { + testRealmResource().flows().registerRequiredAction(requiredAction); + requiredAction.setProviderId(WebAuthnPasswordlessRegisterFactory.PROVIDER_ID); + testRealmResource().flows().registerRequiredAction(requiredAction); + } catch (ClientErrorException e) { + assertThat(e.getResponse(), notNullValue()); + assertThat(e.getResponse().getStatus(), is(409)); + } } protected VirtualAuthenticatorManager getWebAuthnManager() {