use of org.jboss.remoting3.security.RemotingPermission in project wildfly by wildfly.
the class ResourceAdapterPoolAttributesTestCase method createResourceAdapter.
@Deployment
public static Archive<?> createResourceAdapter() {
ResourceAdapterArchive rar = ShrinkWrap.create(ResourceAdapterArchive.class, RA_NAME);
rar.addAsManifestResource(LazyResourceAdapter.class.getPackage(), "ra-notx.xml", "ra.xml");
JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "pool-attributes-test.jar");
jar.addClass(LazyResourceAdapter.class).addClass(LazyManagedConnectionFactory.class).addClass(LazyManagedConnection.class).addClass(LazyConnection.class).addClass(LazyConnectionImpl.class).addClass(LazyXAResource.class).addClass(LazyLocalTransaction.class).addClass(LazyManagedConnectionMetaData.class).addClass(LazyConnectionFactory.class).addClass(LazyConnectionFactoryImpl.class);
jar.addClasses(ResourceAdapterPoolAttributesTestCase.class, AbstractMgmtServerSetupTask.class, JcaMgmtServerSetupTask.class, AbstractMgmtTestBase.class, JcaMgmtBase.class, ContainerResourceMgmtTestBase.class, MgmtOperationException.class, ManagementOperations.class, JcaTestsUtil.class);
rar.addAsManifestResource(new StringAsset("Dependencies: javax.inject.api,org.jboss.as.connector," + "org.jboss.as.controller,org.jboss.dmr,org.jboss.staxmapper," + // Needed for RemotingPermission class if security manager is enabled
(System.getProperty("security.manager") == null ? "" : "org.jboss.remoting,") + "org.jboss.ironjacamar.impl, org.jboss.ironjacamar.jdbcadapters\n"), "MANIFEST.MF");
rar.addAsManifestResource(createPermissionsXmlAsset(new RemotingPermission("createEndpoint"), new RemotingPermission("connect"), new RuntimePermission("accessDeclaredMembers"), new ReflectPermission("suppressAccessChecks"), new FilePermission(System.getProperty("jboss.inst") + "/standalone/tmp/auth/*", "read")), "permissions.xml");
rar.addAsLibrary(jar);
return rar;
}
use of org.jboss.remoting3.security.RemotingPermission in project wildfly by wildfly.
the class DatasourceMaxPoolAttributeTestCase method createDeployment.
@Deployment
public static Archive<?> createDeployment() {
JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "deployment.jar");
jar.addClasses(DatasourceNonCcmTestCase.class, Datasource.class, WildFlyDataSource.class, WrapperDataSource.class, JcaMgmtServerSetupTask.class, DatasourceMaxPoolAttributeTestCase.class, AbstractMgmtServerSetupTask.class, AbstractMgmtTestBase.class, JcaMgmtBase.class, ContainerResourceMgmtTestBase.class, MgmtOperationException.class, ManagementOperations.class, JcaTestsUtil.class, ServerReload.class);
jar.addAsManifestResource(new StringAsset("Dependencies: javax.inject.api," + "org.jboss.as.connector," + "org.jboss.as.controller," + "org.jboss.dmr," + // Needed for RemotingPermission class if security manager is enabled
(System.getProperty("security.manager") == null ? "" : "org.jboss.remoting,") + "org.jboss.staxmapper," + "org.jboss.ironjacamar.api," + "org.jboss.ironjacamar.impl," + "org.jboss.ironjacamar.jdbcadapters\n"), "MANIFEST.MF");
jar.addAsManifestResource(createPermissionsXmlAsset(new RuntimePermission("accessDeclaredMembers"), new ReflectPermission("suppressAccessChecks"), new RemotingPermission("createEndpoint"), new RemotingPermission("connect"), new FilePermission(System.getProperty("jboss.inst") + "/standalone/tmp/auth/*", "read")), "permissions.xml");
return jar;
}
use of org.jboss.remoting3.security.RemotingPermission in project wildfly by wildfly.
the class DatasourcePoolAttributesTestCase method createDeployment.
@Deployment
public static Archive<?> createDeployment() {
JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "deployment.jar");
jar.addClasses(DatasourceNonCcmTestCase.class, Datasource.class, WildFlyDataSource.class, WrapperDataSource.class, JcaMgmtServerSetupTask.class, DatasourcePoolAttributesTestCase.class, AbstractMgmtServerSetupTask.class, AbstractMgmtTestBase.class, JcaMgmtBase.class, ContainerResourceMgmtTestBase.class, MgmtOperationException.class, ManagementOperations.class, JcaTestsUtil.class, ServerReload.class);
jar.addAsManifestResource(new StringAsset("Dependencies: javax.inject.api," + "org.jboss.as.connector," + "org.jboss.as.controller," + "org.jboss.dmr," + "org.jboss.staxmapper," + // Needed for RemotingPermission class if security manager is enabled
(System.getProperty("security.manager") == null ? "" : "org.jboss.remoting,") + "org.jboss.ironjacamar.api," + "org.jboss.ironjacamar.impl," + "org.jboss.ironjacamar.jdbcadapters\n"), "MANIFEST.MF");
jar.addAsManifestResource(createPermissionsXmlAsset(new RemotingPermission("connect"), new RemotingPermission("createEndpoint"), new RuntimePermission("accessDeclaredMembers"), new ReflectPermission("suppressAccessChecks"), new FilePermission(System.getProperty("jboss.inst") + "/standalone/tmp/auth/*", "read")), "permissions.xml");
return jar;
}
use of org.jboss.remoting3.security.RemotingPermission in project wildfly by wildfly.
the class WebSuspendTestCase method deployment.
@Deployment
public static WebArchive deployment() {
WebArchive war = ShrinkWrap.create(WebArchive.class, "web-suspend.war");
war.addPackage(WebSuspendTestCase.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 PropertyPermission("management.address", "read"), new PropertyPermission("jboss.http.port", "read"), new PropertyPermission("node0", "read"), // executorService.shutdown() needs the following permission
new RuntimePermission("modifyThread"), // ManagementClient needs the following permissions and a dependency on 'org.jboss.remoting3' module
new RemotingPermission("createEndpoint"), new RemotingPermission("connect"), // HttpClient needs the following permission
new SocketPermission(TestSuiteEnvironment.getServerAddress() + ":" + TestSuiteEnvironment.getHttpPort(), "connect,resolve"), new FilePermission(System.getProperty("jboss.inst") + "/standalone/tmp/auth/*", "read")), "permissions.xml");
return war;
}
use of org.jboss.remoting3.security.RemotingPermission in project wildfly by wildfly.
the class ExpressionSubstitutionInContainerTestCase method deploy.
@Deployment
public static Archive<?> deploy() {
final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, ARCHIVE_NAME + ".jar");
jar.addPackage(ExpressionSubstitutionInContainerTestCase.class.getPackage());
jar.addClasses(ModelUtil.class, TestSuiteEnvironment.class, Authentication.class);
jar.addAsManifestResource(new StringAsset("Manifest-Version: 1.0\n" + // there has to be a spacer - otherwise you meet "java.io.IOException: invalid header field"
"Class-Path: \n" + "Dependencies: org.jboss.as.controller-client, org.jboss.as.controller, org.jboss.dmr, org.jboss.remoting \n"), "MANIFEST.MF");
jar.addAsManifestResource(createPermissionsXmlAsset(// Needed by the StatelessBean#addSystemProperty()
new PropertyPermission("qa.test.*", "write"), new PropertyPermission("qa.test.*", "read"), new RemotingPermission("createEndpoint"), new RemotingPermission("connect"), new PropertyPermission("management.address", "read"), new PropertyPermission("node0", "read"), new PropertyPermission("as.managementPort", "read"), new PropertyPermission("management.port", "read"), new PropertyPermission("jboss.management.user", "read"), new PropertyPermission("jboss.management.password", "read"), new FilePermission(System.getProperty("jboss.inst") + "/standalone/tmp/auth/*", "read")), "jboss-permissions.xml");
return jar;
}
Aggregations