DataPower

DataPower

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.

 View Only
  • 1.  How to verify X-signature value.

    Posted Mon September 16, 2024 04:13 PM

    Hi,

    Can you please guide me to find a solution to verify x-signature in DataPower.

    Client is sending signature value in x-signature header. Client is sharing secret with DataPower and signature algorithm is SHA256.

    Can i use dp:verify-hmac function?  what are values in need to give for outputLength, verifedRoot ?

    dp:verify-hmac(signAlgorithm, outputLength, verifedRoot, digestValue, sharedSecretKey, includeComments, c14nAlgorithm, prefixes).

    Can you please share if you have any example code?

    Thanks,

    Srikanth.



    ------------------------------
    srikanth talluri
    ------------------------------


  • 2.  RE: How to verify X-signature value.

    Posted Tue September 17, 2024 05:37 PM

    Hi,

    x-signature header is typically used for HMAC on raw strings, rather than XML fragments.
    So best to use either the dp:hmac() function or gatewayscript crypto module (APIs to create cryptographic HMAC content)

    cheers,



    ------------------------------
    Jeroen Willems
    Integration Architect - Managing Partner
    Integration Designers
    ------------------------------



  • 3.  RE: How to verify X-signature value.

    Posted Fri September 20, 2024 11:28 AM

    Hi Jeroen,

    Thanks for your reply. Can i use pd:hmac() to verify x-signature string ?

    My requirement is.... client sending x-signature value in the request header, DataPower have verify that x-signature value.

    Can please suggest.

    Thanks.

    Srikanth.

     



    ------------------------------
    srikanth talluri
    ------------------------------



  • 4.  RE: How to verify X-signature value.

    Posted Mon September 23, 2024 06:11 PM

    Which part is not clear?

    Just compare your calculated hashed value with the x-signature value.



    ------------------------------
    Jeroen Willems
    Integration Architect - Managing Partner
    Integration Designers
    ------------------------------