【问题标题】:Spring ldap multiple group bases in authoritiespopulator在 authoritypopulator 中的 Spring ldap 多个组库
【发布时间】:2011-04-15 19:49:01
【问题描述】:

在 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="" 会导致错误:

未处理的继续引用;剩下的名字''

有什么想法吗?

【问题讨论】:

    标签: spring ldap spring-security


    【解决方案1】:

    答案:设置要关注的推荐。

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

    【讨论】:

      猜你喜欢
      • 2018-01-01
      • 2015-10-12
      • 2012-06-04
      • 2013-12-10
      • 2012-10-05
      • 2017-06-01
      • 2014-04-16
      • 2011-08-09
      • 1970-01-01
      相关资源
      最近更新 更多