Search in sources :

Example 16 with ReflectPermission

use of java.lang.reflect.ReflectPermission in project wildfly by wildfly.

the class DatasourcePoolAttributesTestCase method createDeployment.

@Deployment
public static Archive<?> createDeployment() {
    JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "deployment.jar");
    jar.addClasses(DatasourceNonCcmTestCase.class, Datasource.class, WildFlyDataSource.class, WrapperDataSource.class, JcaMgmtServerSetupTask.class, DatasourcePoolAttributesTestCase.class, AbstractMgmtServerSetupTask.class, AbstractMgmtTestBase.class, JcaMgmtBase.class, ContainerResourceMgmtTestBase.class, MgmtOperationException.class, ManagementOperations.class, JcaTestsUtil.class, ServerReload.class);
    jar.addAsManifestResource(new StringAsset("Dependencies: javax.inject.api," + "org.jboss.as.connector," + "org.jboss.as.controller," + "org.jboss.dmr," + "org.jboss.staxmapper," + // Needed for RemotingPermission class if security manager is enabled
    (System.getProperty("security.manager") == null ? "" : "org.jboss.remoting,") + "org.jboss.ironjacamar.api," + "org.jboss.ironjacamar.impl," + "org.jboss.ironjacamar.jdbcadapters\n"), "MANIFEST.MF");
    jar.addAsManifestResource(createPermissionsXmlAsset(new RemotingPermission("connect"), new RemotingPermission("createEndpoint"), new RuntimePermission("accessDeclaredMembers"), new ReflectPermission("suppressAccessChecks"), new FilePermission(System.getProperty("jboss.inst") + "/standalone/tmp/auth/*", "read")), "permissions.xml");
    return jar;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) RemotingPermission(org.jboss.remoting3.security.RemotingPermission) ReflectPermission(java.lang.reflect.ReflectPermission) FilePermission(java.io.FilePermission) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 17 with ReflectPermission

use of java.lang.reflect.ReflectPermission in project wildfly by wildfly.

the class DatasourceMinPoolAttributeTestCase method createDeployment.

@Deployment
public static Archive<?> createDeployment() {
    JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "deployment.jar");
    jar.addClasses(DatasourceNonCcmTestCase.class, Datasource.class, WildFlyDataSource.class, WrapperDataSource.class, JcaMgmtServerSetupTask.class, DatasourceMinPoolAttributeTestCase.class, AbstractMgmtServerSetupTask.class, AbstractMgmtTestBase.class, JcaMgmtBase.class, ContainerResourceMgmtTestBase.class, MgmtOperationException.class, ManagementOperations.class, JcaTestsUtil.class, ServerReload.class);
    jar.addAsManifestResource(new StringAsset("Dependencies: javax.inject.api," + "org.jboss.as.connector," + "org.jboss.as.controller," + "org.jboss.dmr," + // Needed for RemotingPermission class if security manager is enabled
    (System.getProperty("security.manager") == null ? "" : "org.jboss.remoting,") + "org.jboss.staxmapper," + "org.jboss.ironjacamar.api," + "org.jboss.ironjacamar.impl," + "org.jboss.ironjacamar.jdbcadapters\n"), "MANIFEST.MF");
    jar.addAsManifestResource(createPermissionsXmlAsset(new RuntimePermission("accessDeclaredMembers"), new ReflectPermission("suppressAccessChecks"), new RemotingPermission("createEndpoint"), new RemotingPermission("connect"), new FilePermission(System.getProperty("jboss.inst") + "/standalone/tmp/auth/*", "read")), "permissions.xml");
    return jar;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) RemotingPermission(org.jboss.remoting3.security.RemotingPermission) ReflectPermission(java.lang.reflect.ReflectPermission) FilePermission(java.io.FilePermission) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Aggregations

ReflectPermission (java.lang.reflect.ReflectPermission)17 FilePermission (java.io.FilePermission)12 Deployment (org.jboss.arquillian.container.test.api.Deployment)10 JavaArchive (org.jboss.shrinkwrap.api.spec.JavaArchive)10 StringAsset (org.jboss.shrinkwrap.api.asset.StringAsset)9 RemotingPermission (org.jboss.remoting3.security.RemotingPermission)7 PropertyPermission (java.util.PropertyPermission)6 WebArchive (org.jboss.shrinkwrap.api.spec.WebArchive)4 Permissions (java.security.Permissions)3 SecurityPermission (java.security.SecurityPermission)3 MBeanPermission (javax.management.MBeanPermission)3 ResourceAdapterArchive (org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive)3 SocketPermission (java.net.SocketPermission)2 Permission (java.security.Permission)2 LazyConnectionFactory (org.jboss.as.test.integration.jca.lazyconnectionmanager.rar.LazyConnectionFactory)2 LazyConnectionImpl (org.jboss.as.test.integration.jca.lazyconnectionmanager.rar.LazyConnectionImpl)2 LazyLocalTransaction (org.jboss.as.test.integration.jca.lazyconnectionmanager.rar.LazyLocalTransaction)2 LazyManagedConnection (org.jboss.as.test.integration.jca.lazyconnectionmanager.rar.LazyManagedConnection)2 LazyResourceAdapter (org.jboss.as.test.integration.jca.lazyconnectionmanager.rar.LazyResourceAdapter)2 EnterpriseArchive (org.jboss.shrinkwrap.api.spec.EnterpriseArchive)2