同事们,早上好。
我正在尝试在我的SCDF中实现LDAP:
#!/usr/bin/env bash
export spring_datasource_url=jdbc:postgresql://xx.xxx.xx.xx:5432/data_flow
export spring_datasource_username=data_flow_main
export spring_datasource_password=secret
export spring_datasource_driver_class_name=org.postgresql.Driver
java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 \
-Djavax.net.debug=ssl:handshake:verbose \
-jar /mnt/store/viewing-maker/base-operations/scdf/spring-cloud-dataflow-server-local-1.7.0.BUILD-SNAPSHOT.jar \
--spring.cloud.dataflow.task.maximum-concurrent-tasks=300 \
--security.basic.enabled=true \
--spring.cloud.dataflow.security.authentication.ldap.enabled=true \
--spring.cloud.dataflow.security.authentication.ldap.url="ldap://example.com:389" \
--spring.cloud.dataflow.security.authentication.ldap.managerDn="CN=123,OU=Служебные пользователи,DC=example,DC=com" \
--spring.cloud.dataflow.security.authentication.ldap.managerPassword="secret" \
--spring.cloud.dataflow.security.authentication.ldap.userSearchBase="OU=MyCity" \
--spring.cloud.dataflow.security.authentication.ldap.userSearchFilter="sAMAccountName={0}" \
--spring.cloud.dataflow.security.authentication.ldap.groupSearchBase="OU=MyCity" \
--spring.cloud.dataflow.security.authentication.ldap.groupSearchFilter="member={0}" \
--spring.cloud.dataflow.security.authentication.ldap.roleMappings.ROLE_MANAGE="ADgroup1" \
--spring.cloud.dataflow.security.authentication.ldap.roleMappings.ROLE_VIEW="ADGroup2" \
--spring.cloud.dataflow.security.authentication.ldap.roleMappings.ROLE_CREATE="AdGroup3" \
我有另一个项目,并且配置相同。我通过REST进行身份验证,并且一切正常。我的LDAP服务器返回确定。为了澄清起见,在正确的应用程序中,我还使用:
DefaultLdapAuthoritiesPopulator populator = new DefaultLdapAuthoritiesPopulator(ldapContext, groupSearchBase);
populator.setSearchSubtree(true);
populator.setRolePrefix(rolePrefix);
populator.setGroupSearchFilter(groupSearchFilter);
答案 0 :(得分:0)
问题出在ANSI而不是utf-8。系统无法识别某些西里尔符号。