Examples of AbstractPolicy


Examples of org.jboss.security.xacml.sunxacml.AbstractPolicy

        boolean atLeastOnePermit = false;
        Set permitObligations = new HashSet();
        Iterator it = policyElements.iterator();

        while (it.hasNext()) {
            AbstractPolicy policy =
                ((PolicyCombinerElement)(it.next())).getPolicy();

            // make sure that the policy matches the context
            MatchResult match = policy.match(context);

            if (match.getResult() == MatchResult.INDETERMINATE)
                return new Result(Result.DECISION_DENY,
                                  context.getResourceId().encode());

            if (match.getResult() == MatchResult.MATCH) {
                // evaluate the policy
                Result result = policy.evaluate(context);
                int effect = result.getDecision();
               
                // unlike in the RuleCombining version of this alg, we always
                // return DENY if any Policy returns DENY or INDETERMINATE
                if ((effect == Result.DECISION_DENY) ||
View Full Code Here

Examples of org.jboss.security.xacml.sunxacml.AbstractPolicy

     * @return the result of running the combining algorithm
     */
    public Result combine(EvaluationCtx context, List parameters,
                          List policyElements) {
        boolean atLeastOne = false;
        AbstractPolicy selectedPolicy = null;
        Iterator it = policyElements.iterator();

        while (it.hasNext()) {
            AbstractPolicy policy =
                ((PolicyCombinerElement)(it.next())).getPolicy();

            // see if the policy matches the context
            MatchResult match = policy.match(context);
            int result = match.getResult();

            // if there is an error in trying to match any of the targets,
            // we always return INDETERMINATE immediately
            if (result == MatchResult.INDETERMINATE)
View Full Code Here

Examples of org.jboss.security.xacml.sunxacml.AbstractPolicy

    public Result combine(EvaluationCtx context, List parameters,
                          List policyElements) {
        Iterator it = policyElements.iterator();
       
        while (it.hasNext()) {
            AbstractPolicy policy =
                ((PolicyCombinerElement)(it.next())).getPolicy();

            // make sure that the policy matches the context
            MatchResult match = policy.match(context);

            if (match.getResult() == MatchResult.INDETERMINATE)
                return new Result(Result.DECISION_INDETERMINATE,
                                  match.getStatus(),
                                  context.getResourceId().encode());

            if (match.getResult() == MatchResult.MATCH) {
                // evaluate the policy
                Result result = policy.evaluate(context);
                int effect = result.getDecision();
               
                // in the case of PERMIT, DENY, or INDETERMINATE, we always
                // just return that result, so only on a rule that doesn't
                // apply do we keep going...
View Full Code Here

Examples of org.jboss.security.xacml.sunxacml.AbstractPolicy

        Set denyObligations = new HashSet();
        Status firstIndeterminateStatus = null;
        Iterator it = policyElements.iterator();

        while (it.hasNext()) {
            AbstractPolicy policy =
                ((PolicyCombinerElement)(it.next())).getPolicy();

            // make sure that the policy matches the context
            MatchResult match = policy.match(context);

            if (match.getResult() == MatchResult.INDETERMINATE) {
                atLeastOneError = true;
               
                // keep track of the first error, regardless of cause
                if (firstIndeterminateStatus == null)
                    firstIndeterminateStatus = match.getStatus();
            } else if (match.getResult() == MatchResult.MATCH) {
                // now we evaluate the policy
                Result result = policy.evaluate(context);
                int effect = result.getDecision();
               
                // this is a little different from DenyOverrides...

                if (effect == Result.DECISION_PERMIT)
View Full Code Here

Examples of org.jboss.security.xacml.sunxacml.AbstractPolicy

      Iterator it = policyList.iterator();
      while (it.hasNext())
      {
         String str = (String) (it.next());
         AbstractPolicy policy = null;

         try
         {
            try
            {
View Full Code Here

Examples of org.jboss.security.xacml.sunxacml.AbstractPolicy

    */
   public PolicyFinderResult findPolicy(EvaluationCtx context)
   {
      try
      {
         AbstractPolicy policy = policies.getPolicy(context);

         if (policy == null)
            return new PolicyFinderResult();
         else
            return new PolicyFinderResult(policy);
View Full Code Here

Examples of org.jboss.security.xacml.sunxacml.AbstractPolicy

    */
   public PolicyFinderResult findPolicy(EvaluationCtx context)
   {
      try
      {
         AbstractPolicy policy = ctxPolicies.getPolicy(context);

         if (policy == null)
            return new PolicyFinderResult();
         else
            return new PolicyFinderResult(policy);
View Full Code Here

Examples of org.jboss.security.xacml.sunxacml.AbstractPolicy

    * @return the result of looking for a matching policy
    */
   public PolicyFinderResult findPolicy(URI idReference, int type, VersionConstraints constraints,
         PolicyMetaData parentMetaData)
   {
      AbstractPolicy policy = refPolicies.getPolicy(idReference.toString(), type, constraints);

      if (policy == null)
         return new PolicyFinderResult();
      else
         return new PolicyFinderResult(policy);
View Full Code Here

Examples of org.jboss.security.xacml.sunxacml.AbstractPolicy

      Iterator it = policies.values().iterator();

      while (it.hasNext())
      {
         // for each identifier, get only the most recent policy
         AbstractPolicy policy = (AbstractPolicy) (((TreeSet) (it.next())).first());

         // see if we match
         MatchResult match = policy.match(context);
         int result = match.getResult();

         // if there was an error, we stop right away
         if (result == MatchResult.INDETERMINATE)
            throw new TopLevelPolicyException(match.getStatus());
View Full Code Here

Examples of org.jboss.security.xacml.sunxacml.AbstractPolicy

      // walk through the set starting with the most recent version, looking
      // for a match until we exhaust all known versions
      Iterator it = set.iterator();
      while (it.hasNext())
      {
         AbstractPolicy policy = (AbstractPolicy) (it.next());
         if (constraints.meetsConstraint(policy.getVersion()))
         {
            // we found a valid version, so see if it's the right kind,
            // and if it is then we return it
            if (type == PolicyReference.POLICY_REFERENCE)
            {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.