ws-security

WSS4j elements order during signing SOAP message

*爱你&永不变心* 提交于 2019-12-05 08:15:29
I'm implementing web service client in Java which uses wss4j 1.6.8 for WS-Security (to be more precize I need to sign a SOAP message). Server side requires requests to have the following structure: <Envelope> <Header> <wsse:Security mustUnderstand="1"> **<wsu:Timestamp wsu:Id="Timestamp-913ca68e-05ed-44e1-9d6c-b2f293da5a1d"> <wsu:Created>2012-12-21T11:37:31Z</wsu:Created> <wsu:Expires>2012-12-21T11:42:31Z</wsu:Expires> </wsu:Timestamp>** <wsse:BinarySecurityToken> MIID2jCCAsKg... </wsse:BinarySecurityToken> <Signature xmlns="http://www.w3.org/2000/09/xmldsig#"> <SignedInfo>

WS-Security not working with CXF

血红的双手。 提交于 2019-12-05 07:02:22
I' am trying to develop a WS-security enabled web service with Apache CXF. Tutorial that I am following is here . Unfortunately I am continuously getting the following error much to chagrin. I' am using Spring framework 3.0.5 and CXF 2.3.3 and also WSS4J 1.6.1. This may be a silly question but I am almost fed up with finding a solution. Please please help .... org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.NoSuchMethodError: org.apache.ws.security.util.WSSecurityUtil.decodeAction(Ljava/lang/String;Ljava/util/Vector;Lorg/apache/ws

Is it possible to do a TLS handshake event in Tomcat?

霸气de小男生 提交于 2019-12-05 05:29:47
I'm running an application (web service) in tomcat with TLS enabled (with certificates both for the client and the server). I want that my application will be able to send audit message (logging) when TLS handshake fails. For example I want to log when: the client certificate is expired, the client certificate is unknown (not in the server trust store) any other handshake failure Is there any event that I can catch and handle in order to do that? My application is web service based and is running in tomcat. Tomcat is handling all network and the TLS layers, and the application does not aware

Configure WCF for WS-Security with Username over https

孤人 提交于 2019-12-05 03:47:16
问题 I'm trying to call a Java based, WS-Security enabled web service over https using a WCF client and can't seem to get the security configuration right. Using SvcTraceViewer, I don't see the expected security header with any of the security configurations I have tried. My most recent security configuration is: <wsHttpBinding> <binding name="MySoapBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal=

Securing REST endpoint using spring security

雨燕双飞 提交于 2019-12-05 02:52:14
I am trying to provide security to the REST endpoints. I am following instructions from this page . In my case I don't have view hence I haven't created controller to specify the views and haven't added viewResolver in my AppConfig.java After implementation it correctly shows the access denied error upon calling a secured REST endpoint. But even though I specify username/password in the request header I get the access denied error. I am testing in postman setting username/password in Basic Auth. What am I missing any idea? The example you have followed is implementing a form-based

Create WS security headers for REST web service in SoapUI Pro

筅森魡賤 提交于 2019-12-04 21:23:18
We are developing a REST web service with the WS security headers to be passed through as header parameters in the REST request. I am testing this in SoapUI Pro and want to create a groovy script to generate these and then use them in the REST request. These parameters include the password digest, encoded nonce and created dateTime and password digest which is created from encoding the nonce, hashed password and created date and time, i.e. the code should be the same as that which generates these from using the Outgoing WS Security configurations in SoapUI Pro. I have created a groovy test

How to convert a pfx file into jks and then use it to sign an outgoing soap request by using the classes generated from a wsdl

萝らか妹 提交于 2019-12-04 20:13:01
I am looking for a code example which shows how to access a secure web service over SSL using a PFX certificate. I have the certificate and its password and I started by creating a KeyStore instance using the command mentioned below. keytool -importkeystore -destkeystore "C:\Program Files\Java\jdk1.8.0_131\jre\lib\security\dvs.keystore" -srckeystore "C:\Program Files\Java\jdk1.8.0_131\jre\lib\security\key.pfx" -srcstoretype pkcs12 -deststoretype JKS -srcstorepass ******* I then used wsimport -keep -verbose -extension https://sandpit.dvshub.com.au:19443/Bus/VerificationServiceBus.svc?wsdl

Programmatically read encrypted error messages from webservice using metro 2.3

风格不统一 提交于 2019-12-04 19:44:59
Using METRO 2.3 in Netbeans with WS-Security I try to read error messages of an encrypted webservice. The communication works fine until my payload contains errors. Then the server sends an encrypted error message with the information what went wrong. My client tries to decrypt it and understands that the message got another structure than expected and throws an XMLSignatureException: javax.xml.crypto.dsig.XMLSignatureException: WSS1717: Error occurred while doing digest verification of body/payload The error message that was send by the server is hidden. The exception is thrown here in line

How can I implement WS-Security 1.0 in PHP5 using certificates?

余生颓废 提交于 2019-12-04 19:41:17
I have found very interesting the answer to how to implement ws-security 1.1 in php5 but I need to use certificates to authenticate the connection to the WebService. Does anyone know a way to do such a thing on PHP5? Many thanks in advance! Here is my script. With this script it returns me: An error occurred when verifying security for the message. And i Want to find a way to debug this message. The .pem file is generated from the key file signed certificate and the ca-file. .crt is ca-certificate. I have no information what server expect exactly....... Later I`ll check server holders for more

Implementing password digest for ws-security UsernameToken in Java

时间秒杀一切 提交于 2019-12-04 14:43:22
问题 I am trying to make a call to a ws-security secured webservice from a server which unfortunately does not support this natively. The approach I have taken is to implement a .jsp which acts as reverse proxy to the actual end point URL, in the process adding the element with ws-security elements. This seems to be working quite well and I am confident I've constructed the XML correctly with the correct namespaces etc. I've verified this by comparing the XML with XML produced by SOAP-UI. The