-
Bug
-
Resolution: Done
-
Major
-
None
-
1.4.0.Final
-
None
Arquillian is not registering all the security permissions required to run resteasy tests on wildfly with
the sercurity manager enabled.
There are 24+ Resteasy testsuite tests failing when run with the security manager.
These tests are running in the container (i.e. using the @RunWith(Arquillian.class) annotation.
The @RunAsClient is not being used.)
The exception thrown is,
Caused by: java.lang.ClassNotFoundException: org.glassfish.jersey.client.JerseyClientBuilder from
[Module "javax.ws.rs.api" version 1.0.2.Final from local module loader @4b3ed2f0
(finder: local module finder @4fad9bb2
(roots: /home/rsearls/j1/wildfly/dist/target/wildfly-17.0.0.Beta1-SNAPSHOT/modules,/home/rsearls/j1/wildfly/dist/target/wildfly-17.0.0.Beta1-SNAPSHOT/modules/system/layers/base,/home/rsearls/j1/wildfly/dist/target/wildfly-17.0.0.Beta1-SNAPSHOT/modules/system/add-ons/spring))]
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)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:315)
at javax.ws.rs.api@1.0.2.Final//javax.ws.rs.client.FactoryFinder.newInstance(FactoryFinder.java:119)
at javax.ws.rs.api@1.0.2.Final//javax.ws.rs.client.FactoryFinder.find(FactoryFinder.java:226)
at javax.ws.rs.api@1.0.2.Final//javax.ws.rs.client.ClientBuilder.newBuilder(ClientBuilder.java:96)
This is due to a missing ProtectionDomain with ("<all permissions>" "<all actions>") for
/home/rsearls/j1/wildfly/dist/target/wildfly-17.0.0.Beta1-SNAPSHOT/modules/system/layers/base/org/jboss/resteasy/resteasy-jaxrs/main/resteasy-client-4.1.0-SNAPSHOT.jar
When wildfly starts up (with or without the security manager) it registers a ProtectionDomain with ("<all permissions>"
"<all actions>" for each jar in the wildfly-17.0.0.Beta1-SNAPSHOT/modules/system. These ProtectionDomains are active when the Resteasy container runs. When Arquillian runs only 10 ProtectionDomains are defined (see attachment List-10-ProtectionDomains.txt). This appears to be the cause of the problem.
A full stacktrace is provided in the attachments.
- is related to
-
RESTEASY-2179 Tests failing when using the security manager
- Resolved