use of org.jboss.as.server.security.ServerPermission in project wildfly by wildfly.
the class SingletonServiceTestCase method createDeployment.
private static Archive<?> createDeployment() {
WebArchive war = ShrinkWrap.create(WebArchive.class, "singleton.war");
war.addPackage(NodeService.class.getPackage());
war.setManifest(new StringAsset("Manifest-Version: 1.0\nDependencies: org.jboss.as.server\n"));
war.addAsManifestResource(createPermissionsXmlAsset(// See org.jboss.as.server.deployment.service.ServiceActivatorProcessor#deploy()
new RuntimePermission("getClassLoader"), // See org.jboss.as.server.deployment.service.SecuredServiceRegistry
new ServerPermission("useServiceRegistry"), new ServerPermission("getCurrentServiceContainer")), "permissions.xml");
war.addAsServiceProvider(org.jboss.msc.service.ServiceActivator.class, NodeServiceActivator.class);
return war;
}
use of org.jboss.as.server.security.ServerPermission in project wildfly by wildfly.
the class SingletonServiceTestCase method deployment.
@Deployment
public static Archive<?> deployment() {
WebArchive war = ShrinkWrap.create(WebArchive.class, "singleton.war");
war.addPackage(NodeService.class.getPackage());
war.setManifest(new StringAsset("Manifest-Version: 1.0\nDependencies: org.jboss.as.server\n"));
war.addAsManifestResource(createPermissionsXmlAsset(// See org.jboss.as.server.deployment.service.ServiceActivatorProcessor#deploy()
new RuntimePermission("getClassLoader"), // See org.jboss.as.server.deployment.service.SecuredServiceRegistry
new ServerPermission("useServiceRegistry"), new ServerPermission("getCurrentServiceContainer")), "permissions.xml");
war.addAsServiceProvider(org.jboss.msc.service.ServiceActivator.class, NodeServiceActivator.class);
return war;
}
use of org.jboss.as.server.security.ServerPermission in project wildfly by wildfly.
the class SingletonBackupServiceTestCase method createDeployment.
private static Archive<?> createDeployment() {
WebArchive war = ShrinkWrap.create(WebArchive.class, "singleton.war");
war.addPackage(ValueServiceServlet.class.getPackage());
war.setManifest(new StringAsset("Manifest-Version: 1.0\nDependencies: org.jboss.as.server\n"));
war.addAsServiceProvider(org.jboss.msc.service.ServiceActivator.class, ValueServiceActivator.class);
war.addAsManifestResource(createPermissionsXmlAsset(// See org.jboss.as.server.deployment.service.ServiceActivatorProcessor#deploy()
new RuntimePermission("getClassLoader"), // See org.jboss.as.server.deployment.service.SecuredServiceRegistry
new ServerPermission("useServiceRegistry"), new ServerPermission("getCurrentServiceContainer")), "permissions.xml");
return war;
}
use of org.jboss.as.server.security.ServerPermission in project wildfly by wildfly.
the class SingletonPolicyServiceTestCase method createDeployment.
private static Archive<?> createDeployment() {
WebArchive war = ShrinkWrap.create(WebArchive.class, "singleton.war");
war.addPackage(NodeService.class.getPackage());
war.setManifest(new StringAsset("Manifest-Version: 1.0\nDependencies: org.jboss.as.server\n"));
war.addAsServiceProvider(org.jboss.msc.service.ServiceActivator.class, NodeServicePolicyActivator.class);
war.addAsManifestResource(createPermissionsXmlAsset(// See org.jboss.as.server.deployment.service.ServiceActivatorProcessor#deploy()
new RuntimePermission("getClassLoader"), // See org.jboss.as.server.deployment.service.SecuredServiceRegistry
new ServerPermission("useServiceRegistry"), new ServerPermission("getCurrentServiceContainer")), "permissions.xml");
return war;
}
use of org.jboss.as.server.security.ServerPermission in project wildfly by wildfly.
the class ClusterTestUtil method addTopologyListenerDependencies.
/**
* <em>Note that should you need to manually add an extra set of permissions, the following permission is required for this utility to work within
* security manager:</em>
*
* <pre>{@code
* war.addAsManifestResource(PermissionUtils.createPermissionsXmlAsset(new ServerPermission("getCurrentServiceContainer")), "permissions.xml");
* }</pre>
*/
public static <A extends Archive<A> & ClassContainer<A> & ManifestContainer<A>> A addTopologyListenerDependencies(A archive) {
archive.addClasses(TopologyChangeListener.class, TopologyChangeListenerBean.class, TopologyChangeListenerServlet.class);
archive.setManifest(new StringAsset("Manifest-Version: 1.0\nDependencies: org.jboss.as.clustering.common, org.jboss.as.controller, org.jboss.as.server, org.infinispan, org.wildfly.clustering.infinispan.spi\n"));
archive.addAsManifestResource(PermissionUtils.createPermissionsXmlAsset(new ServerPermission("getCurrentServiceContainer")), "permissions.xml");
return archive;
}
Aggregations