How can we improve Azure API Management?

Enable WS-Security for SOAP backends

In a REST to SOAP scenario where the backend demands the SOAP message to be signed using a certificate, it would be great if there were policies that could generate the whole message based on the contents of the body. Right now one can build the SOAP XML message using a liquid template but then the task of generating the security headers is hard (and I really don't know how to generate them). For example:

<soapenv:Envelope xmlns:soapenv="; xmlns:web="">
<soapenv:Header><wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="; xmlns:wsu="">
......<wsse:BinarySecurityToken EncodingType="; ValueType="; wsu:Id="X509-123456">generated_token</wsse:BinarySecurityToken>
<ds:Signature Id="SIG-65D54B60823432DD6615040826919135" xmlns:ds="">
<ds:SignedInfo><ds:CanonicalizationMethod Algorithm=""><ec:InclusiveNamespaces PrefixList="soapenv web" xmlns:ec=""/></ds:CanonicalizationMethod>
<ds:SignatureMethod Algorithm=""/>
<ds:Reference URI="#id-12345">
<ds:Transforms><ds:Transform Algorithm=""><ec:InclusiveNamespaces PrefixList="web" xmlns:ec=""/></ds:Transform></ds:Transforms>
<ds:DigestMethod Algorithm=""/><ds:DigestValue>digest_value</ds:DigestValue>
<ds:KeyInfo Id="KI-123456"><wsse:SecurityTokenReference wsu:Id="STR-65D54B60823432DD6615040826918923"><wsse:Reference URI="#X509-123456" ValueType=""/></wsse:SecurityTokenReference></ds:KeyInfo>
<soapenv:Body wsu:Id="id-12345" xmlns:wsu="">

The certificate should be one of the available in my APIM instance.


51 votes
Sign in
Sign in with: Microsoft
Signed in as (Sign out)
You have left! (?) (thinking…)
Carlos shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →


Sign in
Sign in with: Microsoft
Signed in as (Sign out)
  • Anonymous commented  ·   ·  Flag as inappropriate

    Several enterprise level SOAP backends use WS-Security with certificate signatures. We are not always able to change those, and such this would be needed if we want to consume those services in API management.

    Currently, the best option seems to be a passthrough, but that again limits us to use the full .NET Framework as .Net Core doesn't support this either.

Feedback and Knowledge Base