summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/onap/cps/ncmp/dmi/config
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/onap/cps/ncmp/dmi/config')
-rw-r--r--src/main/java/org/onap/cps/ncmp/dmi/config/DmiPluginConfig.java4
-rw-r--r--src/main/java/org/onap/cps/ncmp/dmi/config/WebSecurityConfig.java9
2 files changed, 7 insertions, 6 deletions
diff --git a/src/main/java/org/onap/cps/ncmp/dmi/config/DmiPluginConfig.java b/src/main/java/org/onap/cps/ncmp/dmi/config/DmiPluginConfig.java
index 6106c6af..fb22b358 100644
--- a/src/main/java/org/onap/cps/ncmp/dmi/config/DmiPluginConfig.java
+++ b/src/main/java/org/onap/cps/ncmp/dmi/config/DmiPluginConfig.java
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021-2022 Nordix Foundation
+ * Copyright (C) 2021-2023 Nordix Foundation
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@
package org.onap.cps.ncmp.dmi.config;
import lombok.Getter;
-import org.springdoc.core.GroupedOpenApi;
+import org.springdoc.core.models.GroupedOpenApi;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
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 1eb9523d..11d2ae53 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,6 +20,8 @@
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;
@@ -77,13 +79,12 @@ public class WebSecurityConfig {
@SuppressWarnings("squid:S4502")
public SecurityFilterChain filterChain(final HttpSecurity http) throws Exception {
http
- .httpBasic()
- .and()
+ .httpBasic(withDefaults())
.authorizeRequests()
- .antMatchers(permitUris).permitAll()
+ .requestMatchers(permitUris).permitAll()
.anyRequest().authenticated()
.and()
- .csrf().disable();
+ .csrf((csrf) -> csrf.disable());
return http.build();
}