summaryrefslogtreecommitdiffstats
path: root/cps-application/src/main
diff options
context:
space:
mode:
authorToine Siebelink <toine.siebelink@est.tech>2023-09-18 14:54:22 +0000
committerGerrit Code Review <gerrit@onap.org>2023-09-18 14:54:22 +0000
commita01f8861a84931f4bdf2d69fa05a793afabc22e0 (patch)
tree566994ff310bf2eb55e32ee7827faeab46373805 /cps-application/src/main
parentb45c80995966be243a79bedefa25f6c05f64a2d6 (diff)
parent9693ec51cf6526082f0ad0c3ad208d144cbbb163 (diff)
Merge "Migrate CPS to Spring-boot 3.0"
Diffstat (limited to 'cps-application/src/main')
-rw-r--r--cps-application/src/main/java/org/onap/cps/config/WebSecurityConfig.java6
-rw-r--r--cps-application/src/main/resources/application.yml2
2 files changed, 4 insertions, 4 deletions
diff --git a/cps-application/src/main/java/org/onap/cps/config/WebSecurityConfig.java b/cps-application/src/main/java/org/onap/cps/config/WebSecurityConfig.java
index aedc6a8d66..c8b2509637 100644
--- a/cps-application/src/main/java/org/onap/cps/config/WebSecurityConfig.java
+++ b/cps-application/src/main/java/org/onap/cps/config/WebSecurityConfig.java
@@ -54,7 +54,7 @@ public class WebSecurityConfig {
* @param password password
*/
public WebSecurityConfig(
- @Autowired @Value("${security.permit-uri}") final String permitUris,
+ @Autowired @Value("${permit-uri}") final String permitUris,
@Autowired @Value("${security.auth.username}") final String username,
@Autowired @Value("${security.auth.password}") final String password
) {
@@ -80,8 +80,8 @@ public class WebSecurityConfig {
http
.httpBasic()
.and()
- .authorizeRequests()
- .antMatchers(permitUris).permitAll()
+ .authorizeHttpRequests()
+ .requestMatchers(permitUris).permitAll()
.anyRequest().authenticated()
.and()
.csrf().disable();
diff --git a/cps-application/src/main/resources/application.yml b/cps-application/src/main/resources/application.yml
index 58748271cc..016356801d 100644
--- a/cps-application/src/main/resources/application.yml
+++ b/cps-application/src/main/resources/application.yml
@@ -140,10 +140,10 @@ springdoc:
- name: cps-ncmp-inventory
url: /api-docs/cps-ncmp/openapi-inventory.yaml
+permit-uri: /manage/**,/swagger-ui.html,/swagger-ui/**,/swagger-resources/**,/api-docs/**
security:
# comma-separated uri patterns which do not require authorization
- permit-uri: /manage/**,/swagger-ui.html,/swagger-ui/**,/swagger-resources/**,/api-docs/**
auth:
username: ${CPS_USERNAME}
password: ${CPS_PASSWORD}