[英]Apache Camel, Client Certificates
我正在尝试找到一种优雅的方法来通过Apache Camel附加客户端证书。 它可以是Java或Spring XML。
我要发送给所有服务器的服务器均具有服务器证书,可以对通信进行加密,但是在发送之前,我需要将客户端公共证书附加到邮件中。 服务器包含15个左右的证书及其相应的私钥。
我的主要配置是用Spring XML编写的,所以我不确定如何通过添加客户端证书来实现这一点。
(我是具有最少Java和0 Linux经验的.NET人员)
样品弹簧:
<camel:route>
<camel:from uri="direct:GetEligibility"/>
<camel:doTry>
<camel:choice>
<camel:when>
<camel:xpath>count(//soapenv:Envelope) = '0'</camel:xpath>
<camel:to uri="xslt:xslt/WrapSoap.xsl"/>
</camel:when>
</camel:choice>
<camel:setHeader headerName="CamelHttpMethod">
<camel:constant>POST</camel:constant>
</camel:setHeader>
<camel:setHeader headerName="Content-Type">
<camel:constant>text/xml; charset=utf-8</camel:constant>
</camel:setHeader>
<camel:to uri="https://testsite.gov.ca/Services.Secured/FICR_AR022001.asmx"/>
<camel:doCatch>
<camel:exception>java.lang.Exception</camel:exception>
<camel:bean ref="log" method="error"/>
</camel:doCatch>
</camel:doTry>
</camel:route>
您需要预先配置一组SSLContextParameters,然后可以将所需的任何证书添加到http端点。 您可以选择使用不同的证书路由到不同的端点。
它在骆驼文档描述在这里 :
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.