use of java.util.PropertyPermission in project wildfly by wildfly.
the class RemoteEJBClientStatefulBeanFailoverTestCase method createDeployment.
private static Archive<?> createDeployment() {
final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, MODULE_NAME + ".jar");
jar.addPackage(CounterRemote.class.getPackage());
jar.addClass(CounterBean.class);
jar.addClass(NodeNameGetter.class);
jar.addAsManifestResource(new StringAsset("Manifest-Version: 1.0\nDependencies: deployment." + MODULE_NAME_SINGLE + ".jar\n"), "MANIFEST.MF");
jar.addAsResource(createPermissionsXmlAsset(new PropertyPermission("jboss.node.name", "read")), "META-INF/jboss-permissions.xml");
return jar;
}
use of java.util.PropertyPermission in project wildfly by wildfly.
the class GlobalDirectoryTestCase method createDeployment3.
@Deployment(name = DEPLOYMENT3, managed = false, testable = false)
@TargetsContainer(CONTAINER)
public static WebArchive createDeployment3() {
WebArchive war = ShrinkWrap.create(WebArchive.class, DEPLOYMENT3 + ".war");
war.addClass(GlobalDirectoryDeployment3.class);
war.addAsWebInfResource(new StringAsset("<?xml version=\"1.0\" encoding=\"UTF-8\"?><web-app><servlet-mapping>\n" + " <servlet-name>javax.ws.rs.core.Application</servlet-name>\n" + " <url-pattern>/*</url-pattern>\n" + " </servlet-mapping></web-app>"), "web.xml");
war.addAsManifestResource(createPermissionsXmlAsset(new RuntimePermission("getProtectionDomain"), new PropertyPermission("user.dir", "read")), "permissions.xml");
return war;
}
use of java.util.PropertyPermission in project wildfly by wildfly.
the class EEConcurrencySuspendTestCase method deployment.
@Deployment
public static WebArchive deployment() {
WebArchive war = ShrinkWrap.create(WebArchive.class, "ee-suspend.war");
war.addPackage(EEConcurrencySuspendTestCase.class.getPackage());
war.addPackage(HttpRequest.class.getPackage());
war.addClass(TestSuiteEnvironment.class);
war.addAsResource(new StringAsset("Dependencies: org.jboss.dmr, org.jboss.as.controller, org.jboss.remoting \n"), "META-INF/MANIFEST.MF");
war.addAsManifestResource(createPermissionsXmlAsset(new RuntimePermission("modifyThread"), new PropertyPermission("management.address", "read"), new PropertyPermission("node0", "read"), new PropertyPermission("jboss.http.port", "read"), new RemotingPermission("createEndpoint"), new RemotingPermission("connect"), new FilePermission(System.getProperty("jboss.inst") + "/standalone/tmp/auth/*", "read"), new SocketPermission(TestSuiteEnvironment.getServerAddress() + ":" + TestSuiteEnvironment.getHttpPort(), "connect,resolve")), "permissions.xml");
return war;
}
use of java.util.PropertyPermission in project wildfly by wildfly.
the class MDBRoleTestCase method deployment.
@Deployment
public static Archive<?> deployment() {
final JavaArchive deployment = ShrinkWrap.create(JavaArchive.class, "ejb3mdb.jar").addClass(MDBRole.class).addClass(CreateQueueSetupTask.class).addClasses(AbstractSecurityDomainSetup.class, EjbSecurityDomainSetup.class).addClass(Simple.class).addClass(SimpleSLSB.class).addClass(TimeoutUtil.class);
deployment.addAsManifestResource(MDBRoleTestCase.class.getPackage(), "jboss-ejb3.xml", "jboss-ejb3.xml");
deployment.addPackage(CommonCriteria.class.getPackage());
// grant necessary permissions
// TODO WFLY-15289 The Elytron permissions need to be checked, should a deployment really need these?
deployment.addAsResource(createPermissionsXmlAsset(new PropertyPermission("ts.timeout.factor", "read"), new ElytronPermission("setRunAsPrincipal"), new ElytronPermission("handleSecurityEvent"), new ChangeRoleMapperPermission("ejb")), "META-INF/jboss-permissions.xml");
return deployment;
}
use of java.util.PropertyPermission 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;
}
Aggregations