Open cbochs opened 2 years ago
After some further digging, it appears that the xmldsig gem searches for either attribute called ID
or a wsu-namespaced attribute called wsu:Id
. The xmldsig gem uses the following URI to declare the wsu
namespace
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
The difference between the use of ID
and wsu:Id
is documented in https://docs.oracle.com/cd/E24191_01/common/tutorials/common_what_must_be_signed.html.
It would be useful - since this is part of the signing process - for xml-kit to provide/expose the wsu
namespace under Xml::Kit::Namespaces
.
Describe the bug
The
xml-kit
gem fails when an XML enveloping signature uses the correct casing for an Object's ID field. When a builder file containsxml.Object ID: "reference" ...
, the signing works as expected. However, if the builder file containsxml.Object Id: "reference
, the following error is reported:According to the XML Digital Signature specification, section 4.6 The Object Element (https://www.w3.org/TR/xmldsig-core/#sec-Object) the casing for an Object'd ID field should be
Id
instead ofID
.To Reproduce Steps to reproduce the behavior:
Envelope
template class and builder below:Envelope class
Example builder
Xmldsig::Reference::ReferencedNodeNotFound
Expected behavior
The reference node should be able to be found using the correct casing for an Object's ID field (
Id
)Screenshots
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context