use of java.io.FilePermission in project wildfly by wildfly.
the class ServletRunAsTestCase method deployment.
@Deployment(name = DEPLOYMENT, managed = false, testable = false)
public static WebArchive deployment() throws Exception {
WebArchive war = ShrinkWrap.create(WebArchive.class, "servlet-runas.war");
war.addClasses(CallProtectedEjbServlet.class, RunAsAdminServlet.class, RunAsUserServlet.class, Hello.class, HelloBean.class);
war.addAsWebResource(PermissionUtils.createPermissionsXmlAsset(new FilePermission(WORK_DIR.getAbsolutePath() + "/*", "read,write")), "META-INF/permissions.xml");
return war;
}
use of java.io.FilePermission 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;
}
use of java.io.FilePermission in project wildfly by wildfly.
the class ScheduledThreadPoolMetricsTestCase method getDeployment.
@Deployment
public static JavaArchive getDeployment() {
final JavaArchive ejbJar = ShrinkWrap.create(JavaArchive.class, "ArtemisScheduledThreadpoolMetricsTestCase.jar");
ejbJar.addPackage(TimeoutUtil.class.getPackage());
ejbJar.addClasses(JMSThreadPoolMetricsSetup.class, JMSThreadPoolMetricsMDB.class, JMSThreadPoolMetricsUtil.class);
ejbJar.addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.controller-client, org.jboss.dmr,org.jboss.remoting\n"), "MANIFEST.MF");
ejbJar.addAsManifestResource(createPermissionsXmlAsset(new FilePermission(System.getProperty("jboss.inst") + File.separatorChar + "standalone" + File.separatorChar + "tmp" + File.separatorChar + "auth" + File.separatorChar + "*", "read"), new PropertyPermission("ts.timeout.factor", "read"), RemotingPermission.CREATE_ENDPOINT, RemotingPermission.CONNECT, new SocketPermission("localhost", "resolve")), "jboss-permissions.xml");
return ejbJar;
}
use of java.io.FilePermission in project wildfly by wildfly.
the class URLBindingTestCase method deploy.
@Deployment
public static Archive<?> deploy() {
final String tempDir = TestSuiteEnvironment.getTmpDir();
JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "URLBindingTestCaseBean.jar");
jar.addClasses(URLBindingTestCase.class, BindingLookupBean.class);
jar.addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.controller, org.jboss.remoting\n"), "MANIFEST.MF");
jar.addAsManifestResource(createPermissionsXmlAsset(new RemotingPermission("createEndpoint"), new RemotingPermission("connect"), new FilePermission(tempDir + "/-", "read")), "jboss-permissions.xml");
return jar;
}
use of java.io.FilePermission in project wildfly by wildfly.
the class ThreadPoolMetricsTestCase method getDeployment.
@Deployment
public static JavaArchive getDeployment() {
final JavaArchive ejbJar = ShrinkWrap.create(JavaArchive.class, "ArtemisThreadpoolMetricsTestCase.jar");
ejbJar.addPackage(TimeoutUtil.class.getPackage());
ejbJar.addClasses(JMSThreadPoolMetricsSetup.class, JMSThreadPoolMetricsMDB.class, JMSThreadPoolMetricsUtil.class);
ejbJar.addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.controller-client, org.jboss.dmr, org.jboss.remoting\n"), "MANIFEST.MF");
ejbJar.addAsManifestResource(createPermissionsXmlAsset(new FilePermission(System.getProperty("jboss.inst") + File.separatorChar + "standalone" + File.separatorChar + "tmp" + File.separatorChar + "auth" + File.separatorChar + "*", "read"), new PropertyPermission("ts.timeout.factor", "read"), RemotingPermission.CREATE_ENDPOINT, RemotingPermission.CONNECT), "jboss-permissions.xml");
return ejbJar;
}
Aggregations