Package org.jboss.security.xacml.core

Examples of org.jboss.security.xacml.core.JBossPDP


      Unmarshaller u = jc.createUnmarshaller();
      JAXBElement<?> j = (JAXBElement<?>) u.unmarshal(configFile);
      assertNotNull("JAXBElement is !null", j);
     
      assertNotNull("configFile != null", configFile);
      PolicyDecisionPoint pdp = new JBossPDP(j);
      XACMLTestUtil.validateInteropCases(pdp);
   }
View Full Code Here


      Unmarshaller u = jc.createUnmarshaller();
      JAXBElement<?> j = (JAXBElement<?>) u.unmarshal(configFile);
      assertNotNull("JAXBElement is !null", j);
     
      assertNotNull("configFile != null", configFile);
      PolicyDecisionPoint pdp = new JBossPDP(j);
      TestCase.assertEquals("Case 1 should be deny",
            XACMLConstants.DECISION_DENY, XACMLTestUtil.getDecision(pdp,
            "test/policies/custom/custom-request.xml"));
   }
View Full Code Here

      Unmarshaller u = jc.createUnmarshaller();
      JAXBElement<?> j = (JAXBElement<?>) u.unmarshal(configFile);
      assertNotNull("JAXBElement is !null", j);
     
      assertNotNull("configFile != null", configFile);
      PolicyDecisionPoint pdp = new JBossPDP(j);
      assertNotNull(pdp);
   }
View Full Code Here

   {
      ClassLoader tcl = Thread.currentThread().getContextClassLoader();
      InputStream is = tcl.getResourceAsStream("test/config/rsaConferencePolicySetConfig.xml");
      assertNotNull("InputStream != null", is);

      return new JBossPDP(is);
   }
View Full Code Here

   {
      ClassLoader tcl = Thread.currentThread().getContextClassLoader();
      InputStream is = tcl.getResourceAsStream("test/config/himss09-interop-config.xml");
      assertNotNull("InputStream != null", is);

      return new JBossPDP(is);
   }
View Full Code Here

   public void testInteropTestWithXMLRequests() throws Exception
   {
      ClassLoader tcl = Thread.currentThread().getContextClassLoader();
      InputStream is = tcl.getResourceAsStream(getConfigFileName());
      assertNotNull("InputStream != null", is);
      PolicyDecisionPoint pdp = new JBossPDP(is);
      assertNotNull("JBossPDP is != null", pdp);
      //http://www.oasis-open.org/committees/download.php/24475/xacml-2.0-core-interop-draft-12-04.doc
      /*
       Test (Trade-limit)(Cred-line)(Curr-cred)(Req-tr-appr) (Req-cr-appr) (Num-shrs)(Buy-price)(Expected Decision
       1     10000   15000           10000       False        False         1000       10  Deny
View Full Code Here

   public void testInteropTestWithObjects() throws Exception
   {
      ClassLoader tcl = Thread.currentThread().getContextClassLoader();
      InputStream is = tcl.getResourceAsStream(getConfigFileName());
      assertNotNull("InputStream != null", is);
      PolicyDecisionPoint pdp = new JBossPDP(is);
      assertNotNull("JBossPDP is != null", pdp);

      assertEquals("Case 1 should be deny", XACMLConstants.DECISION_DENY, XACMLTestUtil.getDecision(pdp,
            getRequestContext("false", "false", 10)));
      assertEquals("Case 2 should be deny", XACMLConstants.DECISION_PERMIT, XACMLTestUtil.getDecision(pdp,
View Full Code Here

   {
      ClassLoader tcl = Thread.currentThread().getContextClassLoader();
      InputStream is = tcl.getResourceAsStream("test/config/webConfig.xml");
      assertNotNull("InputStream != null", is);

      return new JBossPDP(is);
   }
View Full Code Here

   private boolean debug = "true".equals(System.getProperty("debug", "false"));

   public void testWebBinding() throws Exception
   {
      PolicyType policyType = constructPolicy();
      PolicyDecisionPoint pdp = new JBossPDP();

      XACMLPolicy policy = PolicyFactory.createPolicy(policyType);
      Set<XACMLPolicy> policies = new HashSet<XACMLPolicy>();
      policies.add(policy);

      pdp.setPolicies(policies);

      //Add the basic locators also
      PolicyLocator policyLocator = new JBossPolicyLocator();
      policyLocator.setPolicies(policies); //Locators need to be given the policies

      Set<PolicyLocator> locators = new HashSet<PolicyLocator>();
      locators.add(policyLocator);
      pdp.setLocators(locators);
      assertNotNull("JBossPDP is != null", pdp);

      Principal p = new Principal()
      {
         public String getName()
View Full Code Here

   }

   public void testNegativeAccessWebBinding() throws Exception
   {
      PolicyType policyType = constructPolicy();
      PolicyDecisionPoint pdp = new JBossPDP();

      XACMLPolicy policy = PolicyFactory.createPolicy(policyType);
      Set<XACMLPolicy> policies = new HashSet<XACMLPolicy>();
      policies.add(policy);

      pdp.setPolicies(policies);

      //Add the basic locators also
      PolicyLocator policyLocator = new JBossPolicyLocator();
      policyLocator.setPolicies(policies); //Locators need to be given the policies

      Set<PolicyLocator> locators = new HashSet<PolicyLocator>();
      locators.add(policyLocator);
      pdp.setLocators(locators);
      assertNotNull("JBossPDP is != null", pdp);

      Principal p = new Principal()
      {
         public String getName()
View Full Code Here

TOP

Related Classes of org.jboss.security.xacml.core.JBossPDP

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.