admin管理员组

文章数量:1431391

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.

本文标签: