use of java.util.PropertyPermission 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;
}
use of java.util.PropertyPermission in project wildfly by wildfly.
the class MDB20QueueTestCase method getDeployment.
@Deployment
public static Archive getDeployment() {
final JavaArchive ejbJar = ShrinkWrap.create(JavaArchive.class, "mdb.jar");
ejbJar.addClasses(EJB2xMDB.class, AbstractMDB2xTestCase.class);
ejbJar.addPackage(JMSOperations.class.getPackage());
ejbJar.addClasses(JmsQueueSetup.class, TimeoutUtil.class);
ejbJar.addAsManifestResource(MDB20QueueTestCase.class.getPackage(), "ejb-jar-20.xml", "ejb-jar.xml");
ejbJar.addAsManifestResource(MDB20QueueTestCase.class.getPackage(), "jboss-ejb3.xml", "jboss-ejb3.xml");
ejbJar.addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.controller-client, org.jboss.dmr, org.apache.activemq.artemis \n"), "MANIFEST.MF");
ejbJar.addAsManifestResource(createPermissionsXmlAsset(new PropertyPermission("ts.timeout.factor", "read")), "jboss-permissions.xml");
return ejbJar;
}
use of java.util.PropertyPermission in project wildfly by wildfly.
the class PooledEJBLifecycleTestCase method createDeployment.
// ----------------- DEPLOYMENTS ------------
// deploy Singleton bean. this will be deployed/managed by Arquillian outside of the test methods
@Deployment
public static JavaArchive createDeployment() {
final JavaArchive archive = ShrinkWrap.create(JavaArchive.class, SINGLETON_JAR);
// this includes test case class, since package name is the same.
archive.addClass(LifecycleTracker.class);
archive.addClass(LifecycleTrackerBean.class);
archive.addClass(TimeoutUtil.class);
archive.addClass(PointlesMathInterface.class);
archive.addClass(Constants.class);
archive.addAsManifestResource(createPermissionsXmlAsset(new PropertyPermission("ts.timeout.factor", "read")), "jboss-permissions.xml");
return archive;
}
use of java.util.PropertyPermission in project wildfly by wildfly.
the class RemoteAsyncInvocationTestCase method deploy.
@Deployment
public static Archive<?> deploy() {
JavaArchive jar = ShrinkWrap.create(JavaArchive.class, ARCHIVE_NAME + ".jar");
jar.addPackage(RemoteAsyncInvocationTestCase.class.getPackage());
jar.addClass(TimeoutUtil.class);
jar.addAsManifestResource(createPermissionsXmlAsset(new PropertyPermission("ts.timeout.factor", "read")), "permissions.xml");
return jar;
}
use of java.util.PropertyPermission in project wildfly by wildfly.
the class RunAsPrincipalTestCase method runAsDeployment.
@Deployment
public static Archive<?> runAsDeployment() {
// using JavaArchive doesn't work, because of a bug in Arquillian, it only deploys wars properly
final WebArchive war = ShrinkWrap.create(WebArchive.class, DEPLOYMENT + ".war").addPackage(WhoAmI.class.getPackage()).addClass(SimpleSingletonBean.class).addClass(StatelessSingletonUseBean.class).addClass(Util.class).addClass(Entry.class).addClass(RunAsPrincipalTestCase.class).addClass(TestLogHandlerSetupTask.class).addClass(LoggingUtil.class).addClasses(AbstractSecurityDomainSetup.class, EjbSecurityDomainSetup.class).addAsWebInfResource(RunAsPrincipalTestCase.class.getPackage(), "jboss-ejb3.xml", "jboss-ejb3.xml").addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.controller-client,org.jboss.dmr\n"), "MANIFEST.MF").addAsManifestResource(createPermissionsXmlAsset(new ElytronPermission("getSecurityDomain"), new PropertyPermission("jboss.server.log.dir", "read"), PermissionUtils.createFilePermission("read", "standalone", "log", TEST_LOG_FILE_NAME), new ElytronPermission("authenticate"), new ElytronPermission("getIdentity"), new ElytronPermission("createAdHocIdentity"), new ChangeRoleMapperPermission("ejb"), new ElytronPermission("setRunAsPrincipal")), "permissions.xml");
war.addPackage(CommonCriteria.class.getPackage());
return war;
}
Aggregations