yaronn / ws.js

A WS-* client stack for node.js. Written in pure javascript!
http://webservices20.blogspot.com/
104 stars 64 forks source link

Inclusive Namespaces #28

Closed carbonrobot closed 8 years ago

carbonrobot commented 8 years ago

How does one add the inclusive namespaces section and the prefixlist attributes?

<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#" 
                Id="SIG-ACE3250C56A1E1C5F814550530836136">
    <ds:SignedInfo>
        <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
            <ec:InclusiveNamespaces xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="soap"/>
        </ds:CanonicalizationMethod>
        <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"/>
        <ds:Reference URI="#TS-ACE3250C56A1E1C5F814550530835841">
            <ds:Transforms>
                <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
                    <ec:InclusiveNamespaces xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="wsse soap"/>
                </ds:Transform>
            </ds:Transforms>
            <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
            <ds:DigestValue>LMDK+BmQdiL+vvddQyUxCJ5RF5U=</ds:DigestValue>
        </ds:Reference>
        <ds:Reference URI="#id-ACE3250C56A1E1C5F814550530836095">
            <ds:Transforms>
                <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
                    <ec:InclusiveNamespaces xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList=""/>
                </ds:Transform>
            </ds:Transforms>
            <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
            <ds:DigestValue>xytkCogAlCK+FF1BMF1oBZel4Y8=</ds:DigestValue>
        </ds:Reference>
    </ds:SignedInfo>
    <ds:SignatureValue>Fg5fjkYdnr4mkzC3H6nK/hNzbtBHQihtvOk6ByqSi8832wK8Zk2mQg==</ds:SignatureValue>
    <ds:KeyInfo Id="KI-ACE3250C56A1E1C5F814550530836013">
        <wsse:SecurityTokenReference wsu:Id="STR-ACE3250C56A1E1C5F814550530836024">
            <wsse:Reference URI="#X509-ACE3250C56A1E1C5F814550530835962" 
                    ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"/>
        </wsse:SecurityTokenReference>
    </ds:KeyInfo>
</ds:Signature>
<wsu:Timestamp wsu:Id="TS-ACE3250C56A1E1C5F814550530835841">
    <wsu:Created>2016-02-09T21:24:43.583Z</wsu:Created>
    <wsu:Expires>2016-02-09T21:29:43.583Z</wsu:Expires>
</wsu:Timestamp>
yaronn commented 8 years ago

right now it is not supported. from my experience this is very rarely an interoperability obstacle as servers would be ok with getting the message without this. So any errors you may get might originate from other reasons. There was some discussion in the xml-crypto library about adding this.

carbonrobot commented 8 years ago

Fair enough, thanks for the info.

Further discussion at https://github.com/yaronn/xml-crypto/issues/60