use of org.wildfly.security.permission.ElytronPermission in project wildfly by wildfly.
the class GetCallerPrincipalTestCase method deployment.
@Deployment(managed = true, testable = true, name = "test", order = 3)
public static Archive<?> deployment() {
final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "callerprincipal-test.jar").addClass(GetCallerPrincipalTestCase.class).addClass(SLSBWithoutSecurityDomain.class).addClass(ISLSBWithoutSecurityDomain.class).addClass(PollingUtils.class).addClass(Util.class).addClasses(JmsQueueSetup.class, EjbSecurityDomainSetup.class, AbstractSecurityDomainSetup.class, AbstractMgmtTestBase.class).addPackage(AbstractMgmtTestBase.class.getPackage()).addClasses(MgmtOperationException.class, XMLElementReader.class, XMLElementWriter.class).addAsResource(GetCallerPrincipalTestCase.class.getPackage(), "users.properties", "users.properties").addAsResource(GetCallerPrincipalTestCase.class.getPackage(), "roles.properties", "roles.properties").addAsManifestResource(GetCallerPrincipalTestCase.class.getPackage(), "jboss-ejb3.xml", "jboss-ejb3.xml").addAsManifestResource(GetCallerPrincipalTestCase.class.getPackage(), "MANIFEST.MF-test", "MANIFEST.MF").addAsManifestResource(createPermissionsXmlAsset(new ElytronPermission("getSecurityDomain"), new ElytronPermission("authenticate")), "permissions.xml");
jar.addPackage(CommonCriteria.class.getPackage());
return jar;
}
use of org.wildfly.security.permission.ElytronPermission in project wildfly by wildfly.
the class WildFlyActivationRaWithWMElytronSecurityDomainWorkManagerElytronEnabledTestCase method ejbDeployment.
@Deployment(name = "ejb", order = 2)
public static Archive<?> ejbDeployment() {
final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "wf-ra-wm-security-domain-ejb.jar").addClass(WildFlyActivationRaWithWMElytronSecurityDomainWorkManagerElytronEnabledTestCase.class).addClass(AbstractElytronSetupTask.class).addClass(AbstractJcaSetup.class).addClass(AbstractRaSetup.class);
jar.addClasses(AbstractLoginModuleSecurityDomainTestCaseSetup.class, AbstractSecurityDomainSetup.class, TestBean.class);
jar.addAsManifestResource(new StringAsset("Dependencies: org.jboss.ironjacamar.api,deployment.wf-ra-wm-security-domain-rar.rar\n"), "MANIFEST.MF");
jar.addAsManifestResource(createPermissionsXmlAsset(new ElytronPermission("createAdHocIdentity"), new ChangeRoleMapperPermission("ejb"), new AuthPermission("modifyPrincipals")), "permissions.xml");
return jar;
}
use of org.wildfly.security.permission.ElytronPermission in project wildfly by wildfly.
the class ServletUnitTestCase method deployEar.
@Deployment(name = "ear", order = 4)
public static Archive<?> deployEar() {
EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, "ejb3-ear-servlet.ear");
ear.addAsModule(getClient("ejb3-ear-servlet-client.jar"));
ear.addAsModule(getEjbs("ejb3-ear-servlet-ejbs.jar"));
WebArchive war = getServlet("ejb3-ear-servlet.war");
war.addAsWebInfResource(ServletUnitTestCase.class.getPackage(), "jboss-web-ear.xml", "jboss-web.xml");
war.addAsWebInfResource(ServletUnitTestCase.class.getPackage(), "web-ear.xml", "web.xml");
war.addClass(EJBServletEar.class);
war.addClass(Util.class);
ear.addAsManifestResource(createPermissionsXmlAsset(new ElytronPermission("getSecurityDomain"), new ElytronPermission("authenticate")), "permissions.xml");
ear.addAsModule(war);
ear.addAsManifestResource(ServletUnitTestCase.class.getPackage(), "application.xml", "application.xml");
return ear;
}
use of org.wildfly.security.permission.ElytronPermission in project wildfly by wildfly.
the class ServletUnitTestCase method deployServlet.
@Deployment(name = "servlet", order = 3)
public static Archive<?> deployServlet() {
WebArchive war = getServlet("ejb3-servlet.war");
war.addClass(EJBServlet.class);
war.addClass(Util.class);
war.addAsWebInfResource(ServletUnitTestCase.class.getPackage(), "jboss-web.xml", "jboss-web.xml");
war.addAsWebInfResource(ServletUnitTestCase.class.getPackage(), "web.xml", "web.xml");
war.addAsManifestResource(new StringAsset("Dependencies: deployment.ejb3-servlet-ejbs.jar \n"), "MANIFEST.MF");
war.addAsManifestResource(createPermissionsXmlAsset(new ElytronPermission("getSecurityDomain"), new ElytronPermission("authenticate")), "permissions.xml");
return war;
}
use of org.wildfly.security.permission.ElytronPermission in project wildfly by wildfly.
the class TransactionIIOPInvocationTestCase method clientDeployment.
@Deployment(name = "client", testable = true)
@TargetsContainer("iiop-client")
public static Archive<?> clientDeployment() {
String ejbJar = FileUtils.readFile(TransactionIIOPInvocationTestCase.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, IIOPTransactionalHome.class, IIOPTransactionalRemote.class, TransactionIIOPInvocationTestCase.class, IIOPTransactionalStatefulHome.class, IIOPTransactionalStatefulRemote.class).addAsManifestResource(TransactionIIOPInvocationTestCase.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