Package org.jboss.security.xacml.interfaces

Examples of org.jboss.security.xacml.interfaces.PolicyDecisionPoint


      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

      requestCtx.setRequest(requestType);

      ClassLoader tcl = Thread.currentThread().getContextClassLoader();
      InputStream is = tcl.getResourceAsStream("test/config/interopPolicySetConfig.xml");
      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, requestCtx));
   }
View Full Code Here

   //Enable for request trace
   private boolean debug = "true".equals(System.getProperty("debug", "false"));

   public void testWebBinding() throws Exception
   {
      PolicyDecisionPoint pdp = getPDP();
      assertNotNull("JBossPDP is != null", pdp);

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

      assertEquals("Access Allowed?", XACMLConstants.DECISION_PERMIT, XACMLTestUtil.getDecision(pdp, request));
   }

   public void testNegativeAccessWebBinding() throws Exception
   {
      PolicyDecisionPoint pdp = getPDP();
      assertNotNull("JBossPDP is != null", pdp);
      Principal p = new Principal()
      {
         public String getName()
         {
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

      try
      {
         RequestContext requestCtx = util.createXACMLRequest(this.ejbName,
               this.ejbMethod.getName(),this.ejbPrincipal, callerRoles);
        
         PolicyDecisionPoint pdp = util.getPDP(policyRegistration, this.policyContextID);
         if(pdp == null)
            throw new IllegalStateException("PDP is null");
        
         ResponseContext response = pdp.evaluate(requestCtx);
         result = response.getDecision() == XACMLConstants.DECISION_PERMIT ?
               AuthorizationContext.PERMIT : AuthorizationContext.DENY;
      }
      catch(Exception e)
      {
View Full Code Here

TOP

Related Classes of org.jboss.security.xacml.interfaces.PolicyDecisionPoint

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.