How to Customize Username Token Security Policy in WSO2 ESB -
i using wso2esb4.8.1. wish implement username token security's. getting header request this
<soapenv:header> <pr:authentication soapenv:actor="http://schemas.xmlsoap.org/soap/fff/next" soapenv:mustunderstand="0" xmlns:pr="http://webservices.dddd.com/proxyservice"> <pr:user>mp</pr:user> <pr:password>mw_ssp003</pr:password> </pr:authentication> </soapenv:header>
where wso2 esb standards not allowing me taking headers in format only
<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" soapenv:mustunderstand="1"> <wsu:timestamp wsu:id="ts-4"> <wsu:created>2014-06-02t07:15:21z</wsu:created> <wsu:expires>2014-06-02t08:38:41z</wsu:expires> </wsu:timestamp> <wsse:usernametoken wsu:id="usernametoken-3"> <wsse:username>admin</wsse:username> <wsse:password type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#passwordtext">admin</wsse:password> <wsse:nonce encodingtype="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#base64binary">bywkvy4steatvtqaonmswq==</wsse:nonce> <wsu:created>2014-06-02t07:15:21.304z</wsu:created> </wsse:usernametoken> </wsse: > </soapenv:header>
how change desire format.i tried edit policy scenario1 in registry this
<wsp:policy wsu:id="utovertransport" soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustunderstand="0" xmlns:pr="http://webservices.irancell.com/proxyservice" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"> <wsp:exactlyone> <wsp:all> <sp:transportbinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> <wsp:policy> <sp:transporttoken> <wsp:policy> <sp:httpstoken requireclientcertificate="false"/> </wsp:policy> </sp:transporttoken> <sp:algorithmsuite> <wsp:policy> <sp:basic256/> </wsp:policy> </sp:algorithmsuite> <sp:layout> <wsp:policy> <sp:lax/> </wsp:policy> </sp:layout> <sp:includetimestamp/> </wsp:policy> </sp:transportbinding> <soapenv:header> <pr:authentication soapenv:actor="http://schemas.xmlsoap.org/soap/mhk/next" soapenv:mustunderstand="0" xmlns:pr="http://webservices.mwetp.com/proxyservice"> </pr:authentication> </soapenv:header> </wsp:all> </wsp:exactlyone> </wsp:policy>
but unable solve getting errors this
[2014-06-02 16:10:18,216] error - rpcinonlymessagereceiver loadingpolicy org.wso2.carbon.security.securityconfigexception: loadingpolicy @ org.wso2.carbon.security.config.securityconfigadmin.applypolicy(secur ityconfigadmin.java:946) @ org.wso2.carbon.security.config.securityconfigadmin.applypolicy(secur ityconfigadmin.java:809) @ org.wso2.carbon.security.config.securityconfigadmin.applysecurity(sec urityconfigadmin.java:738) @ org.wso2.carbon.security.config.service.securityconfigadminservice.ap plysecurity(securityconfigadminservice.java:52)
any appreciated. in advance.
Comments
Post a Comment