Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install auth-trust-device extension fails #30

Open
arozmarin opened this issue Jul 28, 2021 · 0 comments
Open

install auth-trust-device extension fails #30

arozmarin opened this issue Jul 28, 2021 · 0 comments

Comments

@arozmarin
Copy link

Hi,

I'm try to test out auth-trust-device extension and it away break my keycloak server. I create jar file
auth-trust-device-1.0.0.0-SNAPSHOT.jar and copy to /keycloak/standalone/deployment and I'll get this error

16:43:04,085 INFO [org.jboss.as.repository] (DeploymentScanner-threads - 2) WFLYDR0001: Content added at location /keycloak/standalone/data/content/ec/239f2ec1d9098df712980dc6c0ef1e31d6f134/content
16:43:04,139 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) WFLYSRV0027: Starting deployment of "auth-trust-device-1.0.0.0-SNAPSHOT.jar" (runtime-name: "auth-trust-device-1.0.0.0-SNAPSHOT.jar")
16:43:04,782 WARN [org.jboss.as.dependency.private] (MSC service thread 1-1) WFLYSRV0018: Deployment "deployment.auth-trust-device-1.0.0.0-SNAPSHOT.jar" is using a private module ("org.keycloak.keycloak-server-spi-private") which may be changed or removed in future versions without notice.
16:43:04,784 WARN [org.jboss.as.dependency.private] (MSC service thread 1-1) WFLYSRV0018: Deployment "deployment.auth-trust-device-1.0.0.0-SNAPSHOT.jar" is using a private module ("org.apache.httpcomponents") which may be changed or removed in future versions without notice.
16:43:04,788 WARN [org.jboss.as.dependency.private] (MSC service thread 1-1) WFLYSRV0018: Deployment "deployment.auth-trust-device-1.0.0.0-SNAPSHOT.jar" is using a private module ("org.keycloak.keycloak-services") which may be changed or removed in future versions without notice.
16:43:04,793 WARN [org.jboss.as.dependency.private] (MSC service thread 1-1) WFLYSRV0018: Deployment "deployment.auth-trust-device-1.0.0.0-SNAPSHOT.jar" is using a private module ("org.bouncycastle") which may be changed or removed in future versions without notice.
16:43:04,794 WARN [org.jboss.as.dependency.private] (MSC service thread 1-1) WFLYSRV0018: Deployment "deployment.auth-trust-device-1.0.0.0-SNAPSHOT.jar" is using a private module ("com.google.guava") which may be changed or removed in future versions without notice.
16:43:04,795 WARN [org.jboss.as.dependency.private] (MSC service thread 1-1) WFLYSRV0018: Deployment "deployment.auth-trust-device-1.0.0.0-SNAPSHOT.jar" is using a private module ("org.apache.commons.io") which may be changed or removed in future versions without notice.
16:43:04,797 WARN [org.jboss.as.dependency.deprecated] (MSC service thread 1-1) WFLYSRV0221: Deployment "deployment.auth-trust-device-1.0.0.0-SNAPSHOT.jar" is using a deprecated module ("javax.api") which may be removed in future versions without notice.
16:43:04,812 INFO [org.keycloak.subsystem.server.extension.KeycloakProviderDeploymentProcessor] (MSC service thread 1-2) Deploying Keycloak provider: auth-trust-device-1.0.0.0-SNAPSHOT.jar
16:43:04,939 WARN [org.keycloak.services] (MSC service thread 1-2) KC-SERVICES0047: jpa-trusted-device-entity (com.github.thomasdarimont.keycloak.trustdevice.model.jpa.TrustedDeviceJpaEntityProviderFactory) is implementing the internal SPI jpa-entity-provider. This SPI is internal and may change without notice
16:43:05,010 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.unit."auth-trust-device-1.0.0.0-SNAPSHOT.jar".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."auth-trust-device-1.0.0.0-SNAPSHOT.jar".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of deployment "auth-trust-device-1.0.0.0-SNAPSHOT.jar"
at [email protected]//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:189)
at [email protected]//org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739)
at [email protected]//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701)
at [email protected]//org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)
at [email protected]//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at [email protected]//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
at [email protected]//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at [email protected]//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1363)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.util.ServiceConfigurationError: org.keycloak.authentication.RequiredActionFactory: Provider com.github.thomasdarimont.keycloak.trustdevice.actions.RegisterTrustedDeviceActionFactory could not be instantiated
at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:582)
at java.base/java.util.ServiceLoader$ProviderImpl.newInstance(ServiceLoader.java:804)
at java.base/java.util.ServiceLoader$ProviderImpl.get(ServiceLoader.java:722)
at java.base/java.util.ServiceLoader$3.next(ServiceLoader.java:1395)
at [email protected]//org.keycloak.provider.DefaultProviderLoader.load(DefaultProviderLoader.java:60)
at [email protected]//org.keycloak.provider.ProviderManager.load(ProviderManager.java:94)
at [email protected]//org.keycloak.services.DefaultKeycloakSessionFactory.loadFactories(DefaultKeycloakSessionFactory.java:294)
at [email protected]//org.keycloak.services.DefaultKeycloakSessionFactory.deploy(DefaultKeycloakSessionFactory.java:154)
at [email protected]//org.keycloak.provider.ProviderManagerRegistry.deploy(ProviderManagerRegistry.java:42)
at [email protected]//org.keycloak.subsystem.server.extension.KeycloakProviderDeploymentProcessor.deploy(KeycloakProviderDeploymentProcessor.java:58)
at [email protected]//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:182)
... 8 more
Caused by: java.lang.NoClassDefFoundError: org/owasp/html/HtmlPolicyBuilder
at deployment.auth-trust-device-1.0.0.0-SNAPSHOT.jar//com.github.thomasdarimont.keycloak.trustdevice.actions.RegisterTrustedDeviceAction.(RegisterTrustedDeviceAction.java:34)
at deployment.auth-trust-device-1.0.0.0-SNAPSHOT.jar//com.github.thomasdarimont.keycloak.trustdevice.actions.RegisterTrustedDeviceActionFactory.(RegisterTrustedDeviceActionFactory.java:16)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at java.base/java.util.ServiceLoader$ProviderImpl.newInstance(ServiceLoader.java:780)
... 17 more
Caused by: java.lang.ClassNotFoundException: org.owasp.html.HtmlPolicyBuilder from [Module "deployment.auth-trust-device-1.0.0.0-SNAPSHOT.jar" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:255)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
... 24 more

16:43:05,046 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 2) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "auth-trust-device-1.0.0.0-SNAPSHOT.jar")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit."auth-trust-device-1.0.0.0-SNAPSHOT.jar".POST_MODULE" => "WFLYSRV0153: Failed to process phase POST_MODULE of deployment "auth-trust-device-1.0.0.0-SNAPSHOT.jar"
Caused by: java.util.ServiceConfigurationError: org.keycloak.authentication.RequiredActionFactory: Provider com.github.thomasdarimont.keycloak.trustdevice.actions.RegisterTrustedDeviceActionFactory could not be instantiated
Caused by: java.lang.NoClassDefFoundError: org/owasp/html/HtmlPolicyBuilder
Caused by: java.lang.ClassNotFoundException: org.owasp.html.HtmlPolicyBuilder from [Module "deployment.auth-trust-device-1.0.0.0-SNAPSHOT.jar" from Service Module Loader]"}}
16:43:05,570 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) WFLYSRV0010: Deployed "auth-trust-device-1.0.0.0-SNAPSHOT.jar" (runtime-name : "auth-trust-device-1.0.0.0-SNAPSHOT.jar")
16:43:05,573 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) WFLYCTL0183: Service status report
WFLYCTL0186: Services which failed to start: service jboss.deployment.unit."auth-trust-device-1.0.0.0-SNAPSHOT.jar".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of deployment "auth-trust-device-1.0.0.0-SNAPSHOT.jar"

Any idea what I'm doing wrong?
p.s. I'm new to Keycloak and maybe I'm doing something wrong. Any help would be welcome.

Thanks Ales

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant