【问题标题】:Spring Security Active Directoty AuthenticationSpring Security Active Directory 身份验证
【发布时间】:2016-02-16 00:58:52
【问题描述】:

我正在使用 Spring Security 和 Active Directly 进行身份验证。下面我的配置

     registry
.ldapAuthentication()
.ldapAuthoritiesPopulator(customLdapAuthoritiesPopulator)
.userDnPatterns("cn={0},cn=Users")
        .contextSource() .managerDn("cn=Administrator,cn=Users,cn=COMPANY,cn=COM,cn=TN") 
.managerPassword("xxxxxxx")
.url("ldap://xxx.xxx.xxx.xxxx:389/cn=COMPANY,cn=COM,cn=TN") ;

当我尝试与有效用户连接时,我得到了这个日志:

    23:30:49.321 [http-bio-8080-exec-8] DEBUG o.s.s.authentication.ProviderManager - Authentication attempt using org.springframework.security.ldap.authentication.LdapAuthenticationProvider
    23:30:49.322 [http-bio-8080-exec-8] DEBUG o.s.s.l.a.LdapAuthenticationProvider - Processing authentication request for user: ben 
    23:30:49.344 [http-bio-8080-exec-8] DEBUG o.s.s.l.a.BindAuthenticator - Attempting to bind as cn=ben,cn=Users,cn=COMPANY,cn=COM,cn=TN
    23:30:49.345 [http-bio-8080-exec-8] DEBUG o.s.s.l.DefaultSpringSecurityContextSource - Removing pooling flag for user cn=ben,cn=Users,cn=COMPANY,cn=COM,cn=TN 
23:30:52.371 [http-bio-8080-exec-8] DEBUG o.s.s.l.a.BindAuthenticator - Failed to bind as cn=ben,cn=Users: org.springframework.ldap.AuthenticationException: [LDAP: error code 49 - 80090308: LdapErr: DSID-0C0903C5, comment: AcceptSecurityContext error, data 52e, v2580

【问题讨论】:

    标签: spring security active-directory


    【解决方案1】:

    抱歉,这是一个愚蠢的错误:我使用 CN 而不是 DC。

    【讨论】:

      猜你喜欢
      • 2020-04-08
      • 2015-04-17
      • 2011-01-12
      • 2012-03-02
      • 2016-03-27
      • 2013-09-21
      • 2020-02-16
      • 2014-06-11
      • 1970-01-01
      相关资源
      最近更新 更多