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

v2 rc1 #375

Merged
merged 30 commits into from
Jun 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
e4e3f46
Adding support for multiple affinity cookies (#331)
nikola-naydenov-hmcts Mar 12, 2020
10c55e5
SIDM-2686 - Cross browser tests (#333)
henrydobson Mar 12, 2020
a8d7a0c
Welsh language (#334)
Mar 25, 2020
9373d04
Add locale passing interceptor.
Mar 27, 2020
39b5079
Inject LocalePassingInterceptor to the global REST Template.
Mar 17, 2020
38efe85
Ignore other local profiles.
Mar 27, 2020
7de33c7
Extend the locale cookie expiration.
Mar 27, 2020
985683d
Increase the cookie expiration to 10 years.
Mar 27, 2020
3a0d814
Merge branch 'preview' into SIDM-3932_idm_notifications
Mar 27, 2020
4c8a13e
Cleanup debug code.
Mar 30, 2020
57b3729
Don't overwrite the language header set in another thread in the inte…
Mar 30, 2020
e26b392
SIDM-3353 Create password - add additional guidance text. (#337)
dfourn Mar 31, 2020
07819f6
Improve test coverage. (#347)
Apr 1, 2020
f447d72
More test coverage for Welsh. (#348)
Apr 1, 2020
9ffe97d
SIDM-3977 Add test to check if activation link can be used after the …
dfourn Apr 6, 2020
a8c0c04
COVID-19 Contact Us pages changes (post Welsh) (#350)
Apr 9, 2020
572105a
Sidm 3831 externalise text (#342)
Apr 9, 2020
e4ee728
SIDM-3831 Fix Welsh translations. (#355)
Apr 15, 2020
b8aca08
SIDM-3582 SIDM-3404 Account Activation link expired screen (#354)
dfourn Apr 15, 2020
147db73
Welsh - fix AKS languages (#357)
Apr 16, 2020
15bb408
Sidm 4015 welsh functional tests (#352)
Apr 21, 2020
2767c79
Merge demo to preview after merging master to demo (#365)
Apr 29, 2020
7ca98bb
add login with pin test (#361)
shravanmechineni Apr 30, 2020
179fc13
Fix CVE-2020-9488 vulnerability. (#367)
May 13, 2020
3ada921
Make /activate POST request redirect to a GET endpoint that can have …
May 15, 2020
fdf66bc
Sidm 4120 welsh post requests (#368)
May 18, 2020
e55dffb
Sidm 4120 welsh post requests (#370)
May 18, 2020
e44e3bc
V2 1 intermediary master bfg (#374)
henrydobson Jun 8, 2020
484ef14
Merge branch 'master' into v2-rc1-preview
henrydobson Jun 8, 2020
b703273
chore(prod blocker): add blocker
henrydobson Jun 8, 2020
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
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ build
out
output/

**/application-local.yaml
**/application-local*.yaml

### VS Code ###
bin
Expand All @@ -39,4 +39,7 @@ bin

### Helm ###
**/charts/*.tgz
charts/*/requirements.lock
charts/*/requirements.lock

### Jenkins Additions ###
init.gradle
5 changes: 4 additions & 1 deletion Jenkinsfile_CNP
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ static LinkedHashMap<String, Object> secret(String secretName, String envVar) {
withPipeline(type, product, component) {
loadVaultSecrets(secrets)
enableSlackNotifications('#idam_tech')
installCharts()
enableAksStagingDeployment()
disableLegacyDeployment()

Expand Down Expand Up @@ -189,4 +188,8 @@ withPipeline(type, product, component) {
reportName : "IDAM Web Public E2E functional tests result"
]
}

before('buildinfra:idam-prod') {
error('Stopping pipeline before Prod stages')
}
}
51 changes: 25 additions & 26 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
id 'io.spring.dependency-management' version '1.0.9.RELEASE' apply false
id 'org.owasp.dependencycheck' version '5.1.1'
id 'org.sonarqube' version '2.6.2'
id 'org.springframework.boot' version '2.2.4.RELEASE' apply false
id 'org.springframework.boot' version '2.2.6.RELEASE' apply false
id 'com.gorylenko.gradle-git-properties' version '1.4.21'
id "info.solidsoft.pitest" version "1.3.0"
id 'pmd'
Expand All @@ -17,7 +17,7 @@ gitProperties {
dateFormat = "yyyy-MM-dd HH:mm:ssZ"
}

allprojects {
allprojects {
apply plugin: 'java'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'org.owasp.dependencycheck'
Expand All @@ -31,8 +31,7 @@ allprojects {
sourceCompatibility = 1.8
targetCompatibility = 1.8

def idamBomVersion = '1.9.7'
ext['tomcat.version'] = '9.0.31'
def idamBomVersion = '2.1.0'

dependencyManagement {
imports {
Expand All @@ -43,7 +42,7 @@ allprojects {
repositories {
mavenCentral()
maven {
url "https://dl.bintray.com/hmcts/hmcts-maven"
url "https://dl.bintray.com/hmcts/hmcts-maven"
}
jcenter()
}
Expand All @@ -66,18 +65,18 @@ allprojects {
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-web'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-security'
// TODO: remove version once 2.2.2.RELEASE is out
implementation (group: 'org.springframework.cloud', name: 'spring-cloud-starter-netflix-zuul', version: '2.2.1.RELEASE') {
implementation(group: 'org.springframework.cloud', name: 'spring-cloud-starter-netflix-zuul', version: '2.2.1.RELEASE') {
exclude(module: 'rxnetty-contexts')
exclude(module: 'rxnetty-servo')
exclude(module: 'rxnetty')
}
implementation group: 'org.springframework.security', name: 'spring-security-taglibs'

compileOnly("org.projectlombok:lombok")

annotationProcessor("org.projectlombok:lombok")
annotationProcessor "org.springframework.boot:spring-boot-configuration-processor"

implementation group: 'javax.servlet', name: 'jstl'
implementation group: 'javax.json', name: 'javax.json-api'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind'
Expand All @@ -92,22 +91,21 @@ allprojects {
implementation group: 'org.pitest', name: 'pitest', version: '1.3.2'
implementation group: 'org.owasp.encoder', name: 'encoder-jsp', version: '1.2.2'
implementation group: 'info.solidsoft.gradle.pitest', name: 'gradle-pitest-plugin', version: '1.3.0'
implementation group: 'org.codehaus.sonar-plugins', name:'sonar-pitest-plugin', version: '0.5'
implementation group: 'org.codehaus.sonar-plugins', name: 'sonar-pitest-plugin', version: '0.5'
implementation group: 'uk.gov.hmcts.reform', name: 'properties-volume-spring-boot-starter', version: '0.0.4'
implementation group: 'uk.gov.hmcts.reform', name: 'health-spring-boot-starter', version: '0.0.4'

// TODO mockito version is not correctly resolved from IdAM BOM. Remove version when this is fixed
testCompileOnly("org.projectlombok:lombok")

testAnnotationProcessor("org.projectlombok:lombok")

testImplementation group: 'org.mockito', name: 'mockito-core'
testImplementation group: 'org.springframework.boot', name: 'spring-boot-devtools'
testCompile(group: 'org.springframework.boot', name: 'spring-boot-starter-test') {
exclude(module: 'commons-logging')
testImplementation(group: 'org.springframework.boot', name: 'spring-boot-starter-test') {
exclude(module: 'commons-logging')
}
testImplementation group: 'org.springframework.security', name: 'spring-security-test'

compile group: 'uk.gov.hmcts.reform', name: 'properties-volume-spring-boot-starter', version: '0.0.4'
compile group: 'uk.gov.hmcts.reform', name: 'health-spring-boot-starter', version: '0.0.4'
}

tasks.withType(JavaCompile) {
Expand Down Expand Up @@ -160,7 +158,8 @@ allprojects {

task codeceptSmokeSauce(type: Exec, dependsOn: ':yarnInstall') {
workingDir '.'
commandLine 'node_modules/codeceptjs/bin/codecept.js', 'run', '--config', 'saucelabs.conf.js','--steps', '--grep', '@smoke', '--verbose', '--debug', '--reporter', 'mochawesome'
commandLine 'node_modules/codeceptjs/bin/codecept.js', 'run', '--config', 'saucelabs.conf.js', '--steps', '--grep', '@smoke', '--verbose', '--debug', '--reporter', 'mochawesome'

}

task functionalSauce(dependsOn: ':codeceptFunctionalSauce') {
Expand All @@ -182,20 +181,20 @@ allprojects {
project.tasks['sonarqube'].dependsOn test

def listFiles(String pattern) {
return new FileNameFinder()
.getFileNames("${project.rootDir}", pattern)
.stream()
.collect(Collectors.joining(","))
return new FileNameFinder()
.getFileNames("${project.rootDir}", pattern)
.stream()
.collect(Collectors.joining(","))
}

sonarqube {
properties {
property "sonar.projectName", "SIDAM-WEB-PUBLIC"
property "sonar.exclusions", "**/uk/gov/hmcts/reform/idam/web/config/properties/*.java," +
"**/uk/gov/hmcts/reform/idam/web/model/*.java," +
"**/uk/gov/hmcts/reform/idam/web/helper/MvcKeys.java," +
"**/uk/gov/hmcts/reform/idam/web/Application.java," +
"**/*Exception.java"
"**/uk/gov/hmcts/reform/idam/web/model/*.java," +
"**/uk/gov/hmcts/reform/idam/web/helper/MvcKeys.java," +
"**/uk/gov/hmcts/reform/idam/web/Application.java," +
"**/*Exception.java"
property "sonar.host.url", "https://sonar.reform.hmcts.net/"
property "sonar.pitest.mode", "reuseReport"
property "sonar.pitest.reportsDirectory", "build/reports/pitest"
Expand Down
2 changes: 1 addition & 1 deletion charts/idam-web-public/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
appVersion: "1.0"
description: A Helm chart for HMCTS Reform IDAM Web Public
name: idam-web-public
version: 0.2.3
version: 0.2.4
maintainers:
- name: Amido Reform SIDAM Team
email: reform.idam@HMCTS.NET
Expand Down
2 changes: 1 addition & 1 deletion charts/idam-web-public/requirements.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dependencies:
- name: java
version: ~2.16.0
version: ~2.18.0
repository: '@hmctspublic'
1 change: 1 addition & 0 deletions charts/idam-web-public/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ java:
ingressHost: "idam-web-public.service.core-compute-{{ .Values.global.environment }}.internal"
replicas: 3
applicationPort: 8080
aadIdentityName: idam
keyVaults:
"idam-idam":
resourceGroup: idam-idam
Expand Down
12 changes: 12 additions & 0 deletions dependency-check-suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -238,4 +238,16 @@
<cve>CVE-2019-16942</cve>
<cve>CVE-2019-16943</cve>
</suppress>

<!--
This can be exploited if file upload is used, hence not relevant to us
-->
<suppress>
<notes>
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-9484
When using Apache Tomcat versions 10.0.0-M1 to 10.0.0-M4, 9.0.0.M1 to 9.0.34, 8.5.0 to 8.5.54 and 7.0.0 to 7.0.103 if a) an attacker is able to control the contents and name of a file on the server; and b) the server is configured to use the PersistenceManager with a FileStore; and c) the PersistenceManager is configured with sessionAttributeValueClassNameFilter="null" (the default unless a SecurityManager is used) or a sufficiently lax filter to allow the attacker provided object to be deserialized; and d) the attacker knows the relative file path from the storage location used by FileStore to the file the attacker has control over; then, using a specifically crafted request, the attacker will be able to trigger remote code execution via deserialization of the file under their control. Note that all of conditions a) to d) must be true for the attack to succeed.
</notes>
<gav regex="true">^org\.apache\.tomcat\.embed:tomcat-embed-.+:9\.0\.34.*$</gav>
<cve>CVE-2020-9484</cve>
</suppress>
</suppressions>
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 3 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Thu Nov 07 15:26:14 GMT 2019
#Fri May 01 15:54:14 BST 2020
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5-all.zip
zipStoreBase=GRADLE_USER_HOME
33 changes: 14 additions & 19 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi

# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
Expand Down Expand Up @@ -154,19 +154,19 @@ if $cygwin ; then
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
i=`expr $i + 1`
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi

Expand All @@ -175,14 +175,9 @@ save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")
APP_ARGS=`save "$@"`

# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"

# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi

exec "$JAVACMD" "$@"
3 changes: 3 additions & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"

Expand Down
Loading