Continuation Q&A: Policy Evaluation and Rule Binding #2359
-
As a continuation of the Q&A Session from today i would like to describe my problem. @paullatzelsperger 1. I have defined the following Asset in my provider connector with a typo in the policy constraint:
2. I have binded the ruleType and key to the Scope '*' without the typo from above:
When i try to negotiate the asset it's resulting in a confirmed state. There is no binding to the leftExpression of the policy and the PolicyEngine will filter this policy. So the Policy can not be satisfied. Why is it then only filtered but not "automatically" rejected? The claims i have used:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
The problem is that (due to the typo), the constraint type is different from the binding, which means, you are binding to a non-existent constraint, thus I'm pretty sure your evaluation function ( You are effectively attempting to evaluate a policy with no function to evaluate it, which of course returns Making sure that a policy is formulated correctly, and that it gets properly evaluated etc. should be handled through testing. |
Beta Was this translation helpful? Give feedback.
The problem is that (due to the typo), the constraint type is different from the binding, which means, you are binding to a non-existent constraint, thus I'm pretty sure your evaluation function (
PolicyVCAuthorizationFunction
) won't get executed.You are effectively attempting to evaluate a policy with no function to evaluate it, which of course returns
true
. That is by design, because not every rule of every policy is relevant in every context (otherwise every policy would always have to be evaluated by every function).Making sure that a policy is formulated correctly, and that it gets properly evaluated etc. should be handled through testing.