【问题标题】:LDAP authentication failed:data 52eLDAP 身份验证失败:数据 52e
【发布时间】:2018-01-15 18:14:44
【问题描述】:

我正在尝试通过 LDAP 帐户进行身份验证:

@Configuration
    protected static class AnnotationConfiguration extends GlobalAuthenticationConfigurerAdapter{

        @Override
        public void init(AuthenticationManagerBuilder authenticationManagerBuilder) throws Exception{
            authenticationManagerBuilder
                .ldapAuthentication()
                .userSearchFilter("(cn={0})")
                .userSearchBase("ou=User Accounts,dc=ph,dc=sunlife")
                //.groupSearchFilter("")
                //.userDnPatterns("cn={0},ou=Functional Accounts")
                //.rolePrefix("")
                .contextSource()
                .url("ldap://ldapvs.ph.sun/dc=ph,dc=sun")
                .managerPassword("sun_01").managerDn("cn=JPH,ou=Non Internet user,ou=Staff,ou=User Accounts");

        }

    }

在登录页面输入用户名和密码后,我得到:

14:01:32 [http-bio-8085-exec-7] UsernamePasswordAuthenticationFilter - An internal error occurred while trying to authenticate the user.
org.springframework.security.authentication.InternalAuthenticationServiceException: [LDAP: error code 49 - 80090308: LdapErr: DSID-0C0903A8, comment: AcceptSecurityContext error, data 52e, v1db1

虽然我知道我的密码和用户名是有效的。

【问题讨论】:

    标签: spring authentication spring-boot spring-security ldap


    【解决方案1】:

    如维基http://wiki.servicenow.com/index.php?title=LDAP_Error_Codes#gsc.tab=0中所述

    表示 Active Directory (AD) AcceptSecurityContext 错误,它 当用户名有效但密码组合时返回 并且用户凭据无效。这是 LDAP 的 AD 等价物 错误代码 49。

    【讨论】:

      猜你喜欢
      • 2018-02-22
      • 1970-01-01
      • 2016-08-20
      • 2020-04-14
      • 2015-04-19
      • 2016-02-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多