spring-ldap

Spring LDAP returns same and incorrect objectSid

假装没事ソ 提交于 2019-12-11 07:17:07
问题 In my Spring web application I am unable to retrive the correct objectId from currently logged in user with the Active Directory account. All of attributes seems to have the right value, but the objectId value is always set to S-1-5-21-1723711471-3183472479-4012130053-3220159935 and I don't know where it comes from. WebSecurityConfig @Configuration @EnableWebSecurity public class WebSecurityConfig extends WebSecurityConfigurerAdapter { @Override protected void configure(HttpSecurity http)

Spring LDAP - How to manage encoded (SHA) password

瘦欲@ 提交于 2019-12-11 04:08:26
问题 I want to implement a basic user repository using Spring LDAP and it's concept of Object-Directory Mapping (ODM). My User class is pretty straightforward : @Entry(objectClasses = { "inetOrgPerson", "organizationalPerson", "person", "shadowAccount", "top" }, base = "ou=people") public class User { [...] @Id private Name dn; @Attribute(name = "uid") @DnAttribute(value = "uid") private String username; @Attribute(name = "cn") private String fullName; @Attribute(name = "givenName") private String

Spring LDAP PoolingContextSource via annotation

橙三吉。 提交于 2019-12-11 02:28:29
问题 I was trying to convert the Spring LDAP PoolingContextSource XML configuration to use annotation. I am able to get the LdapContextSource working by following the one mention here, but I can't get the PoolingContextSource working. When I ran the code, I got NullPointerException. XML, annotation and exception snippet are listed below. XML configuration snippet, <ldap:context-source id="ldapContextSource" username="${ldap.username}" password="${ldap.password}" url="${ldap.url}" base="${ldap.base

how to delete all entries ldap java

核能气质少年 提交于 2019-12-11 01:55:21
问题 I have an application in Java, using Spring LDAP and Java Naming. The problem is when I delete a branch that contains entries. example: root | |----A | | | |--A1 | | | |----A2 | | | |---A3 | | |-----B When I try to delete the branch A, sends me the following exception: [LDAP: error code 66 - subordinate objects must be deleted first] Please help me! thank you! Greetings.! 回答1: If you are using Spring LDAP, you should be able to accomplish this using LdapTemplate#unbind method that takes

active directory filter with objectGUID encoded as specified in rfc2254 doesn't work

只愿长相守 提交于 2019-12-10 18:43:36
问题 I'm using java ldap to access active directory, more specifically spring ldap. a group search by objectGUID yields no results when the filter is encoded as specified in rfc2254. this is the guid in its hex representation: \49\00\f2\58\1e\93\69\4b\ba\5f\8b\86\54\e9\d8\e9 spring ldap encodes the filter like that: (&(objectClass=group)(objectGUID=\5c49\5c00\5cf2\5c58\5c1e\5c93\5c69\5c4b\5cba\5c5f\5c8b\5c86\5c54\5ce9\5cd8\5ce9)) as mentioned in rfc2254 and in microsoft technet: the character must

Why does Spring LDAP's LdapTemplate not return title, department & company attributes?

梦想与她 提交于 2019-12-10 12:59:47
问题 I'm using spring-ldap-core-2.3.1.RELEASE.jar over JDK 1.8 & Tomcat 8.0 to access AD information through LdapTemplate . The attributes such as title , department & company are not being returned by the ldapTemplate.search(..,.,..) method. I'm using the following lines of code to search :- LdapQuery ldapQuery = LdapQueryBuilder.query() .where("objectclass").is("user") .and("objectcategory").is("person") .and("cn").like(strWildcardText+"*"); ldapTemplate.search(ldapQuery, new

Spring LDAP Template Usage

夙愿已清 提交于 2019-12-10 10:26:24
问题 Please take a look at the test class below. I am trying to do an LDAP search with Spring LDAP Template. I am able to search and produce a list of entries corresponding to the search criteria without the Spring LDAP template by using the DirContext as shown in the method searchWithoutTemplate(). But when I use a LdapTemplate, I end up with a NPE as shown further below. I am sure I must be missing something. Can someone help please? import java.util.Hashtable; import javax.naming.Context;

Spring Boot / Spring LDAP Get List of memberof for a User

孤人 提交于 2019-12-09 06:54:59
问题 I want to get a list of a users attributes by querying on their ID from an LDAP repository structured like below dn: uid=E000001 ,ou=People,o=Company,o=Internal cn: BOB DOLE statusid: active memberof: cn=foo_group, cn=Foos, ou=Groups, o=Company,o=Internal memberof: cn=bar_group, cn=Foos, ou=Groups, o=Company,o=Internal dn: uid=E000002 ,ou=People,o=Company,o=Internal cn: MARK TEST statusid: active memberof: cn=foo_group, cn=Foos, ou=Groups, o=Company,o=Internal memberof: cn=bar_group, cn=Foos,

Spring 5 LDAP Authentication and JWT Token as response

让人想犯罪 __ 提交于 2019-12-08 02:27:37
问题 Hello i have been trying to configure spring to have it return JWT token if user/pass is authenticated to LDAP Server; Consider the use case below ; On the above diagram, i have configured WebSecurity to check/filter out requests with Bearer. See code below WebSecurityConfig.java @Configuration @EnableWebSecurity public class WebSecurityConfig extends WebSecurityConfigurerAdapter { @Autowired private JwtAuthenticationEntryPoint unauthorizedHandler; @Autowired JwtAuthorizationTokenFilter

Spring LDAP and Spring Boot configuration

元气小坏坏 提交于 2019-12-08 01:36:59
问题 I have educational problem: There are virtual machine with windows server 2003 (AD) with users and their passwords. Connection to the machine is established (ip:192.168.56.101:389). The purpose of the web application is to enable the user to change his password in AD. Problem: can't configure connection to windws server 2003. I started from this tutorial https://spring.io/guides/gs/authenticating-ldap/ When I try to log in as "Jack Wood" and pass "1234" I got error. org.springframework