Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#2 Support structured values in XPath

open
nobody
None
5
2007-02-08
2007-02-08
No

Hi,

The following change allows policy authors to use structured values (cf. XACML Spec section 8.2 cited below) with the default Selector module. The SelctorModule.java needs to be patched as described below.

This would allow the /some-path/node() XPath expressions to be used. (The behaviour of /some-path/@attribute and /some-path/text() is not changed.)

The change does not rely on the other patch I proposed (http://sourceforge.net/tracker/index.php?func=detail&aid=1620205&group_id=73884&atid=539257)

8.2. Structured attributes
<xacml:AttributeValue> and <xacml-context:AttributeValue> elements MAY contain an instance of a structured XML data-type. Section 7.2.1 describes a number of standard techniques to identify data items within such a structured attribute. Listed here are some additional techniques that require XACML extensions.

The change is:
Starting line 221 something replace:
--8<--
text = node.getNodeValue();
} else {
// the data is in a child node
text = node.getFirstChild().getNodeValue();
}

list.add(attrFactory.createValue(type, text));
-->8--

With:
--8<--
text = node.getNodeValue();
list.add(attrFactory.createValue(type, text));
} else {
list.add(attrFactory.createValue(node, type));
}
-->8--

Discussion