Example usage for java.security SecurityPermission SecurityPermission

List of usage examples for java.security SecurityPermission SecurityPermission

Introduction

In this page you can find the example usage for java.security SecurityPermission SecurityPermission.

Prototype

public SecurityPermission(String name) 

Source Link

Document

Creates a new SecurityPermission with the specified name.

Usage

From source file:org.jboss.as.test.integration.ws.authentication.policy.AuthenticationPolicyContextTestCase.java

@Deployment(name = PICKETLINK_STS, managed = false, testable = false)
public static Archive<?> createPicketlinkStsDeployment() {
    WebArchive war = ShrinkWrap.create(WebArchive.class, PICKETLINK_STS + ".war");
    war.addClass(PicketLinkSTSService.class);
    war.addAsResource(AuthenticationPolicyContextTestCase.class.getPackage(), "resources/sts-users.properties",
            "sts-users.properties");
    war.addAsResource(AuthenticationPolicyContextTestCase.class.getPackage(), "resources/sts-roles.properties",
            "sts-roles.properties");
    war.addAsResource(AuthenticationPolicyContextTestCase.class.getPackage(),
            "resources/WEB-INF/sts_keystore.jks", "sts_keystore.jks");
    war.addAsWebInfResource(createFilteredAsset("resources/WEB-INF/picketlink-sts.xml"),
            "classes/picketlink-sts.xml");
    war.addAsWebInfResource(createFilteredAsset("resources/WEB-INF/wsdl/PicketLinkSTS.wsdl"),
            "wsdl/PicketLinkSTS.wsdl");
    war.addAsWebInfResource(AuthenticationPolicyContextTestCase.class.getPackage(),
            "resources/WEB-INF/beans.xml", "beans.xml");
    war.addAsWebInfResource(AuthenticationPolicyContextTestCase.class.getPackage(),
            "resources/WEB-INF/jboss-web.xml", "jboss-web.xml");
    war.addAsWebInfResource(AuthenticationPolicyContextTestCase.class.getPackage(),
            "resources/WEB-INF/jboss-wsse-server.xml", "jboss-wsse-server.xml");
    war.addAsWebInfResource(AuthenticationPolicyContextTestCase.class.getPackage(), "resources/WEB-INF/web.xml",
            "web.xml");
    war.addAsManifestResource(AuthenticationPolicyContextTestCase.class.getPackage(),
            "resources/META-INF/jboss-deployment-structure.xml", "jboss-deployment-structure.xml");
    war.addAsManifestResource(AuthenticationPolicyContextTestCase.class.getPackage(),
            "resources/META-INF/jboss-webservices.xml", "jboss-webservices.xml");
    war.addAsManifestResource(createPermissionsXmlAsset(new SecurityPermission("getPolicy"),
            new RuntimePermission("org.jboss.security.getSecurityContext")), "permissions.xml");
    return war;/* w  w  w  .  jav  a  2 s  .  c  o  m*/
}

From source file:org.jboss.as.test.integration.ws.authentication.policy.AuthenticationPolicyContextTestCase.java

@Deployment(name = PICKETLINK_STS_WS, managed = false, testable = false)
public static Archive<?> createPicketlinkStsWsDeployment() {
    WebArchive war = ShrinkWrap.create(WebArchive.class, PICKETLINK_STS_WS + ".war");
    war.addClasses(EchoServiceRemote.class);
    war.addClasses(EchoService.class);
    war.addAsResource(AuthenticationPolicyContextTestCase.class.getPackage(), "resources/sp-users.properties",
            "sp-users.properties");
    war.addAsResource(AuthenticationPolicyContextTestCase.class.getPackage(), "resources/sp-roles.properties",
            "sp-roles.properties");
    war.addAsResource(createFilteredAsset("resources/sts-config.properties"), "sts-config.properties");
    war.addAsWebInfResource(createFilteredAsset("resources/WEB-INF/wsdl/PicketLinkSTS.wsdl"),
            "wsdl/PicketLinkSTS.wsdl");
    war.addAsWebInfResource(AuthenticationPolicyContextTestCase.class.getPackage(),
            "resources/WEB-INF/beans.xml", "beans.xml");
    war.addAsWebInfResource(AuthenticationPolicyContextTestCase.class.getPackage(),
            "resources/WEB-INF/jboss-web-ws.xml", "jboss-web-ws.xml");
    war.addAsWebInfResource(AuthenticationPolicyContextTestCase.class.getPackage(),
            "resources/WEB-INF/jboss-wsse-server.xml", "jboss-wsse-server.xml");
    war.addAsManifestResource(AuthenticationPolicyContextTestCase.class.getPackage(),
            "resources/META-INF/jboss-deployment-structure.xml", "jboss-deployment-structure.xml");
    war.addAsManifestResource(AuthenticationPolicyContextTestCase.class.getPackage(),
            "resources/META-INF/jboss-webservices.xml", "jboss-webservices.xml");
    war.addAsResource(AuthenticationPolicyContextTestCase.class.getPackage(), "dummmy-ws-handler.xml",
            "org/jboss/as/test/integration/ws/authentication/policy/resources/dummmy-ws-handler.xml");
    war.addAsManifestResource(createPermissionsXmlAsset(new SecurityPermission("getPolicy"),
            new RuntimePermission("org.jboss.security.getSecurityContext")), "permissions.xml");
    return war;//from   www .  j  a  v  a  2 s. co  m
}