Search in sources :

Example 11 with RemotingPermission

use of org.jboss.remoting3.security.RemotingPermission in project wildfly by wildfly.

the class StatefulTimeoutTestBase2 method deploy.

@Deployment
public static Archive<?> deploy() {
    JavaArchive jar = ShrinkWrap.create(JavaArchive.class, ARCHIVE_NAME + ".jar");
    jar.addPackage(StatefulTimeoutTestBase1.class.getPackage());
    jar.addClasses(ModelNode.class, PathAddress.class, ManagementOperations.class, MgmtOperationException.class);
    jar.addAsManifestResource(new StringAsset("Dependencies: org.jboss.remoting, org.jboss.as.controller\n"), "MANIFEST.MF");
    jar.addAsManifestResource(createPermissionsXmlAsset(new RemotingPermission("createEndpoint"), new RemotingPermission("connect"), new FilePermission(System.getProperty("jboss.inst") + "/standalone/tmp/auth/*", "read")), "permissions.xml");
    jar.add(new StringAsset(DEPLOYMENT_DESCRIPTOR_CONTENT), "META-INF/ejb-jar.xml");
    jar.add(EmptyAsset.INSTANCE, "META-INF/beans.xml");
    return jar;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) RemotingPermission(org.jboss.remoting3.security.RemotingPermission) FilePermission(java.io.FilePermission) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 12 with RemotingPermission

use of org.jboss.remoting3.security.RemotingPermission in project wildfly by wildfly.

the class FlushOperationsTestCase method deployment.

@Deployment
public static JavaArchive deployment() {
    final JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "flush-operations.jar");
    archive.addClass(FlushOperationsTestCase.class);
    archive.addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.controller-client, " + "org.jboss.as.controller, " + "org.jboss.dmr, " + "org.jboss.ironjacamar.jdbcadapters, " + "org.jboss.remoting\n"), "MANIFEST.MF");
    archive.addAsManifestResource(createPermissionsXmlAsset(// ModelControllerClient needs the following
    new RemotingPermission("createEndpoint"), new RemotingPermission("connect"), // flushInvalidConnectionsInPool needs the following
    new RuntimePermission("accessDeclaredMembers"), new ReflectPermission("suppressAccessChecks"), new FilePermission(System.getProperty("jboss.inst") + "/standalone/tmp/auth/*", "read")), "permissions.xml");
    return archive;
}
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 13 with RemotingPermission

use of org.jboss.remoting3.security.RemotingPermission in project wildfly by wildfly.

the class AbstractDatasourceCapacityPoliciesTestCase method createDeployment.

@Deployment
public static Archive<?> createDeployment() {
    JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "jca-capacity-test.jar");
    jar.addClasses(JcaMgmtBase.class, ManagementOperations.class, ContainerResourceMgmtTestBase.class, AbstractMgmtTestBase.class, JcaMgmtServerSetupTask.class, MgmtOperationException.class, AbstractDatasourceCapacityPoliciesTestCase.class, DatasourceCapacityPoliciesTestCase.class, JcaTestsUtil.class, TimeoutUtil.class);
    jar.addAsManifestResource(new StringAsset("Dependencies: javax.inject.api,org.jboss.as.connector," + "org.jboss.as.controller,org.jboss.dmr,org.jboss.staxmapper," + "org.jboss.ironjacamar.impl, org.jboss.ironjacamar.jdbcadapters,org.jboss.remoting\n"), "MANIFEST.MF");
    jar.addAsManifestResource(createPermissionsXmlAsset(new RemotingPermission("createEndpoint"), new RemotingPermission("connect"), new FilePermission(System.getProperty("jboss.inst") + "/standalone/tmp/auth/*", "read"), new PropertyPermission("ts.timeout.factor", "read"), new RuntimePermission("accessDeclaredMembers"), new ReflectPermission("suppressAccessChecks")), "permissions.xml");
    return jar;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) PropertyPermission(java.util.PropertyPermission) 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 14 with RemotingPermission

use of org.jboss.remoting3.security.RemotingPermission in project wildfly by wildfly.

the class DatasourceNonCcmTestCase method getDeployment.

@Deployment
public static Archive<?> getDeployment() {
    JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "dummy.jar");
    jar.addClasses(DatasourceNonCcmTestCase.class, Datasource.class, JcaMgmtBase.class, ManagementOperations.class, ContainerResourceMgmtTestBase.class, AbstractMgmtTestBase.class, JcaMgmtServerSetupTask.class, MgmtOperationException.class, DsMgmtTestBase.class, JcaTestsUtil.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.impl, " + "org.jboss.ironjacamar.jdbcadapters\n"), "MANIFEST.MF");
    jar.addAsManifestResource(createPermissionsXmlAsset(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) FilePermission(java.io.FilePermission) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 15 with RemotingPermission

use of org.jboss.remoting3.security.RemotingPermission in project wildfly by wildfly.

the class RebindTestCase method deploy.

@Deployment
public static Archive<?> deploy() {
    String tmpdir = System.getProperty("jboss.home");
    JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "RebindTestCase.jar");
    jar.addClasses(RebindTestCase.class, BindingLookupBean.class);
    jar.addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.controller, " + "org.jboss.remoting\n"), "MANIFEST.MF");
    jar.addAsManifestResource(createPermissionsXmlAsset(new RemotingPermission("connect"), new RemotingPermission("createEndpoint"), 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) FilePermission(java.io.FilePermission) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Aggregations

FilePermission (java.io.FilePermission)21 Deployment (org.jboss.arquillian.container.test.api.Deployment)21 RemotingPermission (org.jboss.remoting3.security.RemotingPermission)21 StringAsset (org.jboss.shrinkwrap.api.asset.StringAsset)21 JavaArchive (org.jboss.shrinkwrap.api.spec.JavaArchive)18 PropertyPermission (java.util.PropertyPermission)8 ReflectPermission (java.lang.reflect.ReflectPermission)7 WebArchive (org.jboss.shrinkwrap.api.spec.WebArchive)3 SocketPermission (java.net.SocketPermission)2 HttpRequest (org.jboss.as.test.integration.common.HttpRequest)2 JMSOperations (org.jboss.as.test.integration.common.jms.JMSOperations)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 ResourceAdapterArchive (org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive)2 AbstractServerInterceptorsSetupTask (org.jboss.as.test.shared.integration.ejb.interceptor.serverside.AbstractServerInterceptorsSetupTask)1