648 questions
Best practices
0
votes
1
replies
18
views
Spring: How to use dynamic credentials for LDAP authentication?
I'm building a Spring service that uses
its own database to authenticate administrators and staff,
a central LDAP server (managed by someone else) to authenticate regular customers.
Whenever Spring ...
1
vote
2
answers
89
views
Cannot read accountExpires attribute from Active Directory with Spring LDAP
I am using Spring Boot/Spring Data Ldap.
When I query users I cannot read accountExpires attribute, even when the property is shown in GetADUser.
I tried something like this:
return readTemplate()....
2
votes
1
answer
49
views
Spring LDAP : Verbose mode to see LDIF sended
I use Spring Boot with Spring LDAP to OpenLDAP.
Is there a way to view in debug mode the command send to the LDAP server ?
Like a "verbose mode" to view the LDIF send to OpenLDAP.
Thanks in ...
0
votes
0
answers
107
views
Spring Boot Reactive with Webflux: Security with LDAP bind fails
Upgraded an Spring Boot application.
Java 11 > Java 21
Spring Boot 2.3.3 > 3.4.4
Spring Zuul > Spring Cloud Gateway
Hystrix Fallback > Resiliance4j
Using Spring Security and Spring LDAP
...
0
votes
1
answer
191
views
Retrieve more than 1000 records in LDAP using springboot
I'm using ldaptemplate to retrieve many records from Active Directory using sring-ldap-core 3.2.
This is the code I'm using
AndFilter filter = new AndFilter();
filter.and(new EqualsFilter(&...
0
votes
1
answer
141
views
Spring ldapTemplate search() doesn't return dn attribute
I've got a fairly straight forward program that performs an LDAP search based on a CN and maps all the returned attributes, here's the program:
import java.util.ArrayList;
import java.util....
0
votes
1
answer
136
views
Springboot LDAP integration
I am trying to integrate LDAP with my Spring-boot application. I can see the following DN for my account in my Active Directory Explorer.
CN=John, Doe,OU=ITS,OU=Users,OU=_OBDE,DC=demodemo,DC=net
We ...
0
votes
1
answer
423
views
Why is my Spring LDAP search failing to return a user
I am trying to write a Spring LDAP program to search for a user's record in an Active Directory server, but it will not return any records. The same search in Apache Directory Studio works.
When I ...
0
votes
2
answers
97
views
Ldap attribues for testing in Spring Boot with ApacheDS
I am trying to simulate a real Microsoft LDAP tree.
The application is working against a real LDAP, but using an inmemory LDAP server (ApacheDS) for testing in Spring Boot but it doesn't work. I can't ...
-1
votes
1
answer
267
views
How to find all groups in LDAP using Spring which falls under the same CN?
I have this requirement where I need to find all groups in LDAP which comes under the same common name(CN). For example, I am able to find the definition for one using the below piece of code.
("...
1
vote
0
answers
337
views
How to add LDAP login using Spring boot 3.x.x + Vaadin 24?
WebSecurityConfig for LDAP login. I have used Spring boot 3.x.x and vaadin 24. I want use vaadin not controller but how to replace. In vaadin clcik on button then login form open using LDAP. How to do ...
0
votes
1
answer
931
views
How to retrieve authorities/roles when authenticating with spring security and LDAP?
First of all I want to say I don't understand LDAP fully, so if I need to provide more information about the LDAP, please say so.
I have a spring boot application (Java 17, spring boot 3.2.0) which ...
1
vote
1
answer
308
views
Spring LDAP - multiple bases in one or more request(s)
I need to make a query that will search for all users, located in two different OUs.
For example :
base1: "OU=ou2,OU=ou1"
base2 : "OU=ou3,OU=ou1"
How can I do this with ...
0
votes
0
answers
180
views
How to use proxy server while authenticate using LDAP in Spring Boot?
How to set proxy server ip in LdapContextSource while authenticated using LdapTemplate.authenticate()
Actually for security purposes we don't have direct access to AD server. So how to set proxy IP ...
-1
votes
1
answer
85
views
ClassCastException because in diffrent modules
I encounter this issue with spring LDAP:
class javax.naming.ldap.LdapName cannot be cast to class java.lang.String (javax.naming.ldap.LdapName is in module java.naming of loader 'bootstrap'; java.lang....
0
votes
1
answer
558
views
Spring LDAP filter search on a multivalued attribute
I am using Spring LDAP and have entries (person) with a multivalued attribute named Department. i.e each person can have zero or more Department attributes.
I am trying to make a search (filter) and ...
3
votes
1
answer
235
views
Spring ldaptemplate unable to delete attribute with multiple values
I want to delete attribute with multiple values but it ignores this while successfully deletes another attribute with specific value in directory.
Attribute attr1 = new BasicAttribute("fooAttr&...
1
vote
1
answer
994
views
LDAP Authentication in SpringBoot not working
Below is my spring security ldap authentication code snippet
I am able to authenticate admin user as shown in CASE 2. However, when I am not able to authenticate user1 as shown in CASE 1 for a ...
0
votes
1
answer
1k
views
Query LDAP groups in Spring via LDAPTemplate - Authorization needed and how?
I'm in the process of developing a Spring Boot application that can be connected to an LDAP server for authentication and some (limited) query purposes.
By now, authentication and my needed query ...
0
votes
1
answer
2k
views
How to create YAML DSL route in Apache Camel to query LDAP properties?
I am trying to create a YAML Route to perform a simple query to a LDAP server and to output the result to the log. My route looks like following:
- route:
id: route-561c
from:
uri: timer:...
2
votes
1
answer
4k
views
Why am I not able to authenticate against LDAP Server in SpringBoot3?
I am attempting to connect an application to LDAP after upgrading to:
OpenJDK 17, SpringBoot 3.0.2, Gradle 8.0
Previously, we had a homegrown solution to connect to the active directory that will no ...
1
vote
0
answers
288
views
How to Map Java Pojo with parent and child class to LDAP using spring ldap
I am trying to map my java pojo (Parent and child classes) with LDAP entry using spring ODM @Entry
as below
The ldap entry looks as below
//child class
public class ChildClass extends ParentClass{
...
0
votes
1
answer
93
views
How to store empty/null manager field of a user in LDAP?
@Attribute(name = "manager")
private String manager;
ldapTemplate.create(user);
The following code works when I have manager if I format the string like:
"manager": "CN=...
0
votes
1
answer
245
views
LDAPS issue when running native image in Spring Boot 3
I am getting the below issue when using a native image. With JVM-based uber jar, no issues.
Spring Boot 3.0.1
openjdk version "17.0.5" 2022-10-18
OpenJDK Runtime Environment GraalVM CE 22.3....
1
vote
0
answers
76
views
How do I provide Admin username and password to ActiveDirectoryLdapAuthenticationProvider?
Typically, we configure a vanilla LdapAuthenticationProvider with a Dn and a password.
auth
.ldapAuthentication()
.contextSource()
.url(env.getProperty("spring.ldap.urls&...
0
votes
0
answers
114
views
How to Authenticate to LDAP server when the available managerPassword is not in cleartext but hashed using a secure salt?
EDIT- The server currently hashes the incoming cleartext user password and compares that with the hash that is stored in the server. My problem is that my application is sending the password already ...
3
votes
0
answers
3k
views
How does ActiveDirectoryLdapAuthenticationProvider work without explicitly specifying user credentials?
Following is a typical example of what I've found on the Internet for Authenticating to Active Directory using LDAP.
package com.test;
import org.springframework.security.config.annotation....
1
vote
1
answer
15k
views
LDAP: error code 49 - 80090308: LdapErr: DSID-0C09044E, comment: AcceptSecurityContext error, data 52e, v2580 (first time using ldap)
I am having problem with ldap on spring, I know what that error means but idk what i am doing wrong in the config of the connection
this is my application.properties :
spring.ldap.urls=ldap://***
...
0
votes
1
answer
197
views
LDAP Filter Syntax Query
What would be the syntax for LDAP for the below scenario:
Where sAMAccountName = GRA-* without $. I want the records which are highlighted in green.
This is my current LADP Filter for your reference:
...
1
vote
1
answer
2k
views
LDAP query to retrieve users from a specific group
I am trying to write a query to extract the users from an LDAP group. I tried several queries to retrieve the users from a specific group but none of them seem to have worked until now. For example, ...
0
votes
1
answer
1k
views
Simple Spring Boot LDAP authentication example does not work with ActiveDirectory
I found a very simple example for LDAP authentication, which works just fine using an embedded LDAP server: https://github.com/asbnotebook/spring-boot/tree/master/spring-security-embedded-ldap-example ...
0
votes
1
answer
1k
views
How to distinguish the lock in ldap, whether it is locked manually by some admin user or is it due to incorrect password attempts?
I have a requirement that user account will be locked if user tries with multiple incorrect password and alternatively admin can also lock the account, for incorrect pwd attempts I can use the ...
0
votes
1
answer
1k
views
spring-ldap use ldaps connect to ActiveDirectory
I want to create a ldap account (with password) or change account passwords with spring-ldap, so I follow some instructions to export a certificate from AD and import it to jdk, after that I change ...
5
votes
4
answers
18k
views
LdapCtxFactory because module java.naming does not export com.sun.jndi.ldap to unnamed module
WebSecurityConfigurerAdapter:
@Component
@EnableWebSecurity
public class SecurityConfiguration extends WebSecurityConfigurerAdapter
{
@Override
protected void configure(HttpSecurity httpSecurity)...
0
votes
0
answers
828
views
LDAP Authentication in Sping with multiple URLs
I have an application that uses LDAP Spring for authentication which works as expected.
Now we are trying to support providing multiple URLs to authenticate on and I found that this is already ...
2
votes
1
answer
2k
views
Why do I get javax.naming.NameNotFoundException: [LDAP: Error code 32 - No Such Object]; remaining name '/' after upgrading spring-ldap on findUser?
After upgrading to spring-ldap 2.4.0 from 2.0.2.RELEASE, we are experiencing this error when trying to find an existing ldap user. We haven't changed any code or configuration except for the .xsd ...
2
votes
1
answer
1k
views
Spring LDAP Spring Ldap Embedded doesn't set ldaptemplate base
To test ma LDAP service. I set up the embedded LDAP config like that:
spring:
ldap:
base: OU=Internals,DC=int,DC=springboot,DC=dev
username: uid=admin
password: secret
urls: ldap://...
0
votes
1
answer
1k
views
Spring security Ldap authentication Exception : Not an instance of DirContext
I'm trying to connect to a Ldap server (host by the company, don't have much info about it), using Spring Security, I have this bean:
@Override
public void configure(AuthenticationManagerBuilder auth)...
0
votes
1
answer
881
views
Using LDAP template to find certificate
Our organization stores signing certificates in Active Directory. We are using anonymous bind to search for them at a base DN (e.g. OU=MY ORG,dc=mydc,dc=org). I have been trying to use the Spring ...
2
votes
0
answers
286
views
Spring Data LDAP returns subset of search results
I am using Spring Data LDAP to return all members of a particular AD group . The AD group has more than 40,000 members . When running the below query , I am only able to retrieve 6000 members . How do ...
2
votes
1
answer
3k
views
Retrieve user information from LDAP with Spring
I need to retrieve user information based on the email of the user.
I have see some subject discussing about this but i don't find one with ldapTemplate that respond to the problem.
Actually a user ...
-1
votes
1
answer
965
views
Springboot with LDAP Auth No results found for search, base: ''
I'm trying to connect my SpringBoot app to the ldap server. (not embedded)
The problem while i'm trying to connect is :
try auth
2022-02-26 20:31:12.593 INFO 19692 --- [nio-8080-exec-2] o.s.ldap.core....
0
votes
1
answer
1k
views
How to replace LDAP Authentication from Azure AD B2C?
I have a requirement to replace the LDAP Authentication from a gateway microservice with Azure AD B2C, Is there any standard way or steps to replace that with newer authentication method or we need to ...
0
votes
1
answer
242
views
UserSearchFilter&managerDn issue when authenticating to LDAP
I’m trying to connect the LDAP using the following code:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-...
0
votes
1
answer
345
views
how to set up dirContextValidator?
https://docs.spring.io/spring-ldap/docs/1.3.2.RELEASE/reference/html/pooling.html
open fun create(): LdapTemplate {
return LdapTemplate(PooledContextSource(
PoolConfig().apply {
...
0
votes
0
answers
2k
views
Test LDAP connection using LDAP search
Our Spring application deployed on Linux is failing with Acces Denied to issue a token. As the same code and setup works on other VM's I am speculating there could be an issue connecting to the LDAP ...
0
votes
0
answers
2k
views
Need 2 different versions of same dependency in Gradle
I am working on a spring boot Gradle application that has a dependency on spring-ldap. The issue is, I need to use our firm's custom dependency for ldap operation which has an older spring-ldap ...
1
vote
1
answer
2k
views
Java Ldap: Cannot create an user with password in the Active Directory (LDAP: error code 53 - 0000001F)
I'm trying to create an user with password in the Active Directory installed in a virtual machine.
I have imported the certificate generated from the Active Directory into the JVM that runs in the ...
0
votes
0
answers
8k
views
Unable to bind with active directory
I'm new in this domain and trying to bind with active directory using spring ldap client in java. I have already googled this and tried every given solution on internet but it didn't work for me. I'm ...
0
votes
1
answer
3k
views
How to authenticate to LDAP using Spring LDAP
I'm kind of newbie on Spring Boot and have a Jndi code that authenticates to an LDAP server just fine. But now i want to migrate my code to Spring LDAP, but get [LDAP: error code 49 - 80090308: ...