Search in sources :

Example 6 with RemotingPermission

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

the class MDBTestCase method getDeployment.

@Deployment
public static Archive getDeployment() {
    final JavaArchive ejbJar = ShrinkWrap.create(JavaArchive.class, "mdb.jar").addPackage(MDBWithDeliveryActiveAnnotation.class.getPackage()).addPackage(JMSOperations.class.getPackage()).addClass(TimeoutUtil.class).addAsManifestResource(MDBWithDeliveryActiveAnnotation.class.getPackage(), "jboss-ejb3.xml", "jboss-ejb3.xml").addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.controller-client, org.jboss.dmr, org.jboss.remoting\n"), "MANIFEST.MF");
    // grant necessary permissions
    ejbJar.addAsManifestResource(createPermissionsXmlAsset(new PropertyPermission("ts.timeout.factor", "read"), new RemotingPermission("createEndpoint"), new RemotingPermission("connect"), new FilePermission(System.getProperty("jboss.inst") + "/standalone/tmp/auth/*", "read")), "permissions.xml");
    return ejbJar;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) PropertyPermission(java.util.PropertyPermission) 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 7 with RemotingPermission

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

the class ResourceAdapterCapacityPoliciesTestCase method createResourceAdapter.

@Deployment
public static Archive<?> createResourceAdapter() {
    ResourceAdapterArchive rar = ShrinkWrap.create(ResourceAdapterArchive.class, "capacity-policies-test.rar");
    rar.addAsManifestResource(LazyResourceAdapter.class.getPackage(), "ra-notx.xml", "ra.xml");
    JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "capacity-policies-test.jar");
    jar.addClass(LazyResourceAdapter.class).addClass(LazyManagedConnectionFactory.class).addClass(LazyManagedConnection.class).addClass(LazyConnection.class).addClass(LazyConnectionImpl.class).addClass(LazyXAResource.class).addClass(LazyLocalTransaction.class).addClass(LazyManagedConnectionMetaData.class).addClass(LazyConnectionFactory.class).addClass(LazyConnectionFactoryImpl.class);
    jar.addClasses(ResourceAdapterCapacityPoliciesTestCase.class, AbstractMgmtServerSetupTask.class, AbstractMgmtTestBase.class, JcaMgmtBase.class, ContainerResourceMgmtTestBase.class, MgmtOperationException.class, ManagementOperations.class, JcaTestsUtil.class, TimeoutUtil.class);
    rar.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");
    rar.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");
    rar.addAsLibrary(jar);
    return rar;
}
Also used : LazyManagedConnection(org.jboss.as.test.integration.jca.lazyconnectionmanager.rar.LazyManagedConnection) StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) PropertyPermission(java.util.PropertyPermission) LazyLocalTransaction(org.jboss.as.test.integration.jca.lazyconnectionmanager.rar.LazyLocalTransaction) FilePermission(java.io.FilePermission) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) LazyConnectionImpl(org.jboss.as.test.integration.jca.lazyconnectionmanager.rar.LazyConnectionImpl) LazyResourceAdapter(org.jboss.as.test.integration.jca.lazyconnectionmanager.rar.LazyResourceAdapter) LazyConnectionFactory(org.jboss.as.test.integration.jca.lazyconnectionmanager.rar.LazyConnectionFactory) ResourceAdapterArchive(org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive) RemotingPermission(org.jboss.remoting3.security.RemotingPermission) ReflectPermission(java.lang.reflect.ReflectPermission) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 8 with RemotingPermission

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

the class MDBTestCase method getDeployment.

@Deployment
public static Archive getDeployment() {
    final JavaArchive ejbJar = ShrinkWrap.create(JavaArchive.class, "MDBTestCase.jar");
    ejbJar.addClasses(DDBasedMDB.class, BMTSLSB.class, JMSMessagingUtil.class, AnnoBasedMDB.class, TimeoutUtil.class);
    ejbJar.addPackage(JMSOperations.class.getPackage());
    ejbJar.addClass(JmsQueueSetup.class);
    ejbJar.addAsManifestResource(MDBTestCase.class.getPackage(), "ejb-jar.xml", "ejb-jar.xml");
    ejbJar.addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.controller-client, org.jboss.dmr, org.jboss.remoting\n"), "MANIFEST.MF");
    ejbJar.addAsManifestResource(createPermissionsXmlAsset(new RemotingPermission("createEndpoint"), new RemotingPermission("connect"), new FilePermission(System.getProperty("jboss.inst") + "/standalone/tmp/auth/*", "read"), new PropertyPermission(TimeoutUtil.FACTOR_SYS_PROP, "read")), "permissions.xml");
    return ejbJar;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) PropertyPermission(java.util.PropertyPermission) RemotingPermission(org.jboss.remoting3.security.RemotingPermission) JMSOperations(org.jboss.as.test.integration.common.jms.JMSOperations) FilePermission(java.io.FilePermission) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 9 with RemotingPermission

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

the class MDB20TopicTestCase method getDeployment.

@Deployment
public static Archive getDeployment() {
    final JavaArchive ejbJar = ShrinkWrap.create(JavaArchive.class, "MDB20TopicTestCase.jar");
    final String tempDir = TestSuiteEnvironment.getTmpDir();
    ejbJar.addClasses(EJB2xMDB.class, AbstractMDB2xTestCase.class);
    ejbJar.addPackage(JMSOperations.class.getPackage());
    ejbJar.addClasses(JmsQueueSetup.class, TimeoutUtil.class);
    ejbJar.addAsManifestResource(MDB20TopicTestCase.class.getPackage(), "ejb-jar-20-topic.xml", "ejb-jar.xml");
    ejbJar.addAsManifestResource(MDB20TopicTestCase.class.getPackage(), "jboss-ejb3-topic.xml", "jboss-ejb3.xml");
    ejbJar.addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.controller-client, org.jboss.dmr, org.jboss.remoting, org.apache.activemq.artemis\n"), "MANIFEST.MF");
    ejbJar.addAsManifestResource(createPermissionsXmlAsset(new PropertyPermission("ts.timeout.factor", "read"), new RemotingPermission("createEndpoint"), new RemotingPermission("connect"), new FilePermission(tempDir + "/-", "read")), "jboss-permissions.xml");
    return ejbJar;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) PropertyPermission(java.util.PropertyPermission) RemotingPermission(org.jboss.remoting3.security.RemotingPermission) JMSOperations(org.jboss.as.test.integration.common.jms.JMSOperations) FilePermission(java.io.FilePermission) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 10 with RemotingPermission

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

the class Ejb3ThreadPoolBase method deploy.

@Deployment
public static Archive<?> deploy() {
    JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "ejb3singleton.jar");
    jar.addClass(ScheduleSingletonOneTimer.class);
    jar.addClasses(Ejb3ThreadPoolBase.class, Ejb3NonCoreThreadTimeoutTestCase.class, 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");
    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