use of java.net.SocketPermission in project wildfly by wildfly.
the class DatabaseTimerServiceRefreshTestCase method createDeployment.
private static Archive<?> createDeployment(boolean client) {
final WebArchive war = ShrinkWrap.create(WebArchive.class, ARCHIVE_NAME + ".war");
war.addClasses(RefreshInterceptor.class, RefreshIF.class, RefreshBeanBase.class, RefreshBean1.class, RefreshBean2.class);
war.addAsWebInfResource(DatabaseTimerServiceRefreshTestCase.class.getPackage(), "jboss-ejb3.xml", "jboss-ejb3.xml");
if (client) {
war.addAsManifestResource(DatabaseTimerServiceRefreshTestCase.class.getPackage(), "jboss-ejb-client-refresh-test.xml", "jboss-ejb-client.xml");
war.addAsManifestResource(createPermissionsXmlAsset(new SocketPermission("*:9092", "connect,resolve"), new SecurityPermission("putProviderProperty.WildFlyElytron")), "permissions.xml");
}
return war;
}
use of java.net.SocketPermission in project Payara by payara.
the class J2EESecurityManager method enablePermissionCache.
public synchronized void enablePermissionCache(PermissionCache c) {
if (c != null) {
cache = c;
connectPerm = new CachedPermissionImpl(cache, new SocketPermission("*", "connect"));
cacheEnabled = true;
}
}
use of java.net.SocketPermission in project eap-additional-testsuite by jboss-set.
the class RolloutPlanTestCase method before.
@BeforeClass
public static void before() throws Exception {
CLITestSuite.initSuite();
CLITestSuite.createSupport(RolloutPlanTestCase.class.getSimpleName());
final WebArchive war = ShrinkWrap.create(WebArchive.class, "RolloutPlanTestCase.war");
war.addClass(RolloutPlanTestServlet.class);
war.addAsManifestResource(createPermissionsXmlAsset(// main-one
new SocketPermission(TestSuiteEnvironment.formatPossibleIpv6Address(CLITestSuite.hostAddresses.get("master")) + ":" + TEST_PORT, "listen,resolve"), // main-three
new SocketPermission(TestSuiteEnvironment.formatPossibleIpv6Address(CLITestSuite.hostAddresses.get("master")) + ":" + (TEST_PORT + 350), "listen,resolve")), "permissions.xml");
String tempDir = System.getProperty("java.io.tmpdir");
warFile = new File(tempDir + File.separator + "RolloutPlanTestCase.war");
new ZipExporterImpl(war).exportTo(warFile, true);
AbstractCliTestBase.initCLI(DomainTestSupport.masterAddress);
// add another server group to default profile
cli.sendLine("/server-group=test-server-group:add(profile=default,socket-binding-group=standard-sockets)");
// add a server to the group
cli.sendLine("/host=master/server-config=test-one:add(group=test-server-group,socket-binding-port-offset=700");
cli.sendLine("/host=master/server-config=test-one/interface=public:add(inet-address=" + CLITestSuite.hostAddresses.get("master") + ")");
CLITestSuite.addServer("test-one", "master", "test-server-group", "default", 700, true);
// start main-two
cli.sendLine("/host=master/server-config=main-two:start(blocking=true)");
CLIOpResult res = cli.readAllAsOpResult();
Assert.assertTrue(res.isIsOutcomeSuccess());
waitUntilState("main-two", "STARTED");
// start test-one
cli.sendLine("/host=master/server-config=test-one:start(blocking=true)");
res = cli.readAllAsOpResult();
Assert.assertTrue(res.isIsOutcomeSuccess());
waitUntilState("test-one", "STARTED");
}
Aggregations