From 07e649c8f606f0d57bc2bafc4ddcac5d7202b526 Mon Sep 17 00:00:00 2001 From: xdurvak Date: Tue, 12 Jun 2018 16:39:38 +0530 Subject: [PATCH] Removed based64 encryption mechanism for ldap manager password (#105) --- CHANGELOG.md | 3 +++ build.gradle | 2 +- .../eiffel/remrem/generate/config/SecurityConfig.java | 9 +-------- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cdbb7d8d..b733a206 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 0.10.0 +- Removed based64 encryption mechanism for ldap manager password + ## 0.9.9 - - Added jasypt-spring-boot-starter dependency to support open text encryption diff --git a/build.gradle b/build.gradle index 3533cffe..e9ec177a 100644 --- a/build.gradle +++ b/build.gradle @@ -54,7 +54,7 @@ subprojects { targetCompatibility = 1.8 //Latest version for generate - version = "0.9.9" + version = "0.10.0" repositories { mavenCentral() diff --git a/service/src/main/java/com/ericsson/eiffel/remrem/generate/config/SecurityConfig.java b/service/src/main/java/com/ericsson/eiffel/remrem/generate/config/SecurityConfig.java index 3df833e5..5086f417 100644 --- a/service/src/main/java/com/ericsson/eiffel/remrem/generate/config/SecurityConfig.java +++ b/service/src/main/java/com/ericsson/eiffel/remrem/generate/config/SecurityConfig.java @@ -14,8 +14,6 @@ */ package com.ericsson.eiffel.remrem.generate.config; -import org.apache.commons.codec.binary.Base64; -import org.apache.commons.codec.binary.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Value; @@ -60,7 +58,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter { protected void configure(AuthenticationManagerBuilder auth) throws Exception { LOGGER.debug("LDAP server url: "+ldapUrl); auth.ldapAuthentication().userSearchFilter(userSearchFilter).contextSource().managerDn(managerDn).root(rootDn) - .managerPassword(decode(managerPassword)).url(ldapUrl); + .managerPassword(managerPassword).url(ldapUrl); } @Override @@ -71,9 +69,4 @@ protected void configure(HttpSecurity http) throws Exception { } - // To decrypt Base64 encode ldap manager password - private String decode(String password) { - return StringUtils.newStringUtf8(Base64.decodeBase64(password)); - } - }