spring-ldap

Use different AuthenticationProvider depending on username and remote IP address

让人想犯罪 __ 提交于 2019-12-02 02:25:35
问题 In a Spring Security 3.2 based application I need to authenticate users against two different providers, based on a certain pattern in their username AND their remote ip address. In case they match certain rules, they should be authenticated against an ActiveDirectoryLdapAuthenticationProvider , otherwise with a standard AuthenticationProvider using an already exisiting custom implementation of UserDetailsService . What do I need to extend ? AuthenticationManager or AuthenticationProvider ?

spring ldap 2.0.1 replacing deprecated OdmManager

核能气质少年 提交于 2019-12-01 21:00:58
It seems in Spring LDAP 2.x, that the OdmManager facility is deprecated, as most odm-like things can be done by ldapTemplate, which is true. But the OdmManager has the ability to inject a ConverterManager which can be told about your custom type conversions. What is the equivalent method for using ldapTemplate for odm-like (ConverterManager) operations ? If there is not an equivalent system in ldapTemplate, should it : implicitly detect custom classes with single string constructors and String toString() class methods, iff they exist as properties to be mapped to/from ldap attributes.

How to integrate an LDAP user with the PERSON table created by Spring Security in Grails?

人盡茶涼 提交于 2019-12-01 12:08:32
We are creating a grails aplication where we want the user to log in using their Active Directory credentials. Additionally, we want to give the business owner of this application the ability to control who has access to certain links (actions). Because of this we are using the following plugins in our grails application: Spring Security Core Spring Security LDAP Spring Security UI Because we want to empower the business user to create customized roles with certain permissions(actions) on the fly when necessary, we think that the best Spring Security Configuration is the Requestmap database

How to integrate an LDAP user with the PERSON table created by Spring Security in Grails?

心不动则不痛 提交于 2019-12-01 11:18:44
问题 We are creating a grails aplication where we want the user to log in using their Active Directory credentials. Additionally, we want to give the business owner of this application the ability to control who has access to certain links (actions). Because of this we are using the following plugins in our grails application: Spring Security Core Spring Security LDAP Spring Security UI Because we want to empower the business user to create customized roles with certain permissions(actions) on the

Integration tests with spring-security and ldap

僤鯓⒐⒋嵵緔 提交于 2019-12-01 06:31:31
Spring embedded ldap server in unit tests is similar, however no answer was given that suites me. I can run my integration tests with spring and the embedded ldap server of spring-security without any problems. However, I haven't find a way yet to clear the embedded ldap server and load the ldif again to provide a common test environment. LdapTestUtils of spring-ldap provides a cleanAndSetup() method. However, this does not work with the suggested version (1.5.5) of apache-ds, as LdifFileLoader now requires a CoreSession instead of the DirContext provided by LdapTestUtils. This causes a java

Integration tests with spring-security and ldap

时间秒杀一切 提交于 2019-12-01 04:07:01
问题 Spring embedded ldap server in unit tests is similar, however no answer was given that suites me. I can run my integration tests with spring and the embedded ldap server of spring-security without any problems. However, I haven't find a way yet to clear the embedded ldap server and load the ldif again to provide a common test environment. LdapTestUtils of spring-ldap provides a cleanAndSetup() method. However, this does not work with the suggested version (1.5.5) of apache-ds, as

Configure Spring security for Ldap connection

风格不统一 提交于 2019-12-01 03:34:48
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 are: ldaps://vldp.floal:636/CN=ProxyUsers,CN=fdam,DC=fg,DC=local So I use this setting: @Autowired public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception{ auth.ldapAuthentication() .contextSource() .url("ldaps://vldp.floal:636/DC=fg,DC=local") .managerDn("CN=A0XXX32,CN=Administration,CN=fdam,DC=fg,DC=local") .managerPassword(password) .and() .userSearchBase("CN

How to add LDAP cache in Spring LDAP?

大憨熊 提交于 2019-12-01 02:42:12
问题 I want to cache LDAP user data locally to allow faster queries. Do the Spring LDAP offers such a functionality? How can I do this? I am using Spring Security 3.1 and Spring LDAP 1.3.1 for authentication and authorization. It would be nice to have a cache for LDAP using built-in mechanism if exists.. Spring LDAP configuration: applicationContext-ldap.xml: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001

How to use Spring Ldap Authentication

非 Y 不嫁゛ 提交于 2019-11-30 23:34:29
In my current project, I have to implement LDAP authentication. I am using JSF 2.2, primefaces and Spring 4.0 and spring-ldap-core 1.3.2 and spring-security-ldap-3.2.0. Below are the work till now I have done to achieve: Spring-Ldap.xml <bean id="contextSource" class="org.springframework.ldap.core.support.LdapContextSource"> <property name="url" value="ldap://mumcXXXXXXX" /> <property name="base" value="dc=ad,dc=XXX,dc=com"/> <property name="userDn" value="XXXX@ad.XXX.com" /> <property name="password" value="XXXX" /> </bean> <bean id="ldapTemplate" class="org.springframework.ldap.core

using spring-ldap with ssl

不羁的心 提交于 2019-11-30 13:26:50
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? helios Check out Spring LDAP documentation for connecting to LDAP server over HTTP(S): As far as self signed certificate is concerned, you can import certificate chain into a truststore and set the following VM arguments: -Djavax.net.ssl.trustStore="<path to truststore file>" -Djavax.net.ssl.trustStorePassword="<passphrase for truststore>" or override the truststore at runtime like: System.setProperty(