Questions tagged [spring-ldap]

Spring LDAP is a Java library for simplifying LDAP operations, based on the pattern of Spring's JdbcTemplate. The framework relieves the user of common chores, such as looking up and closing contexts, looping through results, encoding/decoding values and filters, and more.

Spring LDAP is a Java library for simplifying LDAP operations, based on the pattern of Spring's JdbcTemplate. The framework relieves the user of common chores, such as looking up and closing contexts, looping through results, encoding/decoding values and filters, and more.

The LdapTemplate class encapsulates all the plumbing work involved in traditional LDAP programming, such as creating a DirContext, looping through NamingEnumerations, handling exceptions and cleaning up resources. This leaves the programmer to handle the important stuff - where to find data (DNs and Filters) and what do do with it (map to and from domain objects, bind, modify, unbind, etc.), in the same way that JdbcTemplate relieves the programmer of all but the actual SQL and how the data maps to the domain model.

In addition to this, Spring LDAP provides transaction support, a pooling library, integration with Spring Data, fluent DSL support, an Object-Directory Mapping (ODM) framework, an LDIF parsing library with Spring Batch integration, exception translation from NamingExceptions to a mirrored unchecked Exception hierarchy, as well as several utilities for working with filters, LDAP paths and Attributes.

Official Website: http://projects.spring.io/spring-ldap/

Useful Links:

612 questions
30
votes
2 answers

Best practice for configuring Spring LdapTemplate via annotations instead of XML?

For a Spring Boot application, I successfully configured a Spring LdapTemplate using annotations, including the LdapContextSource dependency with @Values from application.properties. (Woot! I couldn't find an example, so maybe this will help…
Tim
  • 635
  • 2
  • 6
  • 16
24
votes
2 answers

Spring Boot Actuator - LDAP Health Endpoint Throwing NPE

In our Spring Boot app we have are using spring-security-ldap to authenticate users that can access our app. We don't see any issues functionally with authentication, however when we hit the /authenticator/health URL, we get the following status for…
justbaum30
  • 465
  • 2
  • 7
  • 16
18
votes
1 answer

Active Directory Authentication using Spring Security 3.2, Spring Ldap 2.0 and JavaConfig

I'm writing a web application that requires users to login. My company has an Active Directory server that I'd like to make use of for this purpose. However, I'm having trouble using Spring to authenticate the users credentials. I'm using Spring…
fresschen
  • 181
  • 1
  • 1
  • 4
11
votes
2 answers

using spring-ldap with ssl

I need to talk to an LDAP server via spring-ldap with SSL, and the other end has a self-signed certificate no less. Can any kind soul please point me to some instructions for setting this up?
bmargulies
  • 91,317
  • 38
  • 166
  • 290
11
votes
4 answers

Spring embedded ldap server in unit tests

I am currently trying to use an embedded ldap server for unit tests. In Spring Security, you can quickly define an embedded ldap server for testing with the tag with some sample data loaded from the specified ldif. I will be using Spring Ldap to…
Kent Lai
  • 1,341
  • 1
  • 12
  • 10
11
votes
2 answers

Configure Spring security for Ldap connection

I have to configure Spring security to authenticate user through LDAP. This is the subtree where manager user is: ldaps://vldp.floal:636/CN=Administration,CN=fdam,DC=fg,DC=local and this is where users…
luca
  • 2,878
  • 7
  • 54
  • 120
11
votes
1 answer

javax.naming.AuthenticationException: [LDAP: error code 49 - Invalid Credentials]

I'm new to ldap and I was trying what I thought was a trivial example to test the spring ldap module with an ldap instance that someone had already setup for testing. Details about the ldap instance that I am using can be found here:…
Quantum_Entanglement
  • 1,393
  • 6
  • 20
  • 31
10
votes
4 answers

LDAP: How to authenticate user with connection details

I am not able to authenticate a user using LDAP. I have got following details: URL=ldap://10.10.10.10:389 LDAP BASE:DC=lab2,DC=ins LDAP Bind Account: CN=Ldap Bind,OU=Service Accounts,OU=TECH,DC=lab2,DC=ins LDAP Bind Account Pw: secret I can…
Himanshu Yadav
  • 12,533
  • 39
  • 148
  • 273
9
votes
1 answer

PartialResultException when authenticating with Spring Security and JavaConfig

I am currently creating a new web application using Spring Boot and began the process of integrating Spring Security for authentication. After successfully following the Spring Boot-based LDAP tutorial, I wanted to point my JavaConfig-based…
Chris L
  • 533
  • 1
  • 3
  • 10
9
votes
2 answers

Spring Security with LDAP and Database roles

In our new insurance project, I am trying to implement spring-security with Ldap active-directory. I want to just check username/password against AD, once user found in AD. I want to authorize him from user table(app authorized users) with access…
Jon Smith
  • 155
  • 1
  • 2
  • 7
8
votes
3 answers

Spring LDAP - bind for successful connection

I'm trying to authenticate and then query our corporate LDAP using Spring LDAP and Spring security. I managed to make authentication work but when I attempt to run search I always get the following exception In order to perform this operation a…
Bostone
  • 34,822
  • 38
  • 158
  • 216
8
votes
2 answers

Spring Security WebFlux and LDAP

What customization's are required in order to secure a Reactive Spring Boot application with LDAP? The examples I've seen so far are based on Spring MVC and the example for securing a WebFlux only shows a simple Reactive example with an in-memory…
8
votes
2 answers

Ldap Query - Configuration using Spring Boot

I have a Spring boot application that needs to perform LDAP queries. I'm trying to take the following recommendation from the Spring boot documentation: "Many Spring configuration examples have been published on the Internet that use XML…
James
  • 3,524
  • 14
  • 59
  • 95
7
votes
2 answers

Spring 3.1 LDAP Authentication Process: "Bad Credentials" msg When Credentials Are Good

Spring 3.1 Tomcat 6.* I'm working on making a Spring 3.1 webapp, authenticating with LDAP. I tested the LDAP credentials (username, password, ldap URL, search pattern ) with a JNDI styled Java program I wrote (quoted below ). That program…
Steve
  • 3,000
  • 13
  • 50
  • 90
7
votes
3 answers

Trying to use Spring LDAP for coding

I am trying to use Spring LDAP for coding but I get this error NoClassDefFoundError: org/apache/directory/server/core/DirectoryService What am I doing wrong?
SJS
  • 5,277
  • 17
  • 72
  • 103
1
2 3
40 41