Search in sources :

Example 21 with ElytronPermission

use of org.wildfly.security.permission.ElytronPermission in project wildfly by wildfly.

the class GetCallerPrincipalTestCase method deploymentSfsb.

@Deployment(managed = false, testable = false, name = "sfsb", order = 101)
public static Archive<?> deploymentSfsb() {
    final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "sfsb.jar").addClass(SFSBLifecycleCallback.class).addClass(IBeanLifecycleCallback.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-bean", "MANIFEST.MF").addAsManifestResource(createPermissionsXmlAsset(new ElytronPermission("getSecurityDomain"), new ElytronPermission("authenticate")), "jboss-permissions.xml");
    jar.addPackage(CommonCriteria.class.getPackage());
    return jar;
}
Also used : CommonCriteria(org.jboss.as.test.categories.CommonCriteria) ElytronPermission(org.wildfly.security.permission.ElytronPermission) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) OperateOnDeployment(org.jboss.arquillian.container.test.api.OperateOnDeployment) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 22 with ElytronPermission

use of org.wildfly.security.permission.ElytronPermission in project wildfly by wildfly.

the class GetCallerPrincipalTestCase method deploymentMdb.

@Deployment(managed = false, testable = false, name = "mdb", order = 102)
public static Archive<?> deploymentMdb() {
    final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "mdb.jar").addClass(MDBLifecycleCallback.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-bean", "MANIFEST.MF").addAsManifestResource(createPermissionsXmlAsset(new ElytronPermission("getSecurityDomain"), new ElytronPermission("authenticate")), "permissions.xml");
    jar.addPackage(CommonCriteria.class.getPackage());
    return jar;
}
Also used : CommonCriteria(org.jboss.as.test.categories.CommonCriteria) ElytronPermission(org.wildfly.security.permission.ElytronPermission) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) OperateOnDeployment(org.jboss.arquillian.container.test.api.OperateOnDeployment) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 23 with ElytronPermission

use of org.wildfly.security.permission.ElytronPermission in project wildfly by wildfly.

the class GetCallerPrincipalTestCase method deploymentSingleton.

@Deployment(managed = true, testable = false, name = "single", order = 0)
public static Archive<?> deploymentSingleton() {
    final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "single.jar").addClass(TestResultsSingleton.class).addClass(ITestResultsSingleton.class).addAsManifestResource(GetCallerPrincipalTestCase.class.getPackage(), "jboss-ejb3.xml", "jboss-ejb3.xml").addAsManifestResource(GetCallerPrincipalTestCase.class.getPackage(), "MANIFEST.MF-single", "MANIFEST.MF").addAsManifestResource(createPermissionsXmlAsset(new ElytronPermission("getSecurityDomain"), new ElytronPermission("authenticate")), "permissions.xml");
    jar.addPackage(CommonCriteria.class.getPackage());
    return jar;
}
Also used : CommonCriteria(org.jboss.as.test.categories.CommonCriteria) ElytronPermission(org.wildfly.security.permission.ElytronPermission) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) OperateOnDeployment(org.jboss.arquillian.container.test.api.OperateOnDeployment) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 24 with ElytronPermission

use of org.wildfly.security.permission.ElytronPermission in project wildfly by wildfly.

the class GetCallerPrincipalTestCase method deploymentSlsb.

@Deployment(managed = false, testable = false, name = "slsb", order = 100)
public static Archive<?> deploymentSlsb() {
    final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "slsb.jar").addClass(SLSBLifecycleCallback.class).addClass(IBeanLifecycleCallback.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-bean", "MANIFEST.MF").addAsManifestResource(createPermissionsXmlAsset(new ElytronPermission("getSecurityDomain"), new ElytronPermission("authenticate")), "permissions.xml");
    jar.addPackage(CommonCriteria.class.getPackage());
    return jar;
}
Also used : CommonCriteria(org.jboss.as.test.categories.CommonCriteria) ElytronPermission(org.wildfly.security.permission.ElytronPermission) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) OperateOnDeployment(org.jboss.arquillian.container.test.api.OperateOnDeployment) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 25 with ElytronPermission

use of org.wildfly.security.permission.ElytronPermission 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;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) CommonCriteria(org.jboss.as.test.categories.CommonCriteria) ElytronPermission(org.wildfly.security.permission.ElytronPermission) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) ChangeRoleMapperPermission(org.wildfly.security.auth.permission.ChangeRoleMapperPermission) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Aggregations

Deployment (org.jboss.arquillian.container.test.api.Deployment)27 ElytronPermission (org.wildfly.security.permission.ElytronPermission)27 OperateOnDeployment (org.jboss.arquillian.container.test.api.OperateOnDeployment)17 JavaArchive (org.jboss.shrinkwrap.api.spec.JavaArchive)15 CommonCriteria (org.jboss.as.test.categories.CommonCriteria)13 StringAsset (org.jboss.shrinkwrap.api.asset.StringAsset)13 WebArchive (org.jboss.shrinkwrap.api.spec.WebArchive)12 AbstractSecurityDomainSetup (org.jboss.as.test.integration.security.common.AbstractSecurityDomainSetup)6 ChangeRoleMapperPermission (org.wildfly.security.auth.permission.ChangeRoleMapperPermission)6 AuthPermission (javax.security.auth.AuthPermission)5 TargetsContainer (org.jboss.arquillian.container.test.api.TargetsContainer)4 Properties (java.util.Properties)3 PropertyPermission (java.util.PropertyPermission)3 Util (org.jboss.as.test.shared.integration.ejb.security.Util)3 SocketPermission (java.net.SocketPermission)2 EjbElytronDomainSetup (org.wildfly.test.security.common.elytron.EjbElytronDomainSetup)2 ElytronDomainSetup (org.wildfly.test.security.common.elytron.ElytronDomainSetup)2 ServletElytronDomainSetup (org.wildfly.test.security.common.elytron.ServletElytronDomainSetup)2 FilePermission (java.io.FilePermission)1 SecurityPermission (java.security.SecurityPermission)1