Spring ldap在authoritypopulator中有多个组

时间:2010-09-22 15:48:54

标签: spring ldap spring-security

有没有办法在Spring中进行设置,以便权威人士可以在多个位置查看?

<bean id="authoritiesPopulator" class="org.springframework.security.ldap.populator.DefaultLdapAuthoritiesPopulator">
    <constructor-arg ref="contextSource" />
    <constructor-arg value="CN=Users" />
    <property name="groupRoleAttribute" value="CN" />
    <property name="searchSubtree" value="true" />
    <property name="rolePrefix" value="" />
    <property name="convertToUpperCase" value="false" />
</bean>

这是一般的想法,但CN = OtherGroups中也有组,现在它们不会被加载(显然)。但是,将groupsearchbase(第二个构造函数arg)设置为value =“”会导致错误:

未经处理的续订参考;剩下的名字''

有什么想法吗?

1 个答案:

答案 0 :(得分:0)

答案:设置推荐人。

<bean id="contextSource" class="org.springframework.security.ldap.DefaultSpringSecurityContextSource">
  ....
  <property name="baseEnvironmentProperties">
      <map>
          <entry key="java.naming.referral" value="follow" />
      </map>
  </property>
</bean>
相关问题