Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-3367

"java.lang.RuntimePermission" by some tests running with security manager

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Major Major
    • None
    • 7.0.0.ER5, 7.1.0.CR2
    • Test Suite

      Some tests fail with java.security.AccessControlException: WFSM000001: Permission check failed "java.lang.RuntimePermission" "createClassLoader" when security manager is enabled.

      Caused by: java.security.AccessControlException: WFSM000001: Permission check failed (permission "("java.lang.RuntimePermission" "createClassLoader")" in code source "(vfs:/content/hibernate4native_transactiontest.ear/beans.jar <no signer certificates>)" of "null")
      	at org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:273)
      	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:335)
      	at java.lang.ClassLoader.checkCreateClassLoader(ClassLoader.java:274)
      	at java.lang.ClassLoader.<init>(ClassLoader.java:316)
      	at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl$AggregatedClassLoader.<init>(ClassLoaderServiceImpl.java:164)
      	at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl$AggregatedClassLoader.<init>(ClassLoaderServiceImpl.java:160)
      	at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.<init>(ClassLoaderServiceImpl.java:94)
      	at org.hibernate.boot.registry.BootstrapServiceRegistryBuilder.build(BootstrapServiceRegistryBuilder.java:207)
      	at org.hibernate.cfg.Configuration.<init>(Configuration.java:119)
      	at org.jboss.as.test.integration.hibernate.SFSBHibernateTransaction.setupConfig(SFSBHibernateTransaction.java:63)
      	... 200 more
      

      Falling tests

      • ./integration-tests.sh -fae -Dmaven.test.failure.ignore=true -DfailIfNoTests=false -Dsecurity.manager -Dts.basic -Dts.noSmoke -Dtest=org.jboss.as.test.integration.hibernate.Hibernate2LCacheStatsTestCase#testHibernateStatistics
        org.jboss.as.test.integration.hibernate.Hibernate2LCacheStatsTestCase#testHibernateStatistics
      • ./integration-tests.sh -fae -Dmaven.test.failure.ignore=true -DfailIfNoTests=false -Dsecurity.manager -Dts.basic -Dts.noSmoke -Dtest=org.jboss.as.test.integration.hibernate.Hibernate4NativeAPIProviderTestCase#testSimpleOperation
        org.jboss.as.test.integration.hibernate.Hibernate4NativeAPIProviderTestCase#testSimpleOperation
      • ./integration-tests.sh -fae -Dmaven.test.failure.ignore=true -DfailIfNoTests=false -Dsecurity.manager -Dts.basic -Dts.noSmoke -Dtest=org.jboss.as.test.integration.hibernate.HibernateNativeAPITransactionTestCase
        org.jboss.as.test.integration.hibernate.HibernateNativeAPITransactionTestCase#testRollBackOperation
        org.jboss.as.test.integration.hibernate.HibernateNativeAPITransactionTestCase#testSimpleOperation
      • ./integration-tests.sh -fae -Dmaven.test.failure.ignore=true -DfailIfNoTests=false -Dsecurity.manager -Dts.basic -Dts.noSmoke -Dtest=org.jboss.as.test.integration.hibernate.envers.Hibernate4NativeAPIEnversTestCase#testEnversonHibernateNativeAPI
        org.jboss.as.test.integration.hibernate.envers.Hibernate4NativeAPIEnversTestCase#testEnversonHibernateNativeAPI
      • ./integration-tests.sh -fae -Dmaven.test.failure.ignore=true -DfailIfNoTests=false -Dsecurity.manager -Dts.basic -Dts.noSmoke -Dtest=org.jboss.as.test.integration.hibernate.search.HibernateSearchJPATestCase#testFullTextQuery
        org.jboss.as.test.integration.hibernate.search.HibernateSearchJPATestCase#testFullTextQuery
      • ./integration-tests.sh -fae -Dmaven.test.failure.ignore=true -DfailIfNoTests=false -Dsecurity.manager -Dts.basic -Dts.noSmoke -Dtest=org.jboss.as.test.integration.hibernate.secondlevelcache.HibernateSecondLevelCacheTestCase#testSecondLevelCache
        org.jboss.as.test.integration.hibernate.secondlevelcache.HibernateSecondLevelCacheTestCase#testSecondLevelCache
      • ./integration-tests.sh -fae -Dmaven.test.failure.ignore=true -DfailIfNoTests=false -Dsecurity.manager -Dts.basic -Dts.noSmoke -Dtest=org.jboss.as.test.integration.jpa.dsrestart.JpaDsRestartTestCase#testRestartDataSource
        org.jboss.as.test.integration.jpa.dsrestart.JpaDsRestartTestCase#testRestartDataSource
      • ./integration-tests.sh -fae -Dmaven.test.failure.ignore=true -DfailIfNoTests=false -Dsecurity.manager -Dts.basic -Dts.noSmoke -Dtest=org.jboss.as.test.integration.jpa.hibernate.envers.AuditJoinTableoverBidirectionalTest#testRevisionsforValidityStrategyoverManytoOne
        org.jboss.as.test.integration.jpa.hibernate.envers.AuditJoinTableoverBidirectionalTest#testRevisionsforValidityStrategyoverManytoOne
      • ./integration-tests.sh -fae -Dmaven.test.failure.ignore=true -DfailIfNoTests=false -Dsecurity.manager -Dts.basic -Dts.noSmoke -Dtest=org.jboss.as.test.integration.jpa.hibernate.envers.AuditJoinTableoverOnetoManyJoinColumnTest#testRevisionsfromAuditJoinTable
        org.jboss.as.test.integration.jpa.hibernate.envers.AuditJoinTableoverOnetoManyJoinColumnTest#testRevisionsfromAuditJoinTable
      • ./integration-tests.sh -fae -Dmaven.test.failure.ignore=true -DfailIfNoTests=false -Dsecurity.manager -Dts.basic -Dts.noSmoke -Dtest=org.jboss.as.test.integration.jpa.hibernate.envers.basicenverstest.BasicEnversTestCase
        org.jboss.as.test.integration.jpa.hibernate.envers.basicenverstest.BasicEnversTestCase#testSimpleEnversOperation
        org.jboss.as.test.integration.jpa.hibernate.envers.basicselectiveenverstest.BasicSelectiveEnversTestCase#testSelectiveEnversOperations
      • ./integration-tests.sh -fae -Dmaven.test.failure.ignore=true -DfailIfNoTests=false -Dsecurity.manager -Dts.basic -Dts.noSmoke -Dtest=org.jboss.as.test.integration.jpa.hibernate.envers.implementvalidityauditstrategytest.ImplementValidityAuditStrategyTestCase#testEnversforValidityStrategy
        org.jboss.as.test.integration.jpa.hibernate.envers.implementvalidityauditstrategytest.ImplementValidityAuditStrategyTestCase#testEnversforValidityStrategy
      • ./integration-tests.sh -fae -Dmaven.test.failure.ignore=true -DfailIfNoTests=false -Dsecurity.manager -Dts.basic -Dts.noSmoke -Dtest=org.jboss.as.test.integration.jpa.hibernate.envers.validityauditstrategyoninheritancetest.ValidityAuditStrategyonInheritanceTestCase#testValidityStrategyonInheritance
        org.jboss.as.test.integration.jpa.hibernate.envers.validityauditstrategyoninheritancetest.ValidityAuditStrategyonInheritanceTestCase#testValidityStrategyonInheritance
      • ./integration-tests.sh -fae -Dmaven.test.failure.ignore=true -DfailIfNoTests=false -Dsecurity.manager -Dts.basic -Dts.noSmoke -Dtest=org.jboss.as.test.integration.jpa.mockprovider.classtransformer.ClassFileTransformerTestCase#test_persistenceUnitInfoURLS
        org.jboss.as.test.integration.jpa.mockprovider.classtransformer.ClassFileTransformerTestCase#test_persistenceUnitInfoURLS
      • ./integration-tests.sh -fae -Dmaven.test.failure.ignore=true -DfailIfNoTests=false -Dsecurity.manager -DtestLogToFile=false -Dts.compat -Dts.noSmoke -Dtest=org.jboss.as.test.compat.jpa.hibernate.HibernateJarsInDeploymentTestCase

      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")". See JBEAP-12017 and JBEAP-10612.

              istudens@redhat.com Ivo Studensky
              hsvabek_jira Hynek Švábek (Inactive)
              Ondrej Kotek Ondrej Kotek
              Ondrej Kotek Ondrej Kotek
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: