【发布时间】:2019-04-30 20:09:44
【问题描述】:
目前我正在阅读文档http://camel.apache.org/ldap.html
并尝试为 LDAP 配置 SSL,我没有找到 bean 的方式或位置 ldapserver 指的是 bean customSocketFactory。 任何建议或提示都非常受欢迎!
<?xml version="1.0" encoding="UTF-8"?>
https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd http://camel.apache.org/schema/blueprinthttp://camel.apache.org/schema/blueprint/camel-blueprint.xsd">
<sslContextParameters xmlns="http://camel.apache.org/schema/blueprint"
id="sslContextParameters">
<keyManagers
keyPassword="{{keystore.pwd}}">
<keyStore
resource="{{keystore.url}}"
password="{{keystore.pwd}}"/>
</keyManagers>
</sslContextParameters>
<bean id="customSocketFactory" class="zotix.co.util.CustomSocketFactory">
<argument ref="sslContextParameters" />
</bean>
<bean id="ldapserver" class="javax.naming.directory.InitialDirContext" scope="prototype">
<argument>
<props>
<prop key="java.naming.factory.initial" value="com.sun.jndi.ldap.LdapCtxFactory"/>
<prop key="java.naming.provider.url" value="ldaps://lab.zotix.co:636"/>
<prop key="java.naming.security.protocol" value="ssl"/>
<prop key="java.naming.security.authentication" value="simple" />
<prop key="java.naming.security.principal" value="cn=Manager,dc=example,dc=com"/>
<prop key="java.naming.security.credentials" value="passw0rd"/>
<prop key="java.naming.ldap.factory.socket"
value="zotix.co.util.CustomSocketFactory"/>
</props>
</argument>
</bean>
【问题讨论】:
标签: apache-camel