Package com.sun.xacml.finder

Examples of com.sun.xacml.finder.PolicyFinder


            DataDirPolicyFinderModlule policyModule = new DataDirPolicyFinderModlule();
            if (repositoryBaseDir != null)
                policyModule.setBaseDir(repositoryBaseDir);

            PolicyFinder policyFinder = new PolicyFinder();
            Set<PolicyFinderModule> policyModules = new HashSet<PolicyFinderModule>();
            policyModules.add(policyModule);
            policyFinder.setModules(policyModules);

            // for current time, current date ....
            CurrentEnvModule envModule = new CurrentEnvModule();

            // xpath support
View Full Code Here


        EntitlementPolicyCacheEntry cacheEntry = (EntitlementPolicyCacheEntry)
                                                entitlementPolicyCache.getValueFromCache(cacheKey);
        if(cacheEntry != null){
            if(cacheEntry.getEntitlementPolicyCacheEntry() != hashOfPolicyCollection ){
                init(new PolicyFinder());
            }
        } else {
            cacheEntry =  new EntitlementPolicyCacheEntry(hashOfPolicyCollection);
            entitlementPolicyCache.addToCache(cacheKey, cacheEntry);
        }
View Full Code Here

        try {
            EntitlementPolicyCacheEntry cacheEntry = (EntitlementPolicyCacheEntry)
                                                    entitlementPolicyCache.getValueFromCache(cacheKey);
            if(cacheEntry != null){
                if(cacheEntry.getEntitlementPolicyCacheEntry() != hashOfPolicyCollection){
                    init(new PolicyFinder());
                }
            } else {
                cacheEntry =  new EntitlementPolicyCacheEntry(hashOfPolicyCollection);
                entitlementPolicyCache.addToCache(cacheKey, cacheEntry);
            }
View Full Code Here

        return entitlementEngines.get(Integer.toString(tenantId));
    }

    private EntitlementEngine(Registry registry, int tenantId) throws IdentityException {

        PolicyFinder policyFinder = null;
        Set<PolicyFinderModule> policyModules = null;
        // Setup the PolicyFinder that the EntitlementEngine will use
        policyFinder = new PolicyFinder();

        registryModule = new RegistryBasedPolicyFinder(new PolicyStoreReader(new PolicyStore(
                registry)), tenantId);

        policyModules = new HashSet<PolicyFinderModule>();
        // Add all policy finders - we only have RegistryBasedPolicyFinder
        policyModules.add(registryModule);

        policyFinder.setModules(policyModules);

        // init policy reader 
        PolicyReader.getInstance(null, policyFinder);

        // Now setup attribute finder modules for the current date/time and
View Full Code Here

      attributeModules.add(new CurrentEnvModule());
      attributeModules.add(new SelectorModule());
      attributeFinder.setModules(attributeModules);
     
      //List policyFileList = Arrays.asList(policyFiles);
      PolicyFinder policyFinder = new PolicyFinder();
      HashSet policyModules = new HashSet();
      policyModules.add(new EnclosingPolicyFinderModule(policy));
      /*policyModules.add(new JBossStaticPolicyFinderModule(PermitOverridesPolicyAlg.algId,
            policyFileList));*/
      //policyModules.add(new StaticRefPolicyFinderModule(policyFileList));
      policyModules.add(new URLPolicyFinderModule());
      policyFinder.setModules(policyModules);
     
      PDP pdp = new PDP(new PDPConfig(attributeFinder,
            policyFinder, null));
      return pdp.evaluate(request);
   }
View Full Code Here

  */
  private PolicyFinder createPolicyFinder()
  {
    final ExistPolicyModule policyModule = new ExistPolicyModule(this);

    final PolicyFinder policyFinder = new PolicyFinder();
    policyFinder.setModules(Collections.singleton(policyModule));
    return policyFinder;
  }
View Full Code Here

    public PDPConfig getPDPConfig(List<AttributeFinderModule> attributeFinders,
                                  Set<PolicyFinderModule> policyFinders,
                                  List<ResourceFinderModule> resourceFinders) {
        AttributeFinder attr = new AttributeFinder();
        attr.setModules(attributeFinders);
        PolicyFinder policy = new PolicyFinder();
        policy.setModules(policyFinders);
        ResourceFinder rsrc = new ResourceFinder();
        rsrc.setModules(resourceFinders);
        return new PDPConfig(attr, policy, rsrc);
    }
View Full Code Here

      attributeModules.add(new CurrentEnvModule());
      attributeModules.add(new SelectorModule());
      attributeFinder.setModules(attributeModules);
     
      //List policyFileList = Arrays.asList(policyFiles);
      PolicyFinder policyFinder = new PolicyFinder();
      HashSet policyModules = new HashSet();
      policyModules.add(new EnclosingPolicyFinderModule(policy));
      /*policyModules.add(new JBossStaticPolicyFinderModule(PermitOverridesPolicyAlg.algId,
            policyFileList));*/
      //policyModules.add(new StaticRefPolicyFinderModule(policyFileList));
      policyModules.add(new URLPolicyFinderModule());
      policyFinder.setModules(policyModules);
     
      PDP pdp = new PDP(new PDPConfig(attributeFinder,
            policyFinder, null));
      return pdp.evaluate(request);
   }
View Full Code Here

/* 139 */     List attributeModules = new ArrayList();
/* 140 */     attributeModules.add(new CurrentEnvModule());
/* 141 */     attributeModules.add(new SelectorModule());
/* 142 */     attributeFinder.setModules(attributeModules);
/*     */
/* 145 */     PolicyFinder policyFinder = new PolicyFinder();
/* 146 */     HashSet policyModules = new HashSet();
/* 147 */     policyModules.add(new EnclosingPolicyFinderModule(policy));
/*     */
/* 151 */     policyModules.add(new URLPolicyFinderModule());
/* 152 */     policyFinder.setModules(policyModules);
/*     */
/* 154 */     PDP pdp = new PDP(new PDPConfig(attributeFinder, policyFinder, null));
/*     */
/* 156 */     return pdp.evaluate(request);
/*     */   }
View Full Code Here

        // also create a module that lets us get at URL-based policies
        URLPolicyFinderModule urlModule = new URLPolicyFinderModule();

        // next, setup the PolicyFinder that this PDP will use
        PolicyFinder policyFinder = new PolicyFinder();
        Set<PolicyFinderModule> policyModules = new HashSet<PolicyFinderModule>();
        policyModules.add(staticModule);
        policyModules.add(staticRefModule);
        policyModules.add(urlModule);
        policyFinder.setModules(policyModules);

        // now setup attribute finder modules for the current date/time and
        // AttributeSelectors (selectors are optional, but this project does
        // support a basic implementation)
        CurrentEnvModule envAttributeModule = new CurrentEnvModule();
View Full Code Here

TOP

Related Classes of com.sun.xacml.finder.PolicyFinder

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.