use of org.wildfly.security.auth.permission.ChangeRoleMapperPermission 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.auth.permission.ChangeRoleMapperPermission in project wildfly by wildfly.
the class MDBRoleTestCase method deployment.
@Deployment
public static Archive<?> deployment() {
final JavaArchive deployment = ShrinkWrap.create(JavaArchive.class, "ejb3mdb.jar").addClass(MDBRole.class).addClass(CreateQueueSetupTask.class).addClasses(AbstractSecurityDomainSetup.class, EjbSecurityDomainSetup.class).addClass(Simple.class).addClass(SimpleSLSB.class).addClass(TimeoutUtil.class);
deployment.addAsManifestResource(MDBRoleTestCase.class.getPackage(), "jboss-ejb3.xml", "jboss-ejb3.xml");
deployment.addPackage(CommonCriteria.class.getPackage());
// grant necessary permissions
// TODO WFLY-15289 The Elytron permissions need to be checked, should a deployment really need these?
deployment.addAsResource(createPermissionsXmlAsset(new PropertyPermission("ts.timeout.factor", "read"), new ElytronPermission("setRunAsPrincipal"), new ElytronPermission("handleSecurityEvent"), new ChangeRoleMapperPermission("ejb")), "META-INF/jboss-permissions.xml");
return deployment;
}
use of org.wildfly.security.auth.permission.ChangeRoleMapperPermission in project wildfly by wildfly.
the class RunAsPrincipalTestCase method runAsDeployment.
@Deployment
public static Archive<?> runAsDeployment() {
// using JavaArchive doesn't work, because of a bug in Arquillian, it only deploys wars properly
final WebArchive war = ShrinkWrap.create(WebArchive.class, DEPLOYMENT + ".war").addPackage(WhoAmI.class.getPackage()).addClass(SimpleSingletonBean.class).addClass(StatelessSingletonUseBean.class).addClass(Util.class).addClass(Entry.class).addClass(RunAsPrincipalTestCase.class).addClass(TestLogHandlerSetupTask.class).addClass(LoggingUtil.class).addClasses(AbstractSecurityDomainSetup.class, EjbSecurityDomainSetup.class).addAsWebInfResource(RunAsPrincipalTestCase.class.getPackage(), "jboss-ejb3.xml", "jboss-ejb3.xml").addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.controller-client,org.jboss.dmr\n"), "MANIFEST.MF").addAsManifestResource(createPermissionsXmlAsset(new ElytronPermission("getSecurityDomain"), new PropertyPermission("jboss.server.log.dir", "read"), PermissionUtils.createFilePermission("read", "standalone", "log", TEST_LOG_FILE_NAME), new ElytronPermission("authenticate"), new ElytronPermission("getIdentity"), new ElytronPermission("createAdHocIdentity"), new ChangeRoleMapperPermission("ejb"), new ElytronPermission("setRunAsPrincipal")), "permissions.xml");
war.addPackage(CommonCriteria.class.getPackage());
return war;
}
use of org.wildfly.security.auth.permission.ChangeRoleMapperPermission in project wildfly by wildfly.
the class RunAsEjbMdbTestCase method runAsEJB3.
@Deployment(testable = false, managed = true, name = "ejb3", order = 2)
public static Archive<?> runAsEJB3() {
final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "runasmdbejb-ejb3.jar").addClasses(HelloBean.class, Hello.class, HolaBean.class, Hola.class, Howdy.class, HowdyBean.class, HelloMDB.class, TimeoutUtil.class);
// TODO WFLY-15289 Should these permissions be required?
jar.addAsResource(createPermissionsXmlAsset(new PropertyPermission("ts.timeout.factor", "read"), new ElytronPermission("setRunAsPrincipal"), new ElytronPermission("handleSecurityEvent"), new ChangeRoleMapperPermission("ejb")), "META-INF/jboss-permissions.xml");
jar.addAsManifestResource(new StringAsset("Dependencies: deployment.runasmdbejb-ejb2.jar \n"), "MANIFEST.MF");
return jar;
}
use of org.wildfly.security.auth.permission.ChangeRoleMapperPermission in project wildfly by wildfly.
the class RunAsMDBUnitTestCase method deploy.
@Deployment
public static Archive<?> deploy() {
final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "runas-mdb.jar").addPackage(RunAsMDBUnitTestCase.class.getPackage()).addPackage(JMSOperations.class.getPackage()).addClass(JmsQueueSetup.class);
jar.addAsManifestResource(RunAsMDBUnitTestCase.class.getPackage(), "jboss-ejb3.xml", "jboss-ejb3.xml");
jar.addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.controller-client,org.jboss.dmr \n"), "MANIFEST.MF");
jar.addPackage(CommonCriteria.class.getPackage());
// TODO WFLY-15289 Should these permissions be required?
jar.addAsResource(createPermissionsXmlAsset(new ElytronPermission("setRunAsPrincipal"), new ElytronPermission("handleSecurityEvent"), new ChangeRoleMapperPermission("ejb")), "META-INF/jboss-permissions.xml");
return jar;
}
Aggregations