Ws-security Digest password

0
Hi Community, For a intergration I need to place a digest password in the header of a soap call. Is there way within Mendix to digest the password according to the ws-secrutiy policy? Below is a example header created with SOAP UI: <soapenv:Envelope xmlns:dat="http://economie.fgov.be/kbopub/webservices/v1/datamodel" xmlns:mes="http://economie.fgov.be/kbopub/webservices/v1/messages" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header> <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><wsse:UsernameToken wsu:Id="UsernameToken-47440A51ED87A37B85162210794499324"> <wsse:Username>USERNAME</wsse:Username> <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">Hd+fYULFQBq5D+fRR7LRRhw0Dz4=</wsse:Password> <wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">lzi67kqEV0h2WYsngJhQNA==</wsse:Nonce> <wsu:Created>2021-05-27T09:32:24.992Z</wsu:Created> </wsse:UsernameToken> <wsu:Timestamp wsu:Id="TS-47440A51ED87A37B85162210794499223"> <wsu:Created>2021-05-27T09:32:24.992Z</wsu:Created> <wsu:Expires>2021-05-27T09:37:24.992Z</wsu:Expires> </wsu:Timestamp </wsse:Security> </soapenv:Header>   EDIT: I found out that the forumla for digesting a password in this case should be: Password_Digest = Base64 ( SHA-1 ( nonce + created + password ) )   What is a good way to create the digest password or the recreate the forumala in Mendix?
asked
2 answers
0

Did you try to use custom headers? See documentation here: https://docs.mendix.com/refguide/call-web-service-action

It is in section 5.

Regards,

Ronald

 

answered
0

We solved the problem by building a Java action that creates the password digest with the input nonce, created date and the password.

answered