diff --git a/AutomatedTest/Dockerfile b/AutomatedTest/Dockerfile
index c51b006..f0f1e83 100644
--- a/AutomatedTest/Dockerfile
+++ b/AutomatedTest/Dockerfile
@@ -1,4 +1,4 @@
-FROM openjdk:11-jre-slim
+FROM eclipse-temurin:11-jre-jammy
WORKDIR /app
RUN chgrp -R 0 /app && \
diff --git a/AutomatedTest/pom.xml b/AutomatedTest/pom.xml
index 0388a1e..106c4c3 100644
--- a/AutomatedTest/pom.xml
+++ b/AutomatedTest/pom.xml
@@ -3,14 +3,14 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
ca.bc.gov.open.cdds.test
- 1.0.0
+ 1.1
4.0.0
AutomatedTest
org.springframework.boot
spring-boot-starter-parent
- 2.5.12
+ 2.7.3
@@ -39,6 +39,14 @@
org.slf4j
slf4j-log4j12
+
+ thoughtworks
+ xstream
+
+
+ com.google.oauth-client
+ google-oauth-client
+
@@ -82,6 +90,16 @@
org.springframework
spring-webmvc
+
+ com.google.oauth-client
+ google-oauth-client
+ 1.34.1
+
+
+ com.thoughtworks.xstream
+ xstream
+ 1.4.19
+
diff --git a/Dockerfile b/Dockerfile
index b840a9b..d56bbdf 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-FROM openjdk:11-jre-slim
+FROM eclipse-temurin:11-jre-jammy
COPY ./target/cdds-application.jar cdds-application.jar
diff --git a/gitops/openshift/apps/jag-cdds/template/jag-cdds.yaml b/gitops/openshift/apps/jag-cdds/template/jag-cdds.yaml
index 4817654..5c66c10 100644
--- a/gitops/openshift/apps/jag-cdds/template/jag-cdds.yaml
+++ b/gitops/openshift/apps/jag-cdds/template/jag-cdds.yaml
@@ -120,6 +120,16 @@ objects:
secretKeyRef:
name: cdds-application-secrets
key: ORDS_HOST
+ - name: ORDS_USERNAME
+ valueFrom:
+ secretKeyRef:
+ name: cdds-application-secrets
+ key: ORDS_USERNAME
+ - name: ORDS_PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: cdds-application-secrets
+ key: ORDS_PASSWORD
resources:
limits:
cpu: 500m
diff --git a/pom.xml b/pom.xml
index 24be86b..dc7b1ea 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,12 +5,12 @@
org.springframework.boot
spring-boot-starter-parent
- 2.5.12
+ 2.7.9
ca.bc.gov.open
jag-cdds
- 1.0
+ 1.1
jag-cdds
jag-cdds
@@ -191,6 +191,22 @@
+
+
+
+ org.yaml
+ snakeyaml
+ 1.33
+
+
+ com.fasterxml.jackson.core
+ jackson-core
+ 2.14.2
+
+
+
+
+
cdds-application
@@ -311,7 +327,12 @@
+
+ org.owasp
+ dependency-check-maven
+ 7.0.4
+
-
+
\ No newline at end of file
diff --git a/src/main/java/ca/bc/gov/open/cdds/configuration/SoapConfig.java b/src/main/java/ca/bc/gov/open/cdds/configuration/SoapConfig.java
index e444f7f..80db965 100644
--- a/src/main/java/ca/bc/gov/open/cdds/configuration/SoapConfig.java
+++ b/src/main/java/ca/bc/gov/open/cdds/configuration/SoapConfig.java
@@ -12,6 +12,8 @@
import java.util.Map;
import javax.xml.soap.SOAPMessage;
import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
@@ -40,6 +42,11 @@
@Configuration
@Slf4j
public class SoapConfig extends WsConfigurerAdapter {
+ @Value("${cdds.username}")
+ private String username;
+
+ @Value("${cdds.password}")
+ private String password;
public static final String SOAP_NAMESPACE = "http://courts.gov.bc.ca/xml/ns/cdds/v1";
@@ -47,7 +54,7 @@ public class SoapConfig extends WsConfigurerAdapter {
public void addInterceptors(List interceptors) {
// There are 2 versions of schemas to de couple model generation and request validation
// Suffix v means its a validation schema
- var validatingInterceptor1 = interceptor1();
+ // var validatingInterceptor1 = interceptor1();
// interceptors.add(validatingInterceptor1);
}
@@ -100,8 +107,8 @@ public ServletRegistrationBean messageDispatcherServle
}
@Bean
- public RestTemplate restTemplate() {
- RestTemplate restTemplate = new RestTemplate();
+ public RestTemplate restTemplate(RestTemplateBuilder restTemplateBuilder) {
+ var restTemplate = restTemplateBuilder.basicAuthentication(username, password).build();
restTemplate.getMessageConverters().add(0, createMappingJacksonHttpMessageConverter());
return restTemplate;
}
diff --git a/src/main/resources/application-test.yml b/src/main/resources/application-test.yml
index f3d89a1..4f46560 100644
--- a/src/main/resources/application-test.yml
+++ b/src/main/resources/application-test.yml
@@ -5,3 +5,5 @@ security:
cdds:
host: http://127.0.0.1/
namespace: ${CDDS_NAMESPACE}
+ username: ${BASIC_AUTH_USER}
+ password: ${BASIC_AUTH_PASS}
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index 3101bd1..1dedf4c 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -5,6 +5,8 @@ security:
cdds:
host: ${ORDS_HOST}
namespace: ${CDDS_NAMESPACE}
+ username: ${ORDS_USERNAME}
+ password: ${ORDS_PASSWORD}
management:
trace:
http: