Commit 7e53a04b authored by cdanger's avatar cdanger

Fixes #28. Fixes also XACML Result status code marshalling error for Missing...

Fixes #28. Fixes also XACML Result status code marshalling error for Missing attribute error which is not a valid anyURI value for status code as expected by XACML schema
parent cbb35a09
......@@ -195,7 +195,7 @@ public class AttributeDesignator<AV extends AttributeValue> extends AttributeDes
// error messages/exceptions
this.missingAttributeMessage = this + " not found in context";
this.missingAttributeForUnknownReasonException = new IndeterminateEvaluationException(StatusHelper.STATUS_MISSING_ATTRIBUTE, missingAttributeMessage + " for unknown reason");
this.missingAttributeForUnknownReasonException = new IndeterminateEvaluationException(missingAttributeMessage + " for unknown reason", StatusHelper.STATUS_MISSING_ATTRIBUTE);
this.missingAttributeBecauseNullContextException = new IndeterminateEvaluationException("Missing Attributes/Attribute for evaluation of AttributeDesignator '" + this.attrGUID
+ "' because request context undefined", StatusHelper.STATUS_MISSING_ATTRIBUTE);
}
......@@ -221,7 +221,7 @@ public class AttributeDesignator<AV extends AttributeValue> extends AttributeDes
if (mustBePresent && bag.isEmpty())
{
throw new IndeterminateEvaluationException(StatusHelper.STATUS_MISSING_ATTRIBUTE, missingAttributeMessage, bag.getReasonWhyEmpty());
throw new IndeterminateEvaluationException(missingAttributeMessage, StatusHelper.STATUS_MISSING_ATTRIBUTE, bag.getReasonWhyEmpty());
}
// if we got here the bag wasn't empty, or mustBePresent was false,
......
......@@ -323,7 +323,7 @@ public class AttributeSelectorExpression<AV extends AttributeValue> extends Attr
+ "' because request context undefined", StatusHelper.STATUS_MISSING_ATTRIBUTE);
this.missingAttributesContentException = new IndeterminateEvaluationException(this + ": No <Content> element found in Attributes of Category=" + category, StatusHelper.STATUS_SYNTAX_ERROR);
this.missingAttributeMessage = this + " not found in context";
this.missingAttributeForUnknownReasonException = new IndeterminateEvaluationException(StatusHelper.STATUS_MISSING_ATTRIBUTE, missingAttributeMessage + " for unknown reason");
this.missingAttributeForUnknownReasonException = new IndeterminateEvaluationException(missingAttributeMessage + " for unknown reason", StatusHelper.STATUS_MISSING_ATTRIBUTE);
}
/**
......@@ -341,7 +341,7 @@ public class AttributeSelectorExpression<AV extends AttributeValue> extends Attr
{
if (mustBePresent && result.isEmpty())
{
throw new IndeterminateEvaluationException(StatusHelper.STATUS_MISSING_ATTRIBUTE, missingAttributeMessage, result.getReasonWhyEmpty());
throw new IndeterminateEvaluationException(missingAttributeMessage, StatusHelper.STATUS_MISSING_ATTRIBUTE, result.getReasonWhyEmpty());
}
}
......
......@@ -1087,7 +1087,7 @@ public final class PolicyEvaluators
return referredPolicy.isApplicable(context);
} catch (IndeterminateEvaluationException e)
{
throw new IndeterminateEvaluationException("Error checking whether Policy(Set) referenced by " + this, e.getStatusCode() + " is applicable to the request context", e);
throw new IndeterminateEvaluationException("Error checking whether Policy(Set) referenced by " + this + " is applicable to the request context", e.getStatusCode(), e);
}
}
......
......@@ -18,7 +18,7 @@
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">deploy</AttributeValue>
</Attribute>
</Attributes>
<Attributes Category=" urn:oasis:names:tc:xacml:3.0:attribute-category:environment">
<Attributes Category="urn:oasis:names:tc:xacml:3.0:attribute-category:environment">
<Attribute AttributeId="AuthType" IncludeInResult="false">
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">basic</AttributeValue>
</Attribute>
......@@ -26,4 +26,4 @@
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">10.63.17.24</AttributeValue>
</Attribute>
</Attributes>
</Request>
\ No newline at end of file
</Request>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment