Skip to content

Commit

Permalink
SSCS-10358 Spring boot 2.7.4 (#2985)
Browse files Browse the repository at this point in the history
* SSCS-10358 Previous Work

Squashed commit of the following:
7c18c4721
commit 3add57d
Author: TeaWithLucas <18538046+TeaWithLucas@users.noreply.github.com>
Date: Tue Nov 8 12:17:20 2022 +0000

docmosis-api-key bootstrap replacement

commit 4618b12
Author: TeaWithLucas <18538046+TeaWithLucas@users.noreply.github.com>
Date: Tue Nov 8 10:22:13 2022 +0000

springframework.security Vunerability Fixes

commit 2ddeaa3
Merge: dd8ef58 4ab0462
Author: ss-evoco <sean.simons@HMCTS.NET>
Date: Tue Nov 8 08:55:19 2022 +0000

Merge branch 'master' into feature/sscs-10358-spring-boot-update

commit dd8ef58
Author: ss-evoco <sean.simons@HMCTS.NET>
Date: Tue Nov 8 08:53:26 2022 +0000

Merge branch 'master' into feature/sscs-10358-spring-boot-update

commit 1b8d88e
Author: TeaWithLucas <18538046+TeaWithLucas@users.noreply.github.com>
Date: Tue Nov 1 13:31:51 2022 +0000

Update dependency-check-suppressions.xml

commit f3f95f7
Author: TeaWithLucas <18538046+TeaWithLucas@users.noreply.github.com>
Date: Tue Nov 1 13:10:42 2022 +0000

Merge branch 'master' into feature/sscs-10358-spring-boot-update

commit 9ce9ecc
Merge: 7f6bbe1 ff827e2
Author: TeaWithLucas <18538046+TeaWithLucas@users.noreply.github.com>
Date: Tue Nov 1 11:07:56 2022 +0000

Merge branch 'master' into feature/sscs-10358-spring-boot-update

commit 7f6bbe1
Merge: 56912f8 870ef61
Author: dattipoeHMCTS <95091179+dattipoeHMCTS@users.noreply.github.com>
Date: Thu Oct 20 12:15:35 2022 +0100

Merge branch 'master' into feature/sscs-10358-spring-boot-update

commit 56912f8
Author: Del Attipoe <delali.attipoe@hmcts.net>
Date: Wed Oct 19 16:56:59 2022 +0100

SSCS-10358 Remove unneeded dependency management sets, remove suppressions.

commit bb6162c
Author: Del Attipoe <delali.attipoe@hmcts.net>
Date: Wed Oct 19 16:48:13 2022 +0100

SSCS-10358 Fix SubmitDraftTest error code.

commit 34adb53
Merge: 51bf8db 379a987
Author: dattipoeHMCTS <95091179+dattipoeHMCTS@users.noreply.github.com>
Date: Wed Oct 19 16:26:38 2022 +0100

Merge branch 'master' into feature/sscs-10358-spring-boot-update

commit 51bf8db
Author: Del Attipoe <delali.attipoe@hmcts.net>
Date: Wed Oct 19 16:26:10 2022 +0100

SSCS-10358 Spring boot 2.7.4, tidying up dependencies.

commit c2a48f6
Author: Del Attipoe <delali.attipoe@hmcts.net>
Date: Wed Oct 19 16:24:51 2022 +0100

SSCS-10358 Springfox -> Springdoc changes.

commit 213952f
Author: Del Attipoe <delali.attipoe@hmcts.net>
Date: Tue Oct 18 14:45:46 2022 +0100

SSCS-10358 Re-enable test.

commit 283448d
Merge: c493e32 5dd97cc
Author: dattipoeHMCTS <95091179+dattipoeHMCTS@users.noreply.github.com>
Date: Tue Oct 18 14:29:39 2022 +0100

Merge branch 'master' into feature/sscs-10358-spring-boot-update

commit c493e32
Author: Del Attipoe <delali.attipoe@hmcts.net>
Date: Tue Oct 18 12:40:44 2022 +0100

SSCS-10358 Change from e2e to functionalTest

commit 321cc69
Author: Del Attipoe <delali.attipoe@hmcts.net>
Date: Tue Oct 18 11:51:57 2022 +0100

SSCS-10358 Temporarily ignore test

commit f5d5e14
Author: Del Attipoe <delali.attipoe@hmcts.net>
Date: Tue Oct 18 11:21:42 2022 +0100

SSCS-10358 Spring boot 2.5.14

commit 278acc0
Author: Del Attipoe <delali.attipoe@hmcts.net>
Date: Tue Oct 18 10:43:45 2022 +0100

Squash

commit 5f86cce
Merge: 7f9c6f2 f7aa02a
Author: Del Attipoe <delali.attipoe@hmcts.net>
Date: Tue Oct 18 09:41:58 2022 +0100

Merge branch 'feature/sscs-10358-spring-boot-update' of https://github.com/hmcts/sscs-tribunals-case-api into feature/sscs-10358-spring-boot-update

commit 7f9c6f2
Author: Del Attipoe <delali.attipoe@hmcts.net>
Date: Tue Oct 18 09:35:36 2022 +0100

SSCS-10358 Upgrade commons text.

commit f7aa02a
Merge: 5375094 8066c46
Author: dattipoeHMCTS <95091179+dattipoeHMCTS@users.noreply.github.com>
Date: Tue Oct 18 09:28:21 2022 +0100

Merge branch 'master' into feature/sscs-10358-spring-boot-update

commit 5375094
Author: Del Attipoe <delali.attipoe@hmcts.net>
Date: Mon Oct 17 17:29:29 2022 +0100

Squash

commit d3cf16b
Author: Del Attipoe <delali.attipoe@hmcts.net>
Date: Mon Oct 17 17:10:40 2022 +0100

SSCS-10358 Fixes after rebase.

commit 899cd07
Merge: 8e68ed7 0bb911c
Author: dattipoeHMCTS <95091179+dattipoeHMCTS@users.noreply.github.com>
Date: Mon Oct 17 16:44:47 2022 +0100

Merge branch 'master' into feature/sscs-10358-spring-boot-update

commit 8e68ed7
Merge: f6d199e 39d2957
Author: Del Attipoe <delali.attipoe@hmcts.net>
Date: Mon Oct 17 16:37:42 2022 +0100

Merge branch 'feature/sscs-10358-spring-boot-update' of https://github.com/hmcts/sscs-tribunals-case-api into feature/sscs-10358-spring-boot-update

commit f6d199e
Author: Del Attipoe <delali.attipoe@hmcts.net>
Date: Mon Oct 17 16:29:09 2022 +0100

SSCS-10358 Rest assured updates.

commit 39d2957
Author: Del Attipoe <delali.attipoe@hmcts.net>
Date: Fri Oct 14 16:51:03 2022 +0100

SSCS-10358 Switch over Keyvault loading mechanism.

commit aad7797
Author: hmcts-jenkins-j-to-z <61242337+hmcts-jenkins-j-to-z[bot]@users.noreply.github.com>
Date: Fri Oct 14 15:13:50 2022 +0000

Bumping chart version/ fixing aliases

commit 79bff36
Author: Del Attipoe <delali.attipoe@hmcts.net>
Date: Fri Oct 14 15:29:14 2022 +0100

SSCS-10358 Netty dependency issues.

commit 6013155
Author: Del Attipoe <delali.attipoe@hmcts.net>
Date: Thu Oct 13 16:35:37 2022 +0100

SSCS-10358 Spring boot 2.4.13

commit 03ffa06
Author: Del Attipoe <delali.attipoe@hmcts.net>
Date: Fri Oct 14 16:51:03 2022 +0100

SSCS-10358 Switch over Keyvault loading mechanism.

commit e70f75d
Author: hmcts-jenkins-j-to-z <61242337+hmcts-jenkins-j-to-z[bot]@users.noreply.github.com>
Date: Fri Oct 14 15:13:50 2022 +0000

Bumping chart version/ fixing aliases

commit 7990029
Author: Del Attipoe <delali.attipoe@hmcts.net>
Date: Fri Oct 14 15:29:14 2022 +0100

SSCS-10358 Netty dependency issues.

commit 20f25e9
Author: Del Attipoe <delali.attipoe@hmcts.net>
Date: Thu Oct 13 16:35:37 2022 +0100

SSCS-10358 Spring boot 2.4.13

Delete adjournCaseCallback.json

* Get tests working

* Refactor CreateBundleAboutToSubmitHandlerFunctionalTest

Co-authored-by: TeaWithLucas <18538046+TeaWithLucas@users.noreply.github.com>
  • Loading branch information
dattipoeHMCTS and TeaWithLucas committed Nov 9, 2022
1 parent 1be3559 commit 51a6df4
Show file tree
Hide file tree
Showing 131 changed files with 318 additions and 474 deletions.
190 changes: 39 additions & 151 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
buildscript {
dependencies {
classpath("net.serenity-bdd:serenity-gradle-plugin:2.6.0")
}
}

plugins {
id 'application'
id 'pmd'
id 'org.sonarqube' version '3.4.0.2513'
id 'jacoco'
id 'org.springframework.boot' version '2.3.5.RELEASE'
id 'org.springframework.boot' version '2.7.5'
id 'uk.gov.hmcts.java' version '0.12.32'
id 'com.gorylenko.gradle-git-properties' version '2.3.1'
id 'com.github.ben-manes.versions' version '0.39.0'
Expand Down Expand Up @@ -68,11 +62,11 @@ sourceSets {
srcDir('src/IntegrationTests/resources')
}
}
e2e {
functionalTest {
java {
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
srcDir('src/e2e/java')
srcDir('src/functionalTest/java')
}
}
contractTest {
Expand All @@ -87,7 +81,7 @@ sourceSets {

dependencies {
integrationTestImplementation(sourceSets.test.output)
e2eImplementation(sourceSets.test.output)
functionalTestImplementation(sourceSets.test.output)
}

tasks.withType(Test) {
Expand All @@ -104,16 +98,29 @@ task integration(type: Test) {
}

task functional(type: Test) {
useJUnitPlatform()
group = 'Functional Tests'
description = 'Executes non-destructive functional tests in AAT against a running CCD and notification service'
setTestClassesDirs(sourceSets.e2e.output.classesDirs)
setClasspath(sourceSets.e2e.runtimeClasspath)
setTestClassesDirs(sourceSets.functionalTest.output.classesDirs)
setClasspath(sourceSets.functionalTest.runtimeClasspath)
include "uk/gov/hmcts/reform/sscs/functional/**"
exclude "uk/gov/hmcts/reform/sscs/smoke/**"
}

task smoke(type: Test) {
group = 'verification'
description = 'Executes non-destructive smoke tests against a running Tribual Case API'
setTestClassesDirs(sourceSets.functionalTest.output.classesDirs)
setClasspath(sourceSets.functionalTest.runtimeClasspath)
include "uk/gov/hmcts/reform/sscs/smoke/**"
exclude "uk/gov/hmcts/reform/sscs/functional/**"
}

task contract(type: Test, description: 'Runs the pact contract tests.', group: 'Verification') {
description = "Runs the consumer Pact tests"
useJUnitPlatform()
testClassesDirs = sourceSets.contractTest.output.classesDirs
classpath = sourceSets.contractTest.runtimeClasspath
}

task fortifyScan(type: JavaExec) {
main = "uk.gov.hmcts.fortifyclient.FortifyClientMainApp"
Expand Down Expand Up @@ -222,127 +229,19 @@ sonarqube {
configurations {
integrationTestImplementation.extendsFrom(testImplementation)
integrationTestRuntimeOnly.extendsFrom(testRuntimeOnly)
e2eImplementation.extendsFrom(testImplementation)
e2eRuntimeOnly.extendsFrom(testRuntimeOnly)
functionalTestImplementation.extendsFrom(testImplementation)
functionalTestRuntimeOnly.extendsFrom(testRuntimeOnly)
contractTestImplementation.extendsFrom(testImplementation)
contractTestRuntimeOnly.extendsFrom(testRuntimeOnly)
}

ext["rest-assured.version"] = '4.2.0'

dependencyManagement {
dependencies {
dependency group: 'commons-beanutils', name: 'commons-beanutils', version: '1.9.4'
dependency group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.17.2'
dependency group: 'org.apache.logging.log4j', name: 'log4j-to-slf4j', version: '2.17.2'

// resolves: CVE-2020-28052
dependency group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.69'
//CVE-2021-40690
dependency group: 'org.apache.santuario', name: 'xmlsec', version: '2.3.0'

// resolves: CVE-2019-10101, CVE-2019-10102, CVE-2019-10103, CVE-2020-15824
dependencySet(group: 'org.jetbrains.kotlin', version: '1.6.10') {
entry 'kotlin-stdlib'
entry 'kotlin-stdlib-common'
entry 'kotlin-stdlib-jdk8'
entry 'kotlin-stdlib-jdk7'
entry 'kotlin-reflect'
}
// CVE-2020-13934, CVE-2020-13935, CVE-2020-17527, CVE-2020-17527,
dependencySet(group: 'org.apache.tomcat.embed', version: '9.0.68') {
entry 'tomcat-embed-core'
entry 'tomcat-embed-el'
entry 'tomcat-annotations-api'
entry 'tomcat-embed-websocket'
}

// CVE-2020-17521
dependencySet(group: 'org.codehaus.groovy', version: '3.0.9') {
entry 'groovy'
entry 'groovy-json'
entry 'groovy-xml'
}

//CVE-2021-22112 CVE-2022-22978, CVE-2022-22976
dependencySet(group: 'org.springframework.security', version: '5.4.10') {
entry 'spring-security-crypto'
entry 'spring-security-config'
entry 'spring-security-core'
entry 'spring-security-web'
}

dependencySet(group: 'org.apache.xmlgraphics', version: '1.14') {
entry 'batik-all'
}

//CVE-2021-22118
dependencySet(group: 'org.springframework', version: '5.2.22.RELEASE') {
entry 'spring-aop'
entry 'spring-aspects'
entry 'spring-beans'
entry 'spring-context'
entry 'spring-context-support'
entry 'spring-core'
entry 'spring-expression'
entry 'spring-jcl'
entry 'spring-jdbc'
entry 'spring-orm'
entry 'spring-tx'
entry 'spring-web'
entry 'spring-webmvc'
}

dependencySet(group: 'io.netty', version: '4.1.79.Final') {
entry 'netty-handler'
entry 'netty-transport-native-epoll'
entry 'netty-transport-native-kqueue'
entry 'netty-codec-http'
entry 'netty-codec-http2'
entry 'netty-codec-socks'
entry 'netty-handler-proxy'
entry 'netty-codec'
entry 'netty-codec-dns'
entry 'netty-transport-native-unix-common'
entry 'netty-transport'
entry 'netty-buffer'
entry 'netty-resolver'
entry 'netty-resolver-dns'
entry 'netty-resolver-dns-native-macos'
entry 'netty-common'
}

//CVE-2021-27568
dependencySet(group: 'net.minidev', version: '2.4.7') {
entry 'json-smart'
entry 'accessors-smart'
}

//CVE-2021-30468
dependencySet(group: 'org.apache.cxf', version: '3.4.5') {
entry 'cxf-core'
entry 'cxf-rt-frontend-jaxrs'
entry 'cxf-rt-rs-client'
entry 'cxf-rt-security'
entry 'cxf-rt-transports-http'
}

//CVE-2021-35515, CVE-2021-35516, CVE-2021-35517, CVE-2021-36090
dependencySet(group: 'org.apache.commons', version: '1.21') {
entry 'commons-compress'
}

//CVE-2022-25857
dependencySet(group: 'org.yaml', version: '1.33') {
entry 'snakeyaml'
}

//CVE-2021-42550
dependencySet(group: 'ch.qos.logback', version: '1.2.11') {
entry 'logback-core'
entry 'logback-classic'
}

//CVE-2020-36518, CVE-2022-42003, CVE-2022-42004
dependencySet(group: 'com.fasterxml.jackson.core', version: '2.13.4') {
entry 'jackson-databind'
Expand All @@ -364,11 +263,8 @@ dependencyManagement {
entry 'jackson-dataformat-smile'
}


dependency group: 'commons-io', name: 'commons-io', version: '2.11.0'

imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:Hoxton.SR12"
mavenBom "org.springframework.cloud:spring-cloud-dependencies:2021.0.4"
}
}
}
Expand All @@ -381,10 +277,16 @@ dependencies {
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-validation'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-mail'

implementation group: 'org.springframework.security', name: 'spring-security-core', version: '5.7.5'
implementation group: 'org.springframework.security', name: 'spring-security-crypto', version: '5.7.5'
implementation group: 'org.springframework.security', name: 'spring-security-config', version: '5.7.5'
implementation group: 'org.springframework.security', name: 'spring-security-web', version: '5.7.5'

implementation group: 'org.springframework.cloud', name: 'spring-cloud-starter-openfeign'
implementation group: 'org.springframework.retry', name: 'spring-retry', version: '1.3.1'

implementation group: 'com.google.guava', name: 'guava', version: '31.0.1-jre'
implementation group: 'org.elasticsearch', name: 'elasticsearch', version: '7.16.3'
implementation group: 'org.elasticsearch', name: 'elasticsearch', version: '7.17.6'

implementation group: 'com.github.hmcts', name: 'service-auth-provider-java-client', version: '4.0.3'
implementation group: 'com.github.hmcts', name: 'idam-java-client', version: '2.1.1'
Expand Down Expand Up @@ -422,7 +324,9 @@ dependencies {
implementation group:'info.solidsoft.gradle.pitest', name: 'gradle-pitest-plugin', version: '1.9.0'
implementation group:'org.codehaus.sonar-plugins', name:'sonar-pitest-plugin', version: '0.5'

testImplementation group: 'io.rest-assured', name: 'rest-assured'
testImplementation group: 'io.rest-assured', name: 'rest-assured', version: '5.2.0'
testImplementation group: 'io.rest-assured', name: 'xml-path', version: '5.2.0'
testImplementation group: 'io.rest-assured', name: 'json-path', version: '5.2.0'
testImplementation group: 'com.github.hmcts', name: 'fortify-client', version: '1.3.0', classifier: 'all', {
exclude group: 'commons-io', module: 'commons-io'
}
Expand All @@ -444,7 +348,7 @@ dependencies {

integrationTestImplementation group: 'commons-io', name: 'commons-io', version: '2.11.0'

e2eImplementation group: 'commons-io', name: 'commons-io', version: '2.11.0'
functionalTestImplementation group: 'commons-io', name: 'commons-io', version: '2.11.0'

implementation group: 'org.projectlombok', name: 'lombok', version: '1.18.24'
annotationProcessor group: 'org.projectlombok', name: 'lombok', version: '1.18.24'
Expand Down Expand Up @@ -473,14 +377,17 @@ dependencies {

testImplementation group: 'org.projectlombok', name: 'lombok', version: '1.18.24'
testAnnotationProcessor group: 'org.projectlombok', name: 'lombok', version: '1.18.24'
e2eImplementation group: 'org.projectlombok', name: 'lombok', version: '1.18.24'
e2eAnnotationProcessor group: 'org.projectlombok', name: 'lombok', version: '1.18.24'
functionalTestImplementation group: 'org.projectlombok', name: 'lombok', version: '1.18.24'
functionalTestAnnotationProcessor group: 'org.projectlombok', name: 'lombok', version: '1.18.24'
integrationTestAnnotationProcessor group: 'org.projectlombok', name: 'lombok', version: '1.18.24'

testImplementation platform(group: 'org.junit', name: 'junit-bom', version: '5.9.1')
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter'
testImplementation group: 'org.junit.vintage', name: 'junit-vintage-engine'

testImplementation group: 'org.assertj', name: 'assertj-core', version: '3.23.1'
// https://mvnrepository.com/artifact/org.awaitility/awaitility
testImplementation group: 'org.awaitility', name: 'awaitility', version: '4.2.0'

//pact contract testing
contractTestImplementation group: 'au.com.dius.pact.consumer', name: 'junit5', version: '4.3.15'
Expand Down Expand Up @@ -536,24 +443,6 @@ pitest {
mutationThreshold = 50
}

task smoke(type: Test) {
group = 'verification'
description = 'Executes non-destructive smoke tests against a running Tribual Case API'
setTestClassesDirs(sourceSets.e2e.output.classesDirs)
setClasspath(sourceSets.e2e.runtimeClasspath)
include "uk/gov/hmcts/reform/sscs/smoke/**"
exclude "uk/gov/hmcts/reform/sscs/functional/**"
}

task contract(type: Test, description: 'Runs the pact contract tests.', group: 'Verification') {
description = "Runs the consumer Pact tests"
useJUnitPlatform()
testClassesDirs = sourceSets.contractTest.output.classesDirs
classpath = sourceSets.contractTest.runtimeClasspath
}



project.ext {
pacticipant = 'sscs_tribunalsCaseApi'
pacticipantVersion = getCheckedOutGitCommitHash()
Expand Down Expand Up @@ -592,7 +481,6 @@ static def getCheckedOutGitCommitHash() {
'git rev-parse --verify --short HEAD'.execute().text.trim()
}

apply plugin: 'org.springframework.boot'
run {
def debug = System.getProperty("debug")
if (debug == 'true') {
Expand Down
34 changes: 22 additions & 12 deletions charts/sscs-tribunals-api/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,34 @@ java:
sscs:
resourceGroup: sscs
secrets:
- sscs-email-mac-secret-text
- idam-oauth-user
- ccd-jid
- ccd-tid
- idam-redirect
- idam-sscs-systemupdate-user
- idam-sscs-systemupdate-password
- idam-sscs-oauth2-client-secret
- sscs-s2s-secret
- s2s-micro
- name: sscs-email-mac-secret-text
alias: SUBSCRIPTIONS_MAC_SECRET
- name: idam-oauth-user
alias: IDAM_OAUTH2_CLIENT_ID
- name: ccd-jid
alias: CORE_CASE_DATA_JURISDICTION_ID
- name: ccd-tid
alias: CORE_CASE_DATA_CASE_TYPE_ID
- name: idam-redirect
alias: IDAM_OAUTH2_REDIRECT_URL
- name: idam-sscs-systemupdate-user
alias: IDAM_SSCS_SYSTEMUPDATE_USER
- name: idam-sscs-systemupdate-password
alias: IDAM_SSCS_SYSTEMUPDATE_PASSWORD
- name: idam-sscs-oauth2-client-secret
alias: IDAM_OAUTH2_CLIENT_SECRET
- name: sscs-s2s-secret
alias: IDAM_S2S_AUTH_TOTP_SECRET
- name: s2s-micro
alias: IDAM_S2S_AUTH_MICROSERVICE
- robotics-email-to
- robotics-email-from
- robotics-email-scottish-to
- appeal-email-to
- appeal-email-from
- docmosis-endpoint
- docmosis-api-key
- name: docmosis-api-key
alias: PDF_SERVICE_ACCESS_KEY
- AppInsightsInstrumentationKey
- name: sscs-servicebus-connection-string-tf
alias: HEARINGS_EVENT_SERVICE_BUS_CONNECTION_STRING
Expand All @@ -42,7 +53,6 @@ java:
PDF_SERVICE_CONVERT_URL: https://docmosis.aat.platform.hmcts.net/rs/convert
PDF_SERVICE_HEALTH_URL: https://docmosis.aat.platform.hmcts.net/rs/status
DOCMOSIS_SERVICE_BASE_URL: https://docmosis.aat.platform.hmcts.net/rs/render
PDF_SERVICE_ACCESS_KEY: ${PDF_SERVICE_ACCESS_KEY}
DOC_ASSEMBLY_URL: "http://dg-docassembly-{{ .Values.global.environment }}.service.core-compute-{{ .Values.global.environment }}.internal"
IDAM_OAUTH2_REDIRECT_URL: "https://evidence-sharing-preprod.sscs.reform.hmcts.net"
PDF_API_URL: "http://rpe-pdf-service-{{ .Values.global.environment }}.service.core-compute-{{ .Values.global.environment }}.internal"
Expand Down

0 comments on commit 51a6df4

Please sign in to comment.