Esempio n. 1
0
 public StdEngine() throws PAPException, IOException {
   //
   // Get the location in the file system of our repository
   //
   this.repository = Paths.get(XACMLProperties.getProperty(PROP_PAP_REPO));
   //
   // Initialize
   //
   this.intialize();
 }
Esempio n. 2
0
 /**
  * Reset's the XACMLProperties internal properties object so we start in a fresh environment. Then
  * adds back in our Servlet init properties that were passed in the javax Servlet init() call.
  * This function is primarily used when a new configuration is passed in and the PDP servlet needs
  * to load a new PDP engine instance.
  *
  * @param pipProperties - PIP configuration properties
  * @param policyProperties - Policy configuration properties
  */
 public static void loadXacmlProperties(Properties policyProperties, Properties pipProperties) {
   try {
     //
     // Start fresh
     //
     XACMLProperties.reloadProperties();
     //
     // Now load our init properties
     //
     XACMLProperties.getProperties().putAll(XACMLRest.restProperties);
     //
     // Load our policy properties
     //
     if (policyProperties != null) {
       XACMLProperties.getProperties().putAll(policyProperties);
     }
     //
     // Load our pip config properties
     //
     if (pipProperties != null) {
       XACMLProperties.getProperties().putAll(pipProperties);
     }
   } catch (IOException e) {
     logger.error("Failed to put init properties into Xacml properties", e);
   }
   //
   // Dump them
   //
   if (logger.isDebugEnabled()) {
     try {
       logger.debug(XACMLProperties.getProperties().toString());
     } catch (IOException e) {
       logger.error("Cannot dump properties", e);
     }
   }
 }