最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

java - Spring-security-ldap fails to authenticate non-administrative users using active directory LDAP - Stack Overflow

programmeradmin2浏览0评论

Good morning, in the past I have developed applications in Node.js using the activedirectory and activedirectory2 modules, and with both modules, the webapps can authenticate users using the AD LDAP. Both administrator users and normal users.

These days I am developing an application with the Spring Framework, and I am using the class .springframework.security.ldap.authentication.ad.ActiveDirectoryLdapAuthenticationProvider.

With this class, only users in the Active Directory Administrator group can authenticate, not other users. Can you tell me why?

The domain controller is a Windows Server 2022.

This is my xml configuration:

<bean id="adAuthenticationProvider"
              class=".springframework.security.ldap.authentication.
              ad.ActiveDirectoryLdapAuthenticationProvider">

  <constructor-arg value="example" />
  <constructor-arg value="ldap://dc.example:3268" />
  <constructor-arg value="ou=ORG,dc=example,dc=com" />
  <property name="convertSubErrorCodesToExceptions" value=*"true"/>

</bean>

<security:http >
  <security:csrf disabled = "true"/>
  <security:intercept-url pattern=*"/**"* access=*"isAuthenticated()" />
  <security:form-login />
  <security:logout />
</security:http>

<security:authentication-manager>
  <security:authentication-provider ref="adAuthenticationProvider"/>
  </security:authentication-manager>
</beans>

I tried changing permissions on ad, changing OUs, changing the configuration multiple times but nothing works.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论