From ba38453c669615ab9eef24976316a772fd47e15f Mon Sep 17 00:00:00 2001 From: Zachary Pittman Date: Mon, 15 May 2017 13:23:36 -0400 Subject: [PATCH 1/2] Fix PasswordDigestExt algorithm This fixes the PasswordDigestExt algorithm to match the definition described in the ws-security documentation (using the documentation as expectation). Documentation: Section about "Username" and it's configurable fields https://www.soapui.org/soapui-projects/ws-security.html Tested against Amadeus Web Services. Credential was always being reported invalid prior to this fix. --- .../soapui/impl/wsdl/support/wss/entries/UsernameEntry.java | 1 + 1 file changed, 1 insertion(+) diff --git a/soapui/src/main/java/com/eviware/soapui/impl/wsdl/support/wss/entries/UsernameEntry.java b/soapui/src/main/java/com/eviware/soapui/impl/wsdl/support/wss/entries/UsernameEntry.java index cd68eecb71..662c583528 100644 --- a/soapui/src/main/java/com/eviware/soapui/impl/wsdl/support/wss/entries/UsernameEntry.java +++ b/soapui/src/main/java/com/eviware/soapui/impl/wsdl/support/wss/entries/UsernameEntry.java @@ -77,6 +77,7 @@ public void process(WSSecHeader secHeader, Document doc, PropertyExpansionContex sha.reset(); sha.update(password.getBytes("UTF-8")); password = Base64.encode(sha.digest()); + token.setPasswordsAreEncoded(true); } catch (Exception e) { SoapUI.logError(e); } From bf7c90a410a611e8b15f3ff1891fa0553643a361 Mon Sep 17 00:00:00 2001 From: gokussx4 Date: Mon, 15 May 2017 13:23:36 -0400 Subject: [PATCH 2/2] Fix PasswordDigestExt algorithm This fixes the PasswordDigestExt algorithm to match the definition described in the ws-security documentation (using the documentation as expectation). Documentation: Section about "Username" and it's configurable fields https://www.soapui.org/soapui-projects/ws-security.html Tested against Amadeus Web Services. Credential was always being reported invalid prior to this fix. --- .../soapui/impl/wsdl/support/wss/entries/UsernameEntry.java | 1 + 1 file changed, 1 insertion(+) diff --git a/soapui/src/main/java/com/eviware/soapui/impl/wsdl/support/wss/entries/UsernameEntry.java b/soapui/src/main/java/com/eviware/soapui/impl/wsdl/support/wss/entries/UsernameEntry.java index cd68eecb71..662c583528 100644 --- a/soapui/src/main/java/com/eviware/soapui/impl/wsdl/support/wss/entries/UsernameEntry.java +++ b/soapui/src/main/java/com/eviware/soapui/impl/wsdl/support/wss/entries/UsernameEntry.java @@ -77,6 +77,7 @@ public void process(WSSecHeader secHeader, Document doc, PropertyExpansionContex sha.reset(); sha.update(password.getBytes("UTF-8")); password = Base64.encode(sha.digest()); + token.setPasswordsAreEncoded(true); } catch (Exception e) { SoapUI.logError(e); }