Search in sources :

Example 81 with PropertyPermission

use of java.util.PropertyPermission in project wildfly by wildfly.

the class RemoteProtocolChangeClientInterceptorTestCase method deployment1.

@Deployment(name = AbstractClientInterceptorsSetupTask.DEPLOYMENT_NAME_CLIENT)
@TargetsContainer(AbstractClientInterceptorsSetupTask.TARGER_CONTAINER_CLIENT)
public static Archive<?> deployment1() {
    JavaArchive jar = ShrinkWrap.create(JavaArchive.class, ARCHIVE_NAME_CLIENT + ".jar");
    jar.addClasses(Util.class, ClientInterceptorUtil.class);
    jar.addClasses(StatelessBean.class, StatelessRemote.class, ProtocolSampleClientInterceptor.class);
    jar.addClasses(RemoteProtocolChangeClientInterceptorTestCase.class, TestSuiteEnvironment.class);
    jar.addPackage(AbstractClientInterceptorsSetupTask.class.getPackage());
    jar.addAsManifestResource(RemoteProtocolChangeClientInterceptorTestCase.class.getPackage(), "jboss-ejb-client.xml", "jboss-ejb-client.xml");
    jar.addAsManifestResource(createPermissionsXmlAsset(new SecurityPermission("putProviderProperty.WildFlyElytron"), new PropertyPermission("management.address", "read"), new PropertyPermission("node0", "read"), new PropertyPermission("jboss.http.port", "read"), new PropertyPermission("jboss.socket.binding.port-offset", "read"), new FilePermission(System.getProperty("jboss.home") + File.separatorChar + "standalone" + File.separatorChar + "tmp" + File.separatorChar + "auth" + File.separatorChar + "-", "read")), "permissions.xml");
    return jar;
}
Also used : AbstractClientInterceptorsSetupTask(org.jboss.as.test.shared.integration.interceptor.clientside.AbstractClientInterceptorsSetupTask) PropertyPermission(java.util.PropertyPermission) FilePermission(java.io.FilePermission) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) SecurityPermission(java.security.SecurityPermission) OperateOnDeployment(org.jboss.arquillian.container.test.api.OperateOnDeployment) Deployment(org.jboss.arquillian.container.test.api.Deployment) TargetsContainer(org.jboss.arquillian.container.test.api.TargetsContainer)

Example 82 with PropertyPermission

use of java.util.PropertyPermission in project wildfly by wildfly.

the class ExpressionSubstitutionInContainerTestCase method deploy.

@Deployment
public static Archive<?> deploy() {
    final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, ARCHIVE_NAME + ".jar");
    jar.addPackage(ExpressionSubstitutionInContainerTestCase.class.getPackage());
    jar.addClasses(ModelUtil.class, TestSuiteEnvironment.class, Authentication.class);
    jar.addAsManifestResource(new StringAsset("Manifest-Version: 1.0\n" + // there has to be a spacer - otherwise you meet "java.io.IOException: invalid header field"
    "Class-Path: \n" + "Dependencies: org.jboss.as.controller-client, org.jboss.as.controller, org.jboss.dmr, org.jboss.remoting \n"), "MANIFEST.MF");
    jar.addAsManifestResource(createPermissionsXmlAsset(// Needed by the StatelessBean#addSystemProperty()
    new PropertyPermission("qa.test.*", "write"), new PropertyPermission("qa.test.*", "read"), new RemotingPermission("createEndpoint"), new RemotingPermission("connect"), new PropertyPermission("management.address", "read"), new PropertyPermission("node0", "read"), new PropertyPermission("as.managementPort", "read"), new PropertyPermission("management.port", "read"), new PropertyPermission("jboss.management.user", "read"), new PropertyPermission("jboss.management.password", "read"), new FilePermission(System.getProperty("jboss.inst") + "/standalone/tmp/auth/*", "read")), "jboss-permissions.xml");
    return jar;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) PropertyPermission(java.util.PropertyPermission) RemotingPermission(org.jboss.remoting3.security.RemotingPermission) FilePermission(java.io.FilePermission) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 83 with PropertyPermission

use of java.util.PropertyPermission in project ignite by apache.

the class AbstractSandboxTest method prepareCluster.

/**
 */
protected void prepareCluster() throws Exception {
    Ignite srv = startGrid(SRV, ALLOW_ALL, false);
    Permissions perms = new Permissions();
    perms.add(new PropertyPermission(PROP_NAME, "write"));
    startGrid(CLNT_ALLOWED_WRITE_PROP, ALLOW_ALL, perms, true);
    startGrid(CLNT_FORBIDDEN_WRITE_PROP, ALLOW_ALL, true);
    srv.cluster().active(true);
}
Also used : PropertyPermission(java.util.PropertyPermission) Permissions(java.security.Permissions) Ignite(org.apache.ignite.Ignite)

Example 84 with PropertyPermission

use of java.util.PropertyPermission in project wildfly by wildfly.

the class JVMServerPropertiesTestCase method createDeployment.

public static WebArchive createDeployment() {
    WebArchive war = ShrinkWrap.create(WebArchive.class, PROP_SERVLET_APP_WAR);
    war.addClass(PropertiesServlet.class);
    war.addAsManifestResource(createPermissionsXmlAsset(new PropertyPermission("*", "read, write")), "permissions.xml");
    return war;
}
Also used : PropertyPermission(java.util.PropertyPermission) WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive)

Example 85 with PropertyPermission

use of java.util.PropertyPermission in project wildfly by wildfly.

the class MDBTestCase method getDeployment.

@Deployment
public static Archive getDeployment() {
    final JavaArchive ejbJar = ShrinkWrap.create(JavaArchive.class, "MDBTestCase.jar");
    ejbJar.addClasses(DDBasedMDB.class, BMTSLSB.class, JMSMessagingUtil.class, AnnoBasedMDB.class, TimeoutUtil.class);
    ejbJar.addPackage(JMSOperations.class.getPackage());
    ejbJar.addClass(JmsQueueSetup.class);
    ejbJar.addAsManifestResource(MDBTestCase.class.getPackage(), "ejb-jar.xml", "ejb-jar.xml");
    ejbJar.addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.controller-client, org.jboss.dmr, org.jboss.remoting\n"), "MANIFEST.MF");
    ejbJar.addAsManifestResource(createPermissionsXmlAsset(new RemotingPermission("createEndpoint"), new RemotingPermission("connect"), new FilePermission(System.getProperty("jboss.inst") + "/standalone/tmp/auth/*", "read"), new PropertyPermission(TimeoutUtil.FACTOR_SYS_PROP, "read")), "permissions.xml");
    return ejbJar;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) PropertyPermission(java.util.PropertyPermission) RemotingPermission(org.jboss.remoting3.security.RemotingPermission) JMSOperations(org.jboss.as.test.integration.common.jms.JMSOperations) FilePermission(java.io.FilePermission) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Aggregations

PropertyPermission (java.util.PropertyPermission)99 Deployment (org.jboss.arquillian.container.test.api.Deployment)49 JavaArchive (org.jboss.shrinkwrap.api.spec.JavaArchive)46 StringAsset (org.jboss.shrinkwrap.api.asset.StringAsset)35 FilePermission (java.io.FilePermission)23 WebArchive (org.jboss.shrinkwrap.api.spec.WebArchive)18 SocketPermission (java.net.SocketPermission)13 JMSOperations (org.jboss.as.test.integration.common.jms.JMSOperations)13 Permission (java.security.Permission)10 AccessControlException (java.security.AccessControlException)8 RemotingPermission (org.jboss.remoting3.security.RemotingPermission)8 PermissionCollection (java.security.PermissionCollection)7 OperateOnDeployment (org.jboss.arquillian.container.test.api.OperateOnDeployment)7 ReflectPermission (java.lang.reflect.ReflectPermission)6 EnterpriseArchive (org.jboss.shrinkwrap.api.spec.EnterpriseArchive)6 Permissions (java.security.Permissions)5 SecurityPermission (java.security.SecurityPermission)5 AccessControlContext (java.security.AccessControlContext)4 TimeoutUtil (org.jboss.as.test.shared.TimeoutUtil)4 Method (java.lang.reflect.Method)3