2
我正在使用Spring Security 3.2.5以及Java配置和LDAP認證/授權。Spring Security Java配置多組搜索庫
我們有要求在LDAP中搜索兩個獨立樹中的組。
OU =組
和
OU =組,OU =的webapps,OU =應用
我已經搜查,一直無法找到關於此主題的任何信息。
這是工作正常我當前的代碼:
@Autowired
public void configureGlobal(UserDetailsContextMapper userDetailsContextMapper, LdapContextSource contextSource, AuthenticationManagerBuilder builder) throws Exception {
builder
.ldapAuthentication()
.userDetailsContextMapper(userDetailsContextMapper)
.contextSource(contextSource)
.userSearchFilter("cn={0}")
.userSearchBase("ou=Users")
.groupSearchBase("ou=groups");
}
我想要做這樣的事情:
builder
.ldapAuthentication()
.userDetailsContextMapper(userDetailsContextMapper)
.contextSource(contextSource)
.userSearchFilter("cn={0}")
.userSearchBase("ou=Users")
.groupSearchBase("ou=groups")
.groupSearchBase("ou=Groups,ou=webapps,ou=Applications");
這可以理解不起作用。
任何人都有從哪裏開始的指針?
您是否找到解決您的問題的方法?我正在尋找完全相同的東西。謝謝。 – 2016-05-13 17:28:37