Closed richman555 closed 6 years ago
I'll only be able to look into implementing this after the Xmas holidays.
However, when you manually add the username token it should be signed, provided you include it in the "Parts to Sign" list.
Below example works for me:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken>
<wsse:Username>${username}</wsse:Username>
</wsse:UsernameToken>
</wsse:Security>
</soap:Header>
<soap:Body>
<yourContentsHere/>
</soap:Body>
</soap:Envelope>
Name | Namespace | Encode |
---|---|---|
Body | http://schemas.xmlsoap.org/soap/envelope/ | |
UsernameToken | http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd |
Thank you for your prompt response!
We will try your suggestion and get back to you as I believe we had tried this solution and it didn't work (could be an error on our part). We will confirm it and respond back.
Have a great holiday!
Thanks tilln, we have been able to get this working by adding UsernameToken and Timestamp in the headers as you suggested. We did use a bean preprocessor in order to set the create and expire times for the timestamp. This workaround works for us for now completely. A Timestamp preprocessor and UsernameToken preprocessor 'No Password' support would be great items for consideration in the future. :)
Thanks for your help!
@richman555 That's good to hear. Check out the 1.5 snapshot release which includes a Timestamp preprocessor.
@tilln Thanks for your help and I will definitely try the Timestamp preprocessor as well that is in the snapshot. I didn't realize this feature was in the pipeline. For now I will close out this issue and if you decide to add No Password feature for a UsernameToken in the future I would be happy to help. Thanks again this plugin is very helpful!
Added to 1.5-SNAPSHOT
@richman555 since you offered to help - this could use some testing...
@tilln Thanks! We will take this snapshot and be testing it today. We will report back with our results. Thanks again for your help!
@tilln Just an update that we have been using the 1.5-SNAPSHOT (using UsernameToken and Timestamp preprocessor) all week without any issues found with our web service calls. Just making you aware that we have been testing with the snapshot. Thanks for your help!
Hi, I have been trying to use jmeter ws-security plugin to digitally sign Body, UsernameToken, and Timestamp of our security headers and our WSS4J SOAP endpoints have UsernameToken securement validation for 'No Password'. This means that the password xml fields cannot be present in the UsernameToken portion of the xml.
For example: -
I have verified that this is supported by Spring 4.x and its WSS4J implementation using the following application context configuration.
In LoadRunner configuration we can achieve it using PasswordOptions as SendNone -
Lastly, I notice that WSS4J's WSCONSTANTS contains UT_NOPASSWORD which I believe is the same setting.
Is there any way to achieve the same using the jmeter ws security plugin?
I have made various attempts using the Username preprocessor with no success. I have also tried to add username fields to the raw body of the message but without the password fields present, it will not sign it.
Any help or advice is much appreciated as we would like to use jmeter with ws-security to load test our endpoints.
Thanks for your help!