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>