use of org.jboss.shrinkwrap.api.spec.WebArchive in project wildfly by wildfly.
the class WSTrustTestCase method createServerDeployment.
@Deployment(name = SERVER_DEP, testable = false)
public static WebArchive createServerDeployment() {
WebArchive archive = ShrinkWrap.create(WebArchive.class, SERVER_DEP + ".war");
archive.setManifest(new StringAsset("Manifest-Version: 1.0\n" + "Dependencies: org.jboss.ws.cxf.jbossws-cxf-client\n")).addClass(org.jboss.as.test.integration.ws.wsse.trust.SayHello.class).addClass(org.jboss.as.test.integration.ws.wsse.trust.SayHelloResponse.class).addClass(org.jboss.as.test.integration.ws.wsse.trust.service.ServerCallbackHandler.class).addClass(org.jboss.as.test.integration.ws.wsse.trust.service.ServiceIface.class).addClass(org.jboss.as.test.integration.ws.wsse.trust.service.ServiceImpl.class).addAsWebInfResource(createFilteredAsset("WEB-INF/wsdl/SecurityService.wsdl"), "wsdl/SecurityService.wsdl").addAsWebInfResource(createFilteredAsset("WEB-INF/wsdl/SecurityService_schema1.xsd"), "wsdl/SecurityService_schema1.xsd").addAsWebInfResource(WSTrustTestCase.class.getPackage(), "WEB-INF/servicestore.jks", "classes/servicestore.jks").addAsWebInfResource(WSTrustTestCase.class.getPackage(), "WEB-INF/serviceKeystore.properties", "classes/serviceKeystore.properties").addAsManifestResource(WSTrustTestCase.class.getPackage(), "WEB-INF/permissions.xml", "permissions.xml");
return archive;
}
use of org.jboss.shrinkwrap.api.spec.WebArchive in project wildfly by wildfly.
the class WSTrustTestCase method createHolderOfKeySTSDeployment.
@Deployment(name = HOLDER_OF_KEY_STS_DEP, testable = false)
public static WebArchive createHolderOfKeySTSDeployment() {
WebArchive archive = ShrinkWrap.create(WebArchive.class, HOLDER_OF_KEY_STS_DEP + ".war");
archive.setManifest(new StringAsset("Manifest-Version: 1.0\n" + "Dependencies: org.jboss.ws.cxf.jbossws-cxf-client,org.jboss.ws.cxf.sts annotations\n")).addClass(org.jboss.as.test.integration.ws.wsse.trust.stsholderofkey.STSHolderOfKeyCallbackHandler.class).addClass(org.jboss.as.test.integration.ws.wsse.trust.stsholderofkey.SampleSTSHolderOfKey.class).addClass(org.jboss.as.test.integration.ws.wsse.trust.shared.WSTrustAppUtils.class).addAsWebInfResource(WSTrustTestCase.class.getPackage(), "WEB-INF/jboss-web.xml", "jboss-web.xml").addAsWebInfResource(createFilteredAsset("WEB-INF/wsdl/holderofkey-ws-trust-1.4-service.wsdl"), "wsdl/holderofkey-ws-trust-1.4-service.wsdl").addAsWebInfResource(WSTrustTestCase.class.getPackage(), "WEB-INF/stsstore.jks", "classes/stsstore.jks").addAsWebInfResource(WSTrustTestCase.class.getPackage(), "WEB-INF/stsKeystore.properties", "classes/stsKeystore.properties").addAsManifestResource(WSTrustTestCase.class.getPackage(), "WEB-INF/permissions.xml", "permissions.xml").setWebXML(WSTrustTestCase.class.getPackage(), "WEB-INF/holderofkey/web.xml");
return archive;
}
use of org.jboss.shrinkwrap.api.spec.WebArchive in project wildfly by wildfly.
the class WSTrustTestCase method createOnBehalfOfServerDeployment.
@Deployment(name = ON_BEHALF_OF_SERVER_DEP, testable = false)
public static WebArchive createOnBehalfOfServerDeployment() {
WebArchive archive = ShrinkWrap.create(WebArchive.class, ON_BEHALF_OF_SERVER_DEP + ".war");
archive.setManifest(new StringAsset("Manifest-Version: 1.0\n" + "Dependencies: org.jboss.ws.cxf.jbossws-cxf-client, org.jboss.ws.cxf.sts\n")).addClass(org.jboss.as.test.integration.ws.wsse.trust.SayHello.class).addClass(org.jboss.as.test.integration.ws.wsse.trust.SayHelloResponse.class).addClass(org.jboss.as.test.integration.ws.wsse.trust.onbehalfof.OnBehalfOfCallbackHandler.class).addClass(org.jboss.as.test.integration.ws.wsse.trust.onbehalfof.OnBehalfOfServiceIface.class).addClass(org.jboss.as.test.integration.ws.wsse.trust.onbehalfof.OnBehalfOfServiceImpl.class).addClass(org.jboss.as.test.integration.ws.wsse.trust.service.ServiceIface.class).addAsWebInfResource(createFilteredAsset("WEB-INF/wsdl/OnBehalfOfService.wsdl"), "wsdl/OnBehalfOfService.wsdl").addAsWebInfResource(createFilteredAsset("WEB-INF/wsdl/OnBehalfOfService_schema1.xsd"), "wsdl/OnBehalfOfService_schema1.xsd").addAsWebInfResource(WSTrustTestCase.class.getPackage(), "WEB-INF/actasstore.jks", "classes/actasstore.jks").addAsWebInfResource(WSTrustTestCase.class.getPackage(), "WEB-INF/actasKeystore.properties", "classes/actasKeystore.properties").addAsManifestResource(WSTrustTestCase.class.getPackage(), "META-INF/clientstore.jks", "clientstore.jks").addAsManifestResource(WSTrustTestCase.class.getPackage(), "META-INF/clientKeystore.properties", "clientKeystore.properties").addAsManifestResource(WSTrustTestCase.class.getPackage(), "META-INF/permissions.xml", "permissions.xml");
return archive;
}
use of org.jboss.shrinkwrap.api.spec.WebArchive in project wildfly by wildfly.
the class MixedDomainDeploymentTest method setupDomain.
@Before
public void setupDomain() throws Exception {
// Create our deployments
webArchive = ShrinkWrap.create(WebArchive.class, TEST);
ClassLoader tccl = Thread.currentThread().getContextClassLoader();
URL index = tccl.getResource("helloWorld/index.html");
webArchive.addAsWebResource(index, "index.html");
webArchive2 = ShrinkWrap.create(WebArchive.class, TEST);
index = tccl.getResource("helloWorld/index.html");
webArchive2.addAsWebResource(index, "index.html");
index = tccl.getResource("helloWorld/index2.html");
webArchive2.addAsWebResource(index, "index2.html");
// Make versions on the filesystem for URL-based deploy and for unmanaged content testing
tmpDir = new File("target/deployments/" + this.getClass().getSimpleName());
new File(tmpDir, "archives").mkdirs();
new File(tmpDir, "exploded").mkdirs();
webArchive.as(ZipExporter.class).exportTo(new File(tmpDir, "archives/" + TEST), true);
webArchive.as(ExplodedExporter.class).exportExploded(new File(tmpDir, "exploded"));
//Make the jsf war to test that jsf works on the older slaves that did not have the jsf subsystem
jsfTestArchive = ShrinkWrap.create(WebArchive.class, "jsf-test.war");
jsfTestArchive.addClass(Bean.class);
jsfTestArchive.addAsWebResource("jsf-test/index.html");
jsfTestArchive.addAsWebResource("jsf-test/home.xhtml");
jsfTestArchive.addAsWebInfResource("jsf-test/WEB-INF/beans.xml");
jsfTestArchive.addAsWebInfResource("jsf-test/WEB-INF/faces-config.xml");
// Launch the domain
testSupport = MixedDomainTestSuite.getSupport(this.getClass());
confirmNoDeployments();
}
use of org.jboss.shrinkwrap.api.spec.WebArchive in project wildfly by wildfly.
the class AuthenticationTestCase method deployment.
/*
* Authentication Scenarios
*
* Client -> Bean
* Client -> Bean -> Bean
* Client -> Bean (Re-auth) -> Bean
* Client -> Servlet -> Bean
* Client -> Servlet (Re-auth) -> Bean
* Client -> Servlet -> Bean -> Bean
* Client -> Servlet -> Bean (Re Auth) -> Bean
*/
@Deployment
public static Archive<?> deployment() {
final Package currentPackage = AuthenticationTestCase.class.getPackage();
// using JavaArchive doesn't work, because of a bug in Arquillian, it only deploys wars properly
final WebArchive war = ShrinkWrap.create(WebArchive.class, "ejb3security.war").addPackage(WhoAmIBean.class.getPackage()).addPackage(EntryBean.class.getPackage()).addClass(WhoAmI.class).addClass(Util.class).addClass(Entry.class).addClasses(WhoAmIServlet.class, AuthenticationTestCase.class).addClasses(AbstractSecurityDomainSetup.class, EjbElytronDomainSetup.class).addClass(TestSuiteEnvironment.class).addAsResource(currentPackage, "users.properties", "users.properties").addAsResource(currentPackage, "roles.properties", "roles.properties").addAsWebInfResource(currentPackage, "web.xml", "web.xml").addAsWebInfResource(currentPackage, "jboss-web.xml", "jboss-web.xml").addAsWebInfResource(currentPackage, "jboss-ejb3.xml", "jboss-ejb3.xml").addAsManifestResource(new StringAsset("Manifest-Version: 1.0\nDependencies: org.jboss.as.controller-client,org.jboss.dmr\n"), "MANIFEST.MF").addAsManifestResource(createPermissionsXmlAsset(// login module needs to modify principal to commit logging in
new AuthPermission("modifyPrincipals"), // AuthenticationTestCase#testAuthenticatedCall calls org.jboss.security.client.JBossSecurityClient#performSimpleLogin
new RuntimePermission("org.jboss.security.getSecurityContext"), new RuntimePermission("org.jboss.security.SecurityContextFactory.createSecurityContext"), new RuntimePermission("org.jboss.security.SecurityContextFactory.createUtil"), new RuntimePermission("org.jboss.security.plugins.JBossSecurityContext.setSubjectInfo"), new RuntimePermission("org.jboss.security.setSecurityContext"), // AuthenticationTestCase#execute calls ExecutorService#shutdownNow
new RuntimePermission("modifyThread"), // AuthenticationTestCase#execute calls sun.net.www.http.HttpClient#openServer under the hood
new SocketPermission(SERVER_HOST_PORT, "connect,resolve"), // TestSuiteEnvironment reads system properties
new PropertyPermission("management.address", "read"), new PropertyPermission("node0", "read"), new PropertyPermission("jboss.http.port", "read")), "permissions.xml");
war.addPackage(CommonCriteria.class.getPackage());
return war;
}
Aggregations