diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/pom.xml | 2 | ||||
-rw-r--r-- | common/src/main/java/org/onap/so/security/SoBasicWebSecurityConfigurerAdapter.java | 12 |
2 files changed, 10 insertions, 4 deletions
diff --git a/common/pom.xml b/common/pom.xml index 51415af446..529841da72 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -59,7 +59,7 @@ <dependency> <groupId>org.onap.aai.schema-service</groupId> <artifactId>aai-schema</artifactId> - <version>1.6.3-SNAPSHOT</version> + <version>1.6.3</version> </dependency> <dependency> <groupId>org.modelmapper</groupId> 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); } - } |