Search in sources :

Example 26 with ElytronPermission

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

the class SingletonSecurityTestCase method deploy.

@Deployment
public static Archive<?> deploy() {
    JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "ejb3-singleton-security.jar");
    jar.addPackage(SingletonSecurityTestCase.class.getPackage());
    jar.addPackage(CommonCriteria.class.getPackage());
    jar.addClass(Util.class);
    jar.addAsResource(createPermissionsXmlAsset(new RuntimePermission("org.jboss.security.setSecurityContext"), new ElytronPermission("getSecurityDomain"), new ElytronPermission("authenticate"), new ElytronPermission("setRunAsPrincipal")), "META-INF/permissions.xml");
    return jar;
}
Also used : CommonCriteria(org.jboss.as.test.categories.CommonCriteria) ElytronPermission(org.wildfly.security.permission.ElytronPermission) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 27 with ElytronPermission

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

the class TimeoutMethodWithRunAsAnnotationTestCase method deploy.

@Deployment
public static Archive<?> deploy() {
    JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "myJar.jar");
    jar.addPackage(TimeoutMethodWithRunAsAnnotationTestCase.class.getPackage());
    jar.addAsManifestResource(createPermissionsXmlAsset(new ElytronPermission("setRunAsPrincipal"), new ChangeRoleMapperPermission("ejb")), "permissions.xml");
    return jar;
}
Also used : 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