пружинная загрузка Ldap соединение - PullRequest
0 голосов
/ 26 июня 2019

У меня есть следующий код для подключения к ldap, но он не работает. У меня нет управляющего пользователя.

@Override
protected void configure(HttpSecurity http) throws Exception {
    http
        .authorizeRequests()
            .antMatchers("/login**").permitAll()
            .antMatchers("/profile/**").fullyAuthenticated()
            .antMatchers("/").permitAll()
            .and()
        .formLogin()
            .loginPage("/login")
            .failureUrl("/login?error")
            .permitAll()
            .and()
        .logout()
            .invalidateHttpSession(true)
            .deleteCookies("JSESSIONID")
            .permitAll();
}

@Override
protected void configure(AuthenticationManagerBuilder auth) throws Exception {
    auth.ldapAuthentication().userDnPatterns("sAMAccountName={0}")
        .url("ldap://url:389/DC=dmc,DC=local");
}

получаю ошибку: org.springframework.ldap.AuthenticationException: [LDAP: код ошибки 49- 80090308: LdapErr: DSID-0C09042F, комментарий: ошибка AcceptSecurityContext, данные 52e, v2580

...