spring-ldap

How can I get plaintext password from spring-security?

徘徊边缘 提交于 2019-12-19 11:35:19
问题 I use Grails + spring-security + LDAP to authenticate users. The authentication works now but I need the plain text password to authenticate a second service. I tried the SpringSecurityService properties but none contains the password. Do I have to implement my own UserDetailsMapper or does the LdapUserDetailsMapper also provide the mapping of the plain text password retrieved from the web form? 回答1: You can get the credentials from the org.springframework.security.core.context

How can I get plaintext password from spring-security?

社会主义新天地 提交于 2019-12-19 11:35:04
问题 I use Grails + spring-security + LDAP to authenticate users. The authentication works now but I need the plain text password to authenticate a second service. I tried the SpringSecurityService properties but none contains the password. Do I have to implement my own UserDetailsMapper or does the LdapUserDetailsMapper also provide the mapping of the plain text password retrieved from the web form? 回答1: You can get the credentials from the org.springframework.security.core.context

Configure Spring security for Ldap connection

孤人 提交于 2019-12-19 05:25:55
问题 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

How to use Spring Ldap Authentication

梦想与她 提交于 2019-12-19 03:39:14
问题 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=

Spring Boot with Session/Redis Serialization Error with Bad Active Directory Ldap Credentials

爱⌒轻易说出口 提交于 2019-12-17 21:30:58
问题 Hi I am new to Spring and Java, I am trying to implement a Gateway authentication server as described in this tutorial https://spring.io/guides/tutorials/spring-security-and-angular-js/ I got everything working and then tried to implement the authentication against our company Ldap server. It works if I use a valid username and password. When I use invalid credentials the application errors. I am not at work so I don't have the exact error, but it is returning an ldap error (com.sun.jndi.ldap

How to fix my Spring Dependencies in pom.xml

给你一囗甜甜゛ 提交于 2019-12-13 07:26:04
问题 My code compiles, but when I try to execute it, I get the following error: Feb 21, 2014 5:46:33 PM org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring root WebApplicationContext Feb 21, 2014 5:46:33 PM org.apache.catalina.core.StandardContext listenerStart SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read

Grails Spring Security LDAP

会有一股神秘感。 提交于 2019-12-13 04:28:36
问题 I've been banging my head on a wall try to map a grails user authenticated against LDAP to the database Roles and Users in the application. Following the examples in this answer and the documentation. If I don't include the bean ldap auth works, but there are many ties in the GORM to a user for creates and updates. I keep reaching the point where my CustomUserDetails cannot cast to the UserDetails. Message: Cannot cast object 'ldap_username' with class 'package.MdtUserDetails' to class 'org

Openldap and Password policy enforcement not working

自古美人都是妖i 提交于 2019-12-13 04:03:34
问题 I tried to add a password policy to my openldap instance. It's seems like it's not working. This is my setup: Added to slapd.conf: modulepath /usr/lib64/openldap moduleload ppolicy.la access to attrs=userPassword by self write by users read by anonymous auth access to * by * read database bdb suffix "dc=openiam,dc=com" rootdn "cn=Manager,dc=openiam,dc=com" rootpw "{SSHA}2ttRoo/t5HuMT2nPxtI6goVUML5R2H9h" # PPolicy Configuration overlay ppolicy ppolicy_default "cn=default,ou=policies,dc=openiam

Injecting LdapTemplate to return user details inside a Grails service causes Null Pointer Exception

给你一囗甜甜゛ 提交于 2019-12-13 02:52:07
问题 I've been struggling with Spring Security LDAP for a while now, and just when I finally thought I had it beaten into submission, its tripped me up again. The scenario: I'm having users log in using their organisation credentials, which I then check against the internal user database. If they don't exist, I create them locally and then set their local authorities (I can't touch the LDAP server, only authenticate against it - so I can't add the authorities there). This works fine... but I then

java.net.ConnectException: Connection timed out when connecting to ldap

試著忘記壹切 提交于 2019-12-12 19:43:30
问题 i am trying to connect to ldap active directory on windows server 2008 using spring ldap 1.3.1.RELEASE and ldap config is as follows: ldap url is: ldap://dc.fabrikam.com username : administrator password : 123456 - spring ldap configuration is as follows: <bean id="contextSource" class="org.springframework.ldap.core.support.LdapContextSource"> <property name="url" value="ldap://dc.fabrikam.com" /> <property name="base" value="dc=fabrikam,dc=com" /> <property name="userDn" value="CN