summaryrefslogtreecommitdiffstats
path: root/cps-application
diff options
context:
space:
mode:
authoregernug <gerard.nugent@est.tech>2023-07-26 10:36:15 +0100
committeregernug <gerard.nugent@est.tech>2023-09-14 10:47:51 +0100
commit9693ec51cf6526082f0ad0c3ad208d144cbbb163 (patch)
treeb3e0c1a0506bcb6d17687f353448e41c092fb964 /cps-application
parentbf8997853d7759383303b07bbeb780ca73428536 (diff)
Migrate CPS to Spring-boot 3.0
Issue-ID: CPS-1789 Signed-off-by: egernug <gerard.nugent@est.tech> Change-Id: I932fca8a50cedf2ae0604401c5e2b27896e4d449
Diffstat (limited to 'cps-application')
-rwxr-xr-xcps-application/pom.xml13
-rw-r--r--cps-application/src/main/java/org/onap/cps/config/WebSecurityConfig.java6
-rw-r--r--cps-application/src/main/resources/application.yml2
3 files changed, 15 insertions, 6 deletions
diff --git a/cps-application/pom.xml b/cps-application/pom.xml
index e8869707ce..15868b1596 100755
--- a/cps-application/pom.xml
+++ b/cps-application/pom.xml
@@ -40,6 +40,7 @@
<minimum-coverage>0.86</minimum-coverage>
<base.image>${docker.pull.registry}/onap/integration-java17:12.0.0</base.image>
<image.tag>${project.version}-${maven.build.timestamp}</image.tag>
+ <jakarta-servlet.version>5.0.0</jakarta-servlet.version>
</properties>
<dependencies>
@@ -70,8 +71,8 @@
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>
<dependency>
- <groupId>org.springframework.cloud</groupId>
- <artifactId>spring-cloud-starter-sleuth</artifactId>
+ <groupId>io.micrometer</groupId>
+ <artifactId>micrometer-tracing-bridge-brave</artifactId>
</dependency>
<!-- T E S T D E P E N D E N C I E S -->
<dependency>
@@ -118,6 +119,14 @@
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-xml</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-server</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>jakarta.servlet</groupId>
+ <artifactId>jakarta.servlet-api</artifactId>
+ </dependency>
</dependencies>
<build>
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 6aefda9c39..f656554877 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}