WSO2’s Action Response: Log4j2 Zero-Day Vulnerability (CVE-2021-44228)Learn More >
Web Service Clients send user name/password via HTTP Basic Authentication but the Web service is secured using Username Token (WS-Security) and you don't have any control over the Web service. How to convert HTTP Basic Authentication to WS-Security Username Token?
If you are not familiar with WSO2 Enterprise Service Bus, for more information about WSO2 Enterprise Service Bus please check the project page here. We will refer to the folder where WSO2 Enterprise Service Bus is installed as <esb-home> in the rest of this "how to" article. We will be using WSO2 Enterprise Service Bus between the client and the Web service to convert basic authentication sent by the client to Username Token before forwarding the request to the Web service. We will use a sample service and a client in this tutorial to demonstrate the functionality.
The steps are as follows:
Linux : sh wso2esb-samples.sh -sn 700 --cleanCacheWindows : wso2esb-samples.bat -sn 700 --cleanCache
Linux : axis2server.shWindows : axis2server.bat
ant stockquote -Daddurl=https://localhost:8280/services/StockQuoteProxy
<syn:property name="MediatorBehavior" value="DoAuthenticationAtMediator"/>
Dimuthu Leelarathne, Technical Lead, WSO2 Inc. dimuthul at wso2 dot com
If you wish to disable cookies you can do so from your browser.