aboutsummaryrefslogtreecommitdiffstats
path: root/common/src/main/java/org
diff options
context:
space:
mode:
authorPiotr Borelowski <p.borelowski@partner.samsung.com>2020-02-05 19:01:45 +0100
committerPiotr Borelowski <p.borelowski@partner.samsung.com>2020-02-07 08:14:26 +0000
commit2110c52f8c84cd9330da668a43e00e34f645f867 (patch)
tree7b2e7c4ef8942b737dc9d090146ab8fe91520f42 /common/src/main/java/org
parente3871f1bd6e8d8c8baa093d1307b029527603302 (diff)
Changed Basic Authorization in receiving Notification
Ve-Vnfm (SOL002) Adapter project Issue-ID: SO-2574 Signed-off-by: Piotr Borelowski <p.borelowski@partner.samsung.com> Change-Id: I95dfebd0e024af91b9bac4d8a4bb97d271badc70
Diffstat (limited to 'common/src/main/java/org')
-rw-r--r--common/src/main/java/org/onap/so/security/SoBasicWebSecurityConfigurerAdapter.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/common/src/main/java/org/onap/so/security/SoBasicWebSecurityConfigurerAdapter.java b/common/src/main/java/org/onap/so/security/SoBasicWebSecurityConfigurerAdapter.java
index c778dde9af..21176e0d5d 100644
--- a/common/src/main/java/org/onap/so/security/SoBasicWebSecurityConfigurerAdapter.java
+++ b/common/src/main/java/org/onap/so/security/SoBasicWebSecurityConfigurerAdapter.java
@@ -28,6 +28,8 @@ import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.builders.WebSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
+import org.springframework.security.core.userdetails.UserDetailsService;
+import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.web.firewall.StrictHttpFirewall;
import org.springframework.util.StringUtils;
@@ -44,6 +46,12 @@ public class SoBasicWebSecurityConfigurerAdapter extends WebSecurityConfigurerAd
@Autowired
private SoUserCredentialConfiguration soUserCredentialConfiguration;
+ @Autowired
+ private UserDetailsService userDetailsService;
+
+ @Autowired
+ private BCryptPasswordEncoder passwordEncoder;
+
@Override
protected void configure(final HttpSecurity http) throws Exception {
http.csrf().disable().authorizeRequests().antMatchers("/manage/health", "/manage/info").permitAll()
@@ -61,8 +69,6 @@ public class SoBasicWebSecurityConfigurerAdapter extends WebSecurityConfigurerAd
@Override
protected void configure(final AuthenticationManagerBuilder auth) throws Exception {
- auth.userDetailsService(soUserCredentialConfiguration.userDetailsService())
- .passwordEncoder(soUserCredentialConfiguration.passwordEncoder());
+ auth.userDetailsService(userDetailsService).passwordEncoder(passwordEncoder);
}
-
}