Package org.jboss.security.xacml.core

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


        final LocatorType locator = new LocatorType();
        locator.setName(JBossPolicySetLocator.class.getName());
        final LocatorsType locators = new LocatorsType();
        locators.getLocator().add(locator);
        pdp.setLocators(locators);
        return new JBossPDP(new JAXBElement<PDP>(new QName("urn:jboss:xacml:2.0", "jbosspdp"), PDP.class, pdp));
    }
View Full Code Here


        final File policyDir = new File("test-JBossPDP-Med-" + System.currentTimeMillis());
        final InputStream requestIS = getClass().getResourceAsStream(
                XACMLTestUtils.TESTOBJECTS_REQUESTS + "/med-example-request.xml");
        try {
            policyDir.mkdirs();
            final JBossPDP pdp = createPDPForMed(policyDir);
            final String requestTemplate = IOUtils.toString(requestIS, "UTF-8");
            LOGGER.info("REQUEST template: " + requestTemplate);
            final Map<String, Object> substitutionMap = new HashMap<String, Object>();

            substitutionMap.put(XACMLTestUtils.SUBST_SUBJECT_ID, "josef@med.example.com");
View Full Code Here

        locator.setName(JBossPolicySetLocator.class.getName());
        final LocatorsType locators = new LocatorsType();
        locators.getLocator().add(locator);
        pdp.setLocators(locators);

        return new JBossPDP(new JAXBElement<PDP>(new QName("urn:jboss:xacml:2.0", "jbosspdp"), PDP.class, pdp));
    }
View Full Code Here

     * configuration from /jbossxacml-config.xml file on the classpath.
     */
    public CustomXACMLAuthorizationModule() {
        LOGGER.debug("Creating new instance of the custom authorization module");
        try {
            pdp = new JBossPDP(getClass().getResourceAsStream("/jbossxacml-config.xml"));
        } catch (RuntimeException e) {
            LOGGER.error("PDP initialization failed.", e);
            throw e;
        }
    }
View Full Code Here

         JBossPolicySetLocator jpsl = new JBossPolicySetLocator(policies);
         HashSet<PolicyLocator> plset = new HashSet<PolicyLocator>();
         plset.add(jpl);
         plset.add(jpsl);
        
         pdp = new JBossPDP();
         pdp.setPolicies(policies);
         pdp.setLocators(plset);
      }
      return pdp;
   }
View Full Code Here

   {
      if (PolicyRegistration.XACML.equalsIgnoreCase(type))
      {
         try
         {
            JBossPDP pdp = new JBossPDP(stream);
            this.contextIDToJBossPDP.put(contextId, pdp);
         }
         catch (Exception e)
         {
            throw new RuntimeException(e);
View Full Code Here

   {
      ClassLoader tcl = SecurityActions.getContextClassLoader();
      InputStream is = tcl.getResourceAsStream(this.policyConfigFileName);
      if(is == null)
         throw new IllegalStateException(policyConfigFileName  + " could not be located");
      return new JBossPDP(is);
   }
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

   public void testPDPForHimss09()
   {
      ClassLoader tcl = Thread.currentThread().getContextClassLoader();
      URL configFile = tcl.getResource("test/config/himss09-interop-config.xml");
      assertNotNull("configFile != null", configFile);
      PolicyDecisionPoint pdp = new JBossPDP(configFile);
      assertNotNull(pdp);
   }
View Full Code Here

   public void testPDPConfig() throws Exception
   {
      ClassLoader tcl = Thread.currentThread().getContextClassLoader();
      URL configFile = tcl.getResource("test/config/interopPolicySetConfig.xml");
      assertNotNull("configFile != null", configFile);
      PolicyDecisionPoint pdp = new JBossPDP(configFile);
      XACMLTestUtil.validateInteropCases(pdp);
   }
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.