[
https://issues.jboss.org/browse/WFLY-9064?page=com.atlassian.jira.plugin....
]
Ondrej Kotek moved JBEAP-12018 to WFLY-9064:
--------------------------------------------
Project: WildFly (was: JBoss Enterprise Application Platform)
Key: WFLY-9064 (was: JBEAP-12018)
Workflow: GIT Pull Request workflow (was: CDW with loose statuses v1)
Component/s: JPA / Hibernate
Test Suite
(was: Hibernate)
(was: Test Suite)
Affects Version/s: 11.0.0.Beta1
(was: 7.1.0.ER2)
HibernateNativeAPINaturalIdTestCase fails with security manager
---------------------------------------------------------------
Key: WFLY-9064
URL:
https://issues.jboss.org/browse/WFLY-9064
Project: WildFly
Issue Type: Bug
Components: JPA / Hibernate, Test Suite
Affects Versions: 11.0.0.Beta1
Reporter: Ondrej Kotek
Assignee: Gail Badner
Priority: Critical
Labels: security-manager
{{HibernateNativeAPINaturalIdTestCase}} fails with security manager because of missing
permission {{"("java.lang.RuntimePermission"
"createClassLoader")"}}:
{noformat}
javax.ejb.EJBException: java.lang.RuntimeException: Could not setup config
at org.jboss.as.ejb3.tx.BMTInterceptor.handleException(BMTInterceptor.java:83)
at
org.jboss.as.ejb3.tx.StatefulBMTInterceptor.handleInvocation(StatefulBMTInterceptor.java:96)
...
Caused by: java.lang.RuntimeException: Could not setup config
at
org.jboss.as.test.integration.hibernate.naturalid.SFSBHibernateSFNaturalId.setupConfig(SFSBHibernateSFNaturalId.java:69)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...
Caused by: java.security.AccessControlException: WFSM000001: Permission check failed
(permission "("java.lang.RuntimePermission"
"createClassLoader")" in code source
"(vfs:/content/hibernate4naturalid_test.ear/beans.jar <no signer
certificates>)" of "ModuleClassLoader for Module
"deployment.hibernate4naturalid_test.ear.beans.jar" from Service Module
Loader")
at
org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:278)
at
org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:175)
at java.lang.SecurityManager.checkCreateClassLoader(SecurityManager.java:611)
at
org.wildfly.security.manager.WildFlySecurityManager.checkCreateClassLoader(WildFlySecurityManager.java:308)
...
{noformat}
After adding the permission, there is another missing permission
{{"("java.io.FilePermission"
"/home/okotek/git/wildfly/dist/target/wildfly-11.0.0.Beta1-SNAPSHOT/modules/system/layers/base/org/hibernate/main/hibernate-envers-5.1.8.Final.jar"
"read")"}}. A privileged section is missing probably.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)