IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  Reference URI is empty upon the pub.security.xml:signXML

    Posted 11/07/22 06:15 AM

    Currently using the IS 10.3 version

    Problem Description:
    1. I have an XML Payload to sign it using the certificate.
    2. Currently using the service pub.security.xml:signXML to sign the XML.
    3. The payload that i need to sign is located with the below tag

      <vog.li:SignedInfo Id="li-21a152XXXXXXXXXXXXXXXXXXXXXXXXX">
    <vog.li:Data DataEncodingType="base64" MimeType="text/xml"> **Data to Sign** </vog.li:Data>
    
    4. After i sign my payload i don't get to see the below tag which is Reference URI
    /SignedRoot/Signature/SignedInfo/Reference (URI value)
    its empty technically <Reference URI="">
    

    Source Xpath : /SignedRoot/Signature/SignedInfo/Reference (URI value)
    Target X path : /Signature/SignedInfo/Reference (URI value)

    What am i missing / How do it bring the URI value with my Sign Info ID?


    #Service-Designer
    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: Reference URI is empty upon the pub.security.xml:signXML

    Posted 11/10/22 04:00 AM

    Hi @srinivasan.ravikumar2 ,
    pub.security.xml:signXML has the optional inputs nodeSelectors which lets you specify the XPath notation that identifies the nodes to be signed,
    The generated signature can be placed in a specific position using the input signatureNodeSelector. Please check if using these inputs works for you.
    The full documentation for this built-in service is at pub.security.xml:signXML built in services reference
    -NP


    #Service-Designer
    #Integration-Server-and-ESB
    #webMethods


  • 3.  RE: Reference URI is empty upon the pub.security.xml:signXML

    Posted 11/11/22 12:08 PM

    Hi NP, I have explored the same. I am able to sign the object by using the Node selector by what i am missing is the below reference ID Reference URI=“” tag.

    Current Output

    <SignedInfo>
    <CanonicalizationMethod Algorithm="xxxxxxxx"/>
    <SignatureMethod Algorithm="Xxxxxxxx"/>
    *[u]<Reference URI="">[/u]*
    <Transforms>
    <Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
    <Transforms>
    <Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
    <Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">
    <XPath xmlns:vog.li="XXXXX">/vog.li:SignedRoot/gov.il:SignedObject/vog.li:SignedInfo/@Id</XPath>
    </Transform>
    </Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
    <DigestValue>xxxxxxxxxxxxxxxx</DigestValue>
    </Reference>
    </SignedInfo>
    

    Expected Output

    <SignedInfo>
    <CanonicalizationMethod Algorithm="xxxxxxxx"/>
    <SignatureMethod Algorithm="Xxxxxxxx"/>
    *[u]<Reference URI="#il-21a15287-b764-4fca-bad5-49dc56265d78">[/u]*
    <Transforms>
    <Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
    <Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">
    <XPath xmlns:vog.li="xxxxxxx">/</XPath>
    </Transform>
    </Transforms>
    <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
    <DigestValue>xxxxxxxxxxxxxxxx</DigestValue>
    </Reference>
    </SignedInfo>
    
    

    #Service-Designer
    #webMethods
    #Integration-Server-and-ESB


  • 4.  RE: Reference URI is empty upon the pub.security.xml:signXML

    Posted 11/24/22 04:14 AM

    Hi Srinivasan,
    Here is the solution for it. To get the URI, schema location should be provided having Id attribute in it.
    • Create an XSD for the input XML and provide Id attribute as Type ID.
    • Set input schemaLocation to NameSpace URI and schema location as key value pair
    • Provide uri value as #IdValue to appear in reference URI output (this should be with respect to node selector)
    • Select the Node to encrypt. uri value should match this node Id attribute value
    • Above is valid for isEveloping=true. Else you need to pass this value idXmlObject variable

    Thank you.


    #webMethods
    #Service-Designer
    #Integration-Server-and-ESB