diff options
Diffstat (limited to 'src/main/java/org/onap')
-rw-r--r-- | src/main/java/org/onap/cps/ncmp/dmi/config/DmiConfiguration.java | 1 | ||||
-rw-r--r-- | src/main/java/org/onap/cps/ncmp/dmi/config/WebSecurityConfig.java | 15 |
2 files changed, 7 insertions, 9 deletions
diff --git a/src/main/java/org/onap/cps/ncmp/dmi/config/DmiConfiguration.java b/src/main/java/org/onap/cps/ncmp/dmi/config/DmiConfiguration.java index 18b22dbe..83ef6f89 100644 --- a/src/main/java/org/onap/cps/ncmp/dmi/config/DmiConfiguration.java +++ b/src/main/java/org/onap/cps/ncmp/dmi/config/DmiConfiguration.java @@ -81,7 +81,6 @@ public class DmiConfiguration { private void setCustomRequestFactoryToSupportPatch(final RestTemplate restTemplate) { final HttpComponentsClientHttpRequestFactory requestFactory = new HttpComponentsClientHttpRequestFactory(); requestFactory.setConnectTimeout(TIMEOUT); - requestFactory.setReadTimeout(TIMEOUT); restTemplate.setRequestFactory(requestFactory); } }
\ No newline at end of file diff --git a/src/main/java/org/onap/cps/ncmp/dmi/config/WebSecurityConfig.java b/src/main/java/org/onap/cps/ncmp/dmi/config/WebSecurityConfig.java index 11d2ae53..ac92cb4a 100644 --- a/src/main/java/org/onap/cps/ncmp/dmi/config/WebSecurityConfig.java +++ b/src/main/java/org/onap/cps/ncmp/dmi/config/WebSecurityConfig.java @@ -20,14 +20,13 @@ package org.onap.cps.ncmp.dmi.config; -import static org.springframework.security.config.Customizer.withDefaults; - import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.core.userdetails.User; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.provisioning.InMemoryUserDetailsManager; @@ -79,12 +78,12 @@ public class WebSecurityConfig { @SuppressWarnings("squid:S4502") public SecurityFilterChain filterChain(final HttpSecurity http) throws Exception { http - .httpBasic(withDefaults()) - .authorizeRequests() - .requestMatchers(permitUris).permitAll() - .anyRequest().authenticated() - .and() - .csrf((csrf) -> csrf.disable()); + .httpBasic(httpBasicCustomizer -> {}) + .authorizeHttpRequests(authorizeHttpRequestsCustomizer -> { + authorizeHttpRequestsCustomizer.requestMatchers(permitUris).permitAll(); + authorizeHttpRequestsCustomizer.anyRequest().authenticated(); + }) + .csrf(AbstractHttpConfigurer::disable); return http.build(); } |