How to send and receive certificates in Spring Ws with a third party such as Bank?

試著忘記壹切 提交于 2019-12-18 07:12:08

问题


I am using Spring MVC 4 Rest but now as i need to consume a web service i decided to use Spring Ws with Appache Tomcat7 server and I am trying to connect to a third party that is a Bank Api I have to achieve mutual authentication that is two way SSL in order to send my Soap Requests

  1. If certificates are placed in the trust store and key store respectively in spring ws then while trying to connect to https server will the verification and sending certificates happen automatically?
  2. What are the steps or procedures to be followed to configure my Spring Ws application to consume a web service over https ?
  3. If verification and sending is not done automatically then how do i send and verify the certificate before sending the soap request using Spring ws?

回答1:


Spring WS security provides support via WebServiceTemplate. There are two kinds of security mechanism, SUN's XML and Web Services Security(XWSS) through XwsSecurityInterceptor and Apache's WSS4J throughWss4jSecurityInterceptor. These are just extension points, so you can customize all your security needs ranging from authentication, signing, validation, encryption and decryption.

Please also check my answer regarding keystores and truststore set up to your other question.

More reading here XwsSecurityInterceptor and Wss4jSecurityInterceptor.



来源:https://stackoverflow.com/questions/37520365/how-to-send-and-receive-certificates-in-spring-ws-with-a-third-party-such-as-ban

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!