-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change Target type to an Expression #2
Comments
The Expression element needs to be optional. We can make a backward compatible extension to TargetType, taking advantage of the fact that a Target can be empty.
In usage we can apply the derived type with the xsi:type attribute:
And we can define an element substitution group around Target:
In usage it would look like this:
If an ExpressionTarget has AnyOf elements and an Expression we just say they are all ANDed together. Multiple AnyOf elements are already ANDed together. |
My bad, I forgot the
OK. Would you apply these changes to the existing XACML schema? or add a separate XSD file with these new types/elements (but same target namespace)? Could you show what the new XSD looks like in the end? |
There is probably an expectation that an XSD file won't be amended, but XML Schema lets a namespace be defined across multiple files, so we should do that. The extra file would look like this:
|
OK sounds good. In this case, what is the proper standardisation practice (OASIS): should we update the XACML core specification document for that? or just do a new XACML Profile document (with this new XSD file attached)? |
Either is proper. If it is just this change then it is much easier to do a profile. However, we have a list of enhancements under consideration and some of them touch many parts of the core spec, so rewriting the core spec becomes more practical, either as 3.1 or 4.0. Most likely we would keep the same namespace for 3.1 and add to it with separate XSD files, or for 4.0 we would create a combined XSD file with a new namespace. |
Curious as to what the intended (system) context is for these variables? Policy? The reason I ask is for the use case of something being a PDP (or PEP?) wide variable vs. something that the author may wish to be limited to a finer (or wider) context. |
Assuming this is not a question meant for issue #3, the variable references here are just examples of an expression. A VariableReference is the most compact complete example of an expression element. Anything else would have required start and end tags and text content. |
Ah, I see this is being discussed in several subsequent issues. Sorry. I am just catching up now. |
If we change Target to be just like Condition for XACML 4.0 then we don't need to do anything to TargetType. We can just swap the Target element for a Condition element, i.e., Policy and PolicySet (or RuleSet #11) have a Condition instead of a Target. RuleType doesn't need both a Target and a Condition (but see only-one-applicable, Issue#11) so we just drop the Target from RuleType. We can then drop Target and TargetType completely. |
Agreed. No further comment on my part. |
I'd like to apply this revision to the XACML 4.0 core spec and close the issue. I think we are agreed that a target will be the same as a condition: a single child element from the expression substitution group. The
I'm inclined to choose (1) or (2) over (3) or (4). Rules have both a target and a condition that are ANDed together. The only reason for having a target is if we keep the only-one-applicable combining algorithm. It was defined only as a policy combining algorithm but with the distinction between policy and rule combining algorithms disappearing we need to either extend it to apply to rules (which argues for rules having a target, though not absolutely necessary) or we throw it out (so rules don't need a target). The only-one-applicable algorithm is an oddball that requires special processing and I would vote to throw it out and take targets out of rules. I can see a less convenient way of simulating only-one-applicable using first-applicable and variables if anyone really objects. |
Fully agree, but you already know that 😉 .
I'm inclined to choose either (2) or (3). Why (3) ? Well, in your previous comment, I thought you were proposing to drop Target completely, so I was getting ready for that choice already 😉 (it simplifies not only the XSD for also the spec itself as several paragraphs would be obsolete and disappear). I am not too worried about losing the (2)'s benefits. (Regarding the first one, there are two different sections Policy evaluation and Rule evaluation and in each one we can describe what to do with the Condition result accordingly, as was done with Target in XACML 3.0. That's enough for me.)
Do you remember what was the original use case for only-one-applicable ? As far as I am concerned, I am OK to extend it to rules. We just have clarify somewhere that a rule is now said applicable if (and only if) its Condition evaluates to true. In other words, isApplicable(ruleX) = evaluate (ruleX's Condition). Similarly, the definition of
Could you give a small example to get an idea ? |
I think this extends beyond just the description in the spec. People generally think of protecting something under specific circumstances. Removing Target could make the general description of what a policy is supposed to do in Business Speak more difficult. While the mechanics are programmatically similar, the semantics of what a Target is and what a Condition is different at the abstract level IMO. |
OK I'm fine with choice (2) then. |
I don't have a real-world example, but the structure would be like this, assuming XACML 4.0:
I notice that the descriptions of the logical functions don't account for Indeterminate arguments properly. |
Its original URI harks back to XACML 1.0 which is well before my involvement in the TC. |
Already done in XACML 4.0. The first-applicable algorithm (and every other combining algorithm except only-one-applicable) completely evaluates a child policy or rule before combining the result. This is equivalent to the algorithm as described in XACML 3.0, which didn't need to mention targets since 7.11 and 7.12 accounted for them. The only-one-applicable rule is the odd one out because the target needs to be evaluated separately. |
To be honest I don't recall what the use case was for |
OK so... Based on latest comments and @steven-legg 's workaround using |
I will make changes to the core draft according to option 2, drop |
The proposed changes have been made to the core draft and the copy in the wiki has been updated. |
xacml-v4.0-csd01-diff.txt |
For the sake of simplification, it seems to me the Policy evaluation sections 7.12 and 7.14 can be simplified, even merged together. In 7.12, the "Child policy and Rule value" is always ignored / has no effect in the table, only the Combining algorithm value. So I suggest to merge both tables into one:
Or, if we merge the Indeterminate rows (github markdown does not support this :-( , so it must be converted to HTML syntax), this gives:
|
That
|
Good catch. It seems to me this Match + Indeterminate case was not clearly addressed in section 7.12. It just says: the Policy value is Specified by the combining algorithm if the Target is Match. Anyway, this new table is indeed better as it removes all ambiguity. So we can use it as the new table in the section 7.12, and remove the section 7.14 which is now useless. |
I committed a change to combine table 5 and table 6 and removed section 7.14. |
Anything else to do on this? |
To summarize, the core draft has been changed according to option 2: the |
Add possibility to use any Expression in a Target element (like Condition):
First option - not backward-compatible:
Change the TargetType in the XACML core schema (new major release):
Second option - backward-compatible:
Extend TargetType:
More info in @steven-legg 's comment.
See also the issue #1.
The text was updated successfully, but these errors were encountered: