use of org.wildfly.security.permission.ElytronPermission in project wildfly by wildfly.
the class AggregateRealmWithTransformerTestCase method deploymentAttributeAggregation.
@Deployment(name = AGGREGATE_REALM_ATTRIBUTES_NAME)
public static WebArchive deploymentAttributeAggregation() {
final WebArchive war = ShrinkWrap.create(WebArchive.class, AGGREGATE_REALM_ATTRIBUTES_NAME + ".war");
war.addClasses(AttributePrintingServlet.class, RolePrintingServlet.class);
war.addClasses(RoleServlets.class, RoleServlets.Role1Servlet.class, RoleServlets.Role2Servlet.class, RoleServlets.Role3Servlet.class, RoleServlets.Role4Servlet.class, RoleServlets.Role5Servlet.class, RoleServlets.Role6Servlet.class);
war.addAsWebInfResource(AggregateRealmWithTransformerTestCase.class.getPackage(), "aggregate-realm-with-transformer-web.xml", "web.xml");
war.addAsWebInfResource(Utils.getJBossWebXmlAsset(AGGREGATE_REALM_ATTRIBUTES_NAME), "jboss-web.xml");
war.addAsManifestResource(createPermissionsXmlAsset(new ElytronPermission("getSecurityDomain")), "permissions.xml");
return war;
}
use of org.wildfly.security.permission.ElytronPermission in project wildfly by wildfly.
the class JdbcRealmTestCase method deployment.
@Deployment(name = DEPLOYMENT)
public static WebArchive deployment() {
final WebArchive war = ShrinkWrap.create(WebArchive.class, DEPLOYMENT + ".war");
war.addClasses(JdbcTestServlet.class);
war.addAsWebInfResource(JdbcRealmTestCase.class.getPackage(), "jdbc-realm-web.xml", "web.xml");
war.addAsWebInfResource(Utils.getJBossWebXmlAsset(DEPLOYMENT), "jboss-web.xml").addAsManifestResource(createPermissionsXmlAsset(new ElytronPermission("getSecurityDomain")), "permissions.xml");
return war;
}
use of org.wildfly.security.permission.ElytronPermission in project wildfly by wildfly.
the class UsernameTokenElytronTestCase method createDeployment.
@Deployment(testable = false)
public static WebArchive createDeployment() {
WebArchive archive = ShrinkWrap.create(WebArchive.class, UsernameTokenElytronTestCase.class.getSimpleName() + ".war");
archive.setManifest(new StringAsset("Manifest-Version: 1.0\n" + "Dependencies: org.apache.cxf\n")).addClasses(ServiceIface.class, ElytronUsernameTokenImpl.class).addAsWebInfResource(UsernameTokenElytronTestCase.class.getPackage(), "jboss-ejb3-elytron-properties.xml", "jboss-ejb3.xml").addAsWebInfResource(ServiceIface.class.getPackage(), "wsdl/UsernameToken.wsdl", "wsdl/UsernameToken.wsdl").addAsWebInfResource(ServiceIface.class.getPackage(), "wsdl/UsernameToken_schema1.xsd", "wsdl/UsernameToken_schema1.xsd").addAsManifestResource(PermissionUtils.createPermissionsXmlAsset(new ElytronPermission("getSecurityDomain")), "permissions.xml");
return archive;
}
use of org.wildfly.security.permission.ElytronPermission in project wildfly by wildfly.
the class SecuredBeanClientInterceptorTestCase method deployment1.
@Deployment(name = "client")
@TargetsContainer("multinode-client")
public static Archive<?> deployment1() {
final Package currentPackage = SecuredBeanClientInterceptorTestCase.class.getPackage();
WebArchive war = ShrinkWrap.create(WebArchive.class, ARCHIVE_NAME_CLIENT + ".war");
war.addClasses(Util.class, ClientInterceptorUtil.class);
war.addClasses(AbstractSecurityDomainSetup.class, EjbSecurityDomainSetup.class);
war.addClasses(SecuredBeanClientInterceptorTestCase.class, SampleSecureInterceptor.class, Secured.class, SecuredBean.class);
war.addPackage(AbstractClientInterceptorsSetupTask.class.getPackage());
war.addAsManifestResource("META-INF/jboss-ejb-client-receivers.xml", "jboss-ejb-client.xml");
war.addAsWebInfResource(currentPackage, "jboss-web.xml", "jboss-web.xml");
war.addAsManifestResource(new StringAsset("Manifest-Version: 1.0\nDependencies: org.jboss.as.controller-client,org.jboss.dmr\n"), "MANIFEST.MF");
war.addAsManifestResource(createPermissionsXmlAsset(new SecurityPermission("putProviderProperty.WildFlyElytron"), new ElytronPermission("getSecurityDomain"), new ElytronPermission("authenticate"), new RuntimePermission("getProtectionDomain"), new AuthPermission("modifyPrincipals"), new FilePermission(System.getProperty("jboss.home") + File.separatorChar + "standalone" + File.separatorChar + "tmp" + File.separatorChar + "auth" + File.separatorChar + "-", "read")), "permissions.xml");
return war;
}
use of org.wildfly.security.permission.ElytronPermission in project wildfly by wildfly.
the class BasicIIOPInvocationTestCase method clientDeployment.
@Deployment(name = "client", testable = true)
@TargetsContainer("iiop-client")
public static Archive<?> clientDeployment() {
/*
* The @EJB annotation doesn't allow to specify the address dynamically. So, istead of
* @EJB(lookup = "corbaname:iiop:localhost:3628#IIOPTransactionalStatelessBean")
* private IIOPTransactionalHome home;
* we need to do this trick to get the ${node0} sys prop into ejb-jar.xml
* and have it injected that way.
*/
String ejbJar = FileUtils.readFile(BasicIIOPInvocationTestCase.class, "ejb-jar.xml");
final Properties properties = new Properties();
properties.putAll(System.getProperties());
if (properties.containsKey("node1")) {
properties.put("node1", NetworkUtils.formatPossibleIpv6Address((String) properties.get("node1")));
}
final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "client.jar");
jar.addClasses(ClientEjb.class, IIOPBasicHome.class, IIOPBasicRemote.class, BasicIIOPInvocationTestCase.class, IIOPBasicStatefulHome.class, IIOPBasicStatefulRemote.class, HandleWrapper.class).addAsManifestResource(BasicIIOPInvocationTestCase.class.getPackage(), "jboss-ejb3.xml", "jboss-ejb3.xml").addAsManifestResource(new StringAsset(PropertiesValueResolver.replaceProperties(ejbJar, properties)), "ejb-jar.xml").addAsManifestResource(PermissionUtils.createPermissionsXmlAsset(new ElytronPermission("getPrivateCredentials")), "permissions.xml");
return jar;
}
Aggregations