Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/1.1 #50

Merged
merged 13 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AutomatedTest/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM openjdk:11-jre-slim
FROM eclipse-temurin:11-jre-jammy

WORKDIR /app
RUN chgrp -R 0 /app && \
Expand Down
22 changes: 20 additions & 2 deletions AutomatedTest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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">
<groupId>ca.bc.gov.open.cdds.test</groupId>
<version>1.0.0</version>
<version>1.1</version>
<modelVersion>4.0.0</modelVersion>

<artifactId>AutomatedTest</artifactId>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.5.12</version>
<version>2.7.3</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
Expand Down Expand Up @@ -39,6 +39,14 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
<exclusion>
<groupId>thoughtworks</groupId>
<artifactId>xstream</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.oauth-client</groupId>
<artifactId>google-oauth-client</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down Expand Up @@ -82,6 +90,16 @@
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
</dependency>
<dependency>
<groupId>com.google.oauth-client</groupId>
<artifactId>google-oauth-client</artifactId>
<version>1.34.1</version>
</dependency>
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>1.4.19</version>
</dependency>
</dependencies>

<build>
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM openjdk:11-jre-slim
FROM eclipse-temurin:11-jre-jammy

COPY ./target/cdds-application.jar cdds-application.jar

Expand Down
10 changes: 10 additions & 0 deletions gitops/openshift/apps/jag-cdds/template/jag-cdds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
27 changes: 24 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.5.12</version>
<version>2.7.9</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>ca.bc.gov.open</groupId>
<artifactId>jag-cdds</artifactId>
<version>1.0</version>
<version>1.1</version>
<name>jag-cdds</name>
<description>jag-cdds</description>
<properties>
Expand Down Expand Up @@ -191,6 +191,22 @@
</dependency>
</dependencies>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>1.33</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.14.2</version>
</dependency>

</dependencies>
</dependencyManagement>

<build>
<finalName>cdds-application</finalName>
<plugins>
Expand Down Expand Up @@ -311,7 +327,12 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<version>7.0.4</version>
</plugin>
</plugins>
</build>

</project>
</project>
13 changes: 10 additions & 3 deletions src/main/java/ca/bc/gov/open/cdds/configuration/SoapConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -40,14 +42,19 @@
@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";

@Override
public void addInterceptors(List<EndpointInterceptor> 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);
}

Expand Down Expand Up @@ -100,8 +107,8 @@ public ServletRegistrationBean<MessageDispatcherServlet> 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;
}
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/application-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ security:
cdds:
host: http://127.0.0.1/
namespace: ${CDDS_NAMESPACE}
username: ${BASIC_AUTH_USER}
password: ${BASIC_AUTH_PASS}
2 changes: 2 additions & 0 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ security:
cdds:
host: ${ORDS_HOST}
namespace: ${CDDS_NAMESPACE}
username: ${ORDS_USERNAME}
password: ${ORDS_PASSWORD}
management:
trace:
http:
Expand Down
Loading