Skip to content

Commit

Permalink
Develop (#167)
Browse files Browse the repository at this point in the history
* Bump spring-security-core from 5.7.5 to 6.0.2

Bumps [spring-security-core](https://github.com/spring-projects/spring-security) from 5.7.5 to 6.0.2.
- [Release notes](https://github.com/spring-projects/spring-security/releases)
- [Changelog](https://github.com/spring-projects/spring-security/blob/main/RELEASE.adoc)
- [Commits](spring-projects/spring-security@5.7.5...6.0.2)

---
updated-dependencies:
- dependency-name: org.springframework.security:spring-security-core
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump commons-csv from 1.9.0 to 1.10.0 in /api

Bumps [commons-csv](https://github.com/apache/commons-csv) from 1.9.0 to 1.10.0.
- [Release notes](https://github.com/apache/commons-csv/releases)
- [Changelog](https://github.com/apache/commons-csv/blob/master/RELEASE-NOTES.txt)
- [Commits](apache/commons-csv@rel/commons-csv-1.9.0...rel/commons-csv-1.10.0)

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-csv
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump poi-ooxml from 5.2.2 to 5.2.3 in /api

Bumps poi-ooxml from 5.2.2 to 5.2.3.

---
updated-dependencies:
- dependency-name: org.apache.poi:poi-ooxml
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump spring-security-core from 5.7.5 to 6.0.2 in /api

Bumps [spring-security-core](https://github.com/spring-projects/spring-security) from 5.7.5 to 6.0.2.
- [Release notes](https://github.com/spring-projects/spring-security/releases)
- [Changelog](https://github.com/spring-projects/spring-security/blob/main/RELEASE.adoc)
- [Commits](spring-projects/spring-security@5.7.5...6.0.2)

---
updated-dependencies:
- dependency-name: org.springframework.security:spring-security-core
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump commons-csv from 1.9.0 to 1.10.0 in /api

Bumps [commons-csv](https://github.com/apache/commons-csv) from 1.9.0 to 1.10.0.
- [Release notes](https://github.com/apache/commons-csv/releases)
- [Changelog](https://github.com/apache/commons-csv/blob/master/RELEASE-NOTES.txt)
- [Commits](apache/commons-csv@rel/commons-csv-1.9.0...rel/commons-csv-1.10.0)

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-csv
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* commons-csv returning different error code

* Added new CHangelog template, still needs content update from current state of main:

At least these things, I think:
SNOMED-496 .. DONE
SNOMED-475 .. DONE
SNOMED-470 .. DONE / On Develop branch / finished
SNOMED-408 .. DONE / On Develop branch / finished
SNOMED-405
SNOMED-489 Select all .. DONE

* error messages changed in lib

* Bump aws-mysql-jdbc from 1.1.2 to 1.1.4

Bumps [aws-mysql-jdbc](https://github.com/awslabs/aws-mysql-jdbc) from 1.1.2 to 1.1.4.
- [Release notes](https://github.com/awslabs/aws-mysql-jdbc/releases)
- [Changelog](https://github.com/awslabs/aws-mysql-jdbc/blob/main/CHANGELOG.md)
- [Commits](awslabs/aws-mysql-jdbc@1.1.2...1.1.4)

---
updated-dependencies:
- dependency-name: software.aws.rds:aws-mysql-jdbc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* adding some detail to changelog

* Bump hashicorp/aws from 4.58.0 to 4.59.0 in /terraform

Bumps [hashicorp/aws](https://github.com/hashicorp/terraform-provider-aws) from 4.58.0 to 4.59.0.
- [Release notes](https://github.com/hashicorp/terraform-provider-aws/releases)
- [Changelog](https://github.com/hashicorp/terraform-provider-aws/blob/main/CHANGELOG.md)
- [Commits](hashicorp/terraform-provider-aws@v4.58.0...v4.59.0)

---
updated-dependencies:
- dependency-name: hashicorp/aws
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump sentry.version from 6.15.0 to 6.16.0

Bumps `sentry.version` from 6.15.0 to 6.16.0.

Updates `sentry-spring-boot-starter` from 6.15.0 to 6.16.0
- [Release notes](https://github.com/getsentry/sentry-java/releases)
- [Changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md)
- [Commits](getsentry/sentry-java@6.15.0...6.16.0)

Updates `sentry-logback` from 6.15.0 to 6.16.0
- [Release notes](https://github.com/getsentry/sentry-java/releases)
- [Changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md)
- [Commits](getsentry/sentry-java@6.15.0...6.16.0)

---
updated-dependencies:
- dependency-name: io.sentry:sentry-spring-boot-starter
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.sentry:sentry-logback
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump maven-help-plugin from 3.3.0 to 3.4.0

Bumps [maven-help-plugin](https://github.com/apache/maven-help-plugin) from 3.3.0 to 3.4.0.
- [Release notes](https://github.com/apache/maven-help-plugin/releases)
- [Commits](apache/maven-help-plugin@maven-help-plugin-3.3.0...maven-help-plugin-3.4.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-help-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* include test fixture

* store failed lookups in session storage so they aren't repeated (clogs up the console and is added network traffic)

* Bump spring-boot-starter-parent from 2.6.14 to 3.0.5 in /api

Bumps [spring-boot-starter-parent](https://github.com/spring-projects/spring-boot) from 2.6.14 to 3.0.5.
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](spring-projects/spring-boot@v2.6.14...v3.0.5)

---
updated-dependencies:
- dependency-name: org.springframework.boot:spring-boot-starter-parent
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* now exporting additional source columns

* fix dependency issue

* Revert "Bump spring-boot-starter-parent from 2.6.14 to 3.0.5 in /api"

This reverts commit cad7279.

* Revert "fix dependency issue"

This reverts commit 4912e70.

* resolving trivy issue

* this is required to complete the java upgrade when deploy is run in azure

* implementing extended export

* fixing tsv test

* fixing csv test

* fix csv test file

* fix up tsv file

* debug

* fixing xlsx test

* reverting to original format in case it makes a difference

* testing line feed issues

* lf changes?

* new file

* tests need work

* revert to previous BOM code

* fix typo

* updated changelog

* adding dual map mode

* Source set CodeSystem URI and ValueSet URI

* hide FHIR URI config by default

* tidy

* merged mapview for dual mapping.  yet to be fully tested

* add reconcile task

* add reconcile task (first stage, yet to implement in api)
remove child/master MapRow approach
add in code to handle movement of dual map rows into reconcile state / mapped state after dual map completed

* further implementing reconcile

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* fixing tests - dual map mode is mandatory

* merging in non-blaze functionality from blaze branch

* add missing rowid and put in a temporary hack to get things kinda working as the siblingRowAuthor is preventing rows from returning if there isn't one

* include dual map queries

* fix introduced mistake

* fix tests complaining about missing blind map flag

* getting tests working for now, revisit this mysql issue later

* fix date issue in tests

* remove not null restrictions on the audit tables for the new columns

* changes to get tests working .. still need to revisit

* update query suitable for mysql

* revert query to original form to get build working .. the (select * from map_row) doesn't seem to be compatible

* keep UI tests happy

* further fixes for UI tests

* trialing removal of #dualMapMode

* add reconcile tab

* trialing ngDefaultControl

* trivy fixes

* fix up miscopy of fixed version

* further version changes required to make trivy happy

* making queries work with mysql in dev environment (fingers crossed)

* fix typo

* blindmapflag logic is in the view

* fix up equivalent logic

* allow same target code to be used twice in dual mapping

* make dual mapping work for same concept in the details view

* don't show review tab unless in dual map mode

* only add reconcile column if in dual map mode
reconcile is only a task type if in dual map mode

* colour task in drop down list

* prevent multiple reconciler columns

* further changes necessary to support reconciler column

* make reconcile task table show rows

* always display map type (not just hidden behind edit button)

* fix tests

* implement default sorting for dual map view
implement sorting for dbmapview

* fix up available status choices in reconcile task

* fix up icon for reconcile

* sort reconcile task table

* remove annoying console log

* add reconcile task type

* adding in translations for dual / single map mode indicator on table screens

* make query do a left outer join so we can see rows even when there is no second author yet

* reinstate sibiling row author now that left outer join is working again

* fix note delete tooltip

* fix typo

* fleshing out reconcile task

* use nativeQuery to write a query to get around both mysql and hibernate quirks / incompatibilities

* sourceIndex was incorrect, is actually source id but that is not available from MapView

* missed translation from earlier commit

* id needs to come from the api, only have index locally

* fix tests

* fix issue that prevents user bubble from showing up for both entries

* finishing off reconcile task

* fix the tab that activates when a reconcile task is created

* fix limiting of author task to 2

* further fixes for the reconcile task creation / delete / update

* reviewed

* fix view so it doesn't join different maps together

* prevent "unmapped | draft | mapped | in review .." showing up when the second dual map is put into mapped mode

* remove full stops, added automatically

* upgrade mockserver

* removing entry as upgraded mock-server

* work around trivy issue with guava until mock-server updates dependency

* - create a note on each row to keep track of the dual mapper
- merge notes
- merge targets on reconcile

* fix issue where selecting no map in a dual map reconcile would not do anything due to a server side error complaining about the map row target not being found

* category for system notes
some changes to get table editing of reconcile working better

* fixing tests

* Test commit

* make map copy work for dual maps

* further changes to handle reconcile in the table

* prevent editing of reconcile table

* fix typo

* don't disable checkbox in details view

* bump version in hopes of a trivvy resolution

* don't go into mapped state if problem exist in reconcile

* fix status message logic .. was returning too early

* changing due to drop being prevented in the table

* change code to deal with reconcile state

* create a lastAuthor for a MapRowTarget so we can keep track of each target .. before the only mechanism was on the maprow which was overwritten as soon a change to any MapRowTarget was made.

* remove debug logs

* fix tests

* add missing migration

* initial commit.  Discussion to be held with how to handle the workflow of displaying / accepting replacement and if what is proposed is enough.

* getting versions up to date on develop branch

* updates to fix trivy issues

* trivy issues

* updating hapi version to get rid of okio and its trivy issue

* updating hapi version to get rid of okio and its trivy issue

* fix merge problems

* fix expected test output and copy-paste error

* implement in details view. makes sure concept is active and in scope

* sort entries in a rolegroup

* remove update inactives button from view screen

* remove code that didn't end up getting used

* fix tests broken by refactoring

* fix issue due to refactoring

* remove placeholder

* add copyright notice

* add in the dual mapping sql migration files (and move the migration file for this change) as the db migration has already happened in develop for dual mapping

* fix order

* add copyright notices

* set a default because it is the easiest way to deal with the confusion of develop having migrations from a branch that is yet to be merged to the develop branch

* change file name after adding an extra dual mapping migration

* renamed

* format and return cards to their original order

* remove code tidy as it introduced an error where selection is only possible if the row has a target

* change to formControlGroup to keep tests happy

* disable the ability to import into a dual map

* make export work for dual mapping

* make oos count update when table view contents altered.
make oos count update when entries removed from detailed view

* make sort work again for view / author / reconcile

* don't show import warning message in dual mode where you can't import a file

* update copyright date displayed in app

* fixing up sort and filter so it works for the view and map_row

* api support for new version of a dual map

* new version dual map ui changes

* changes to bulk change UI for dual mapping

* missed a required file for bulk change ui

* another missed file

* tweaks to labels

* add reconcile status info message

* info to only show for dual mapping

* tweak following feedback

* after discussion, don't reset reconcile on a new version

* ensure blind targets are not exposed in REVIEW task

* fix missing targets in certain task views

* fix subscription bugs - subscription inside callback; redundant backend requests

* remove temporary logging change from April 2022

* remove circle as looks like a radio button and not overly useful in this context anyway

* bulk change / maintenance through reconcile / prevent export of deleted comments

* fix builder issues with null

* make bulk updates work for rows in reconcile state from dual mapping

* fix up issues with selecting custom ECL

* fix issue where one author selecting no map would remove the mapping the other author had done

* add userguide link in footer

* add translate capability to test

* clear the error message in the details screen on a details screen close or next/previous

* add in HttpClientTestingModule import

* change over to the translation

* fixing issues raised by SI testing

* Fix problem with creating new version of the map where if one reconcile row was blank, it would result in the other reconcile row being duplicated

* prevent reviewer from getting inactive suggestions and point them in the right direction

* fix logic changes to allow for sibling rows to have the no map flag or target

* cater for case where two targets get moved into the same relationship

* properly fix two issues that were previously "fixed" but has introduced futher errors

* code cleanup

* stop next skipping a row in reconcile after placing a row into the mapped state

* fixing issues:
prevent edit and drag in reconcile task after changed into mapping status
only check for duplicated target if target is not null

* adding info

* Bump hashicorp/aws from 4.58.0 to 5.23.1 in /terraform

Bumps [hashicorp/aws](https://github.com/hashicorp/terraform-provider-aws) from 4.58.0 to 5.23.1.
- [Release notes](https://github.com/hashicorp/terraform-provider-aws/releases)
- [Changelog](https://github.com/hashicorp/terraform-provider-aws/blob/main/CHANGELOG.md)
- [Commits](hashicorp/terraform-provider-aws@v4.58.0...v5.23.1)

---
updated-dependencies:
- dependency-name: hashicorp/aws
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump com.github.eirslett:frontend-maven-plugin in /ui

Bumps [com.github.eirslett:frontend-maven-plugin](https://github.com/eirslett/frontend-maven-plugin) from 1.12.1 to 1.14.2.
- [Changelog](https://github.com/eirslett/frontend-maven-plugin/blob/master/CHANGELOG.md)
- [Commits](eirslett/frontend-maven-plugin@frontend-plugins-1.12.1...frontend-plugins-1.14.2)

---
updated-dependencies:
- dependency-name: com.github.eirslett:frontend-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump org.yaml:snakeyaml from 2.0 to 2.2 in /ui

Bumps [org.yaml:snakeyaml](https://bitbucket.org/snakeyaml/snakeyaml) from 2.0 to 2.2.
- [Commits](https://bitbucket.org/snakeyaml/snakeyaml/branches/compare/snakeyaml-2.2..snakeyaml-2.0)

---
updated-dependencies:
- dependency-name: org.yaml:snakeyaml
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump org.mariadb.jdbc:mariadb-java-client from 3.1.2 to 3.2.0 in /api

Bumps [org.mariadb.jdbc:mariadb-java-client](https://github.com/mariadb-corporation/mariadb-connector-j) from 3.1.2 to 3.2.0.
- [Release notes](https://github.com/mariadb-corporation/mariadb-connector-j/releases)
- [Changelog](https://github.com/mariadb-corporation/mariadb-connector-j/blob/master/CHANGELOG.md)
- [Commits](mariadb-corporation/mariadb-connector-j@3.1.2...3.2.0)

---
updated-dependencies:
- dependency-name: org.mariadb.jdbc:mariadb-java-client
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Merge branch 'develop' into feature/SNOMED-4-dual-authoring-process

* Revert "Merge branch 'develop' into feature/SNOMED-4-dual-authoring-process"

This reverts commit f1c4aeb.

* Bump sentry.version from 6.16.0 to 6.32.0 in /api

Bumps `sentry.version` from 6.16.0 to 6.32.0.

Updates `io.sentry:sentry-spring-boot-starter` from 6.16.0 to 6.32.0
- [Release notes](https://github.com/getsentry/sentry-java/releases)
- [Changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md)
- [Commits](getsentry/sentry-java@6.16.0...6.32.0)

Updates `io.sentry:sentry-logback` from 6.16.0 to 6.32.0
- [Release notes](https://github.com/getsentry/sentry-java/releases)
- [Changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md)
- [Commits](getsentry/sentry-java@6.16.0...6.32.0)

---
updated-dependencies:
- dependency-name: io.sentry:sentry-spring-boot-starter
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.sentry:sentry-logback
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump org.springframework.security:spring-security-core in /api

Bumps [org.springframework.security:spring-security-core](https://github.com/spring-projects/spring-security) from 6.0.5 to 6.1.5.
- [Release notes](https://github.com/spring-projects/spring-security/releases)
- [Changelog](https://github.com/spring-projects/spring-security/blob/main/RELEASE.adoc)
- [Commits](spring-projects/spring-security@6.0.5...6.1.5)

---
updated-dependencies:
- dependency-name: org.springframework.security:spring-security-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump com.google.guava:guava from 32.1.1-jre to 32.1.3-jre in /api

Bumps [com.google.guava:guava](https://github.com/google/guava) from 32.1.1-jre to 32.1.3-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump org.apache.maven.plugins:maven-resources-plugin from 3.3.0 to 3.3.1

Bumps [org.apache.maven.plugins:maven-resources-plugin](https://github.com/apache/maven-resources-plugin) from 3.3.0 to 3.3.1.
- [Release notes](https://github.com/apache/maven-resources-plugin/releases)
- [Commits](apache/maven-resources-plugin@maven-resources-plugin-3.3.0...maven-resources-plugin-3.3.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-resources-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump software.aws.rds:aws-mysql-jdbc from 1.1.4 to 1.1.10

Bumps [software.aws.rds:aws-mysql-jdbc](https://github.com/awslabs/aws-mysql-jdbc) from 1.1.4 to 1.1.10.
- [Release notes](https://github.com/awslabs/aws-mysql-jdbc/releases)
- [Changelog](https://github.com/awslabs/aws-mysql-jdbc/blob/main/CHANGELOG.md)
- [Commits](awslabs/aws-mysql-jdbc@1.1.4...1.1.10)

---
updated-dependencies:
- dependency-name: software.aws.rds:aws-mysql-jdbc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* terraform commands failing in azure .. rolling back version of hashicorp/aws

* fix issue with select all not working for bulk dual mapping resets

* fix issues with bulk data dialog ..
 1) make the right statues show up for dual maps (view table)
 2) don't allow reset in table view, should be the normal dialog

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Deanne Ukovich <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Michael Lawley <[email protected]>
Co-authored-by: Attila Edelenyi <[email protected]>
  • Loading branch information
5 people authored Nov 12, 2023
1 parent ec23342 commit 9f420fa
Show file tree
Hide file tree
Showing 158 changed files with 4,615 additions and 1,292 deletions.
8 changes: 3 additions & 5 deletions .trivyignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@
CVE-2022-27191
CVE-2022-30065

# Accept the risk for DoS Attack for now and apply dependabot fixes as they arrive (then remove this)
CVE-2022-25857

# resource exhaustion attack on jackson-databind, a transitive dependency of problem-spring-web-starter (api) remove when problem-spring-web-starter updates dependency to 2.14.0-rc1 or greater
CVE-2022-42003
CVE-2022-42004

# Accept the risk as a transitive dependency of mockserver and so only used for tests remove when upgrade mockserver > 5.14.0 (as yet unrelease)
CVE-2022-42889
# remove when spring boot > 3 .. risk seems to be of crashing rather than security
CVE-2023-1370

# Even the latest version of springboot-starter-web 3.0.2 have transitive dependencies: tomcat-embed-core-9.0.68.jar and spring-web-5.3.23.jar with these issues
CVE-2022-45143
# remove when spring-web (dependency of spring-boot-starter-web) is 6.0.0 or above
CVE-2016-1000027
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Change Log

Notable changes in each release are documented below.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

* **Security** - in case of vulnerabilities.
* **Changed** - for changes in existing functionality.
* **Deprecated** - for soon-to-be removed features.
* **Removed** - for now removed features.
* **Fixed** - for any bug fixes.

## UNRELEASED

### Security

- Updated library versions to mitigate CVEs:
-

#### Changed

- SNOMED-457: streamline login process (DEX)
- SNOMED-499: expand export to include additional source columns
- SNOMED-500: export notes, author and reviewer

#### Fixed

- SNOMED-496: Hiding index column causes filters to be misaligned
- SNOMED-475: Import error never goes away
- SNOMED-470: pre-filled fields in "create map" dialog when they should be empty
- SNOMED-408: Member list in the edit/create map dialogue is only returning X number of users
- SNOMED-489: Select all toggle only selects items on page
29 changes: 23 additions & 6 deletions api/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,26 @@
version: '3.2'
services:
db:
image: mysql:8.0
command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: s2s
ports:
- 3306:3306
volumes:
- mysql_db:/var/lib/mysql

clair:
depends_on:
- db
container_name: snap2snomed_api
image: quay.io/aehrc/snap2snomed:latest
image: quay.io/aehrc/snap2snomed:latest-${USER}
environment:
- snap2snomed.cors.allowedOriginPatterns=*
- snap2snomed.cors.allowedHeaders=*
- snap2snomed.cors.allowedMethods=OPTIONS,GET,POST,PUT,PATCH
- snap2snomed.cors.allowedMethods=OPTIONS,GET,POST,PUT,PATCH,DELETE
- snap2snomed.cors.maxAge=3600
- snap2snomed.swagger.applicationVersion=0.1.0-SNAPSHOT
- snap2snomed.swagger.applicationDescription=API Backend for the Snap2Snomed mapping tool
Expand All @@ -18,10 +32,13 @@ services:
- [email protected]
- snap2snomed.swagger.contactUrl=https://aehrc.com/
- snap2snomed.security.authDomainUrl=https://snap-2-snomed-test.auth.ap-southeast-2.amazoncognito.com
- snap2snomed.security.clientId=v597lp3lk3ue2qtks5jb41la6
- snap2snomed.defaultTerminologyServer.url=https://r4.ontoserver.csiro.au/fhir
- spring.datasource.url=jdbc:h2:/opt/snap2snomed/db
- snap2snomed.security.adminGroup=AdminGroup
- spring.datasource.driverClassName=software.aws.rds.jdbc.mysql.Driver
- spring.datasource.url=jdbc:mysql:aws://db:3306/s2s?cachePrepStmts=true&useServerPrepStmts=false&rewriteBatchedStatements=true&socketTimeout=480000
- spring.security.oauth2.resourceserver.jwt.issuer-uri=https://cognito-idp.ap-southeast-2.amazonaws.com/ap-southeast-2_oQSXJHFz9
ports:
- "8080:8080"
volumes:
- /opt/snap2snomed/db:/opt/snap2snomed/db
volumes:
mysql_db:

179 changes: 140 additions & 39 deletions api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,30 +30,40 @@
<description>API Backend for the Snap2Snomed mapping tool</description>

<properties>
<java.version>11</java.version>
<java.version>17</java.version>
<docker.repository>aehrc/snap2snomed</docker.repository>
<docker.registry.host>quay.io</docker.registry.host>
<sentry.version>6.4.2</sentry.version>
<sentry.version>6.32.0</sentry.version>
<jacoco.version>0.8.8</jacoco.version>
<commons-csv.version>1.9.0</commons-csv.version>
<aws-mysql-jdbc.version>1.1.2</aws-mysql-jdbc.version>
<org.springdoc.version>1.6.12</org.springdoc.version>
<commons-csv.version>1.10.0</commons-csv.version>
<aws-mysql-jdbc.version>1.1.10</aws-mysql-jdbc.version>
<org.springdoc.version>1.6.15</org.springdoc.version>
<jib.version>3.3.1</jib.version>
<apt-maven-plugin.version>1.1.3</apt-maven-plugin.version>
<problem-spring-web.version>0.27.0</problem-spring-web.version>
<swagger-request-validator.version>2.28.2</swagger-request-validator.version>
<apache-poi.version>5.2.2</apache-poi.version>
<rest-assured.version>4.4.0</rest-assured.version>
<swagger-request-validator.version>2.34.0</swagger-request-validator.version>
<apache-poi.version>5.2.3</apache-poi.version>
<rest-assured.version>4.5.1</rest-assured.version>
<jjwt.version>0.11.5</jjwt.version>
<tc-mysql.version>1.17.2</tc-mysql.version>
<mockserver.version>5.14.0</mockserver.version>
<mockserver.version>5.15.0</mockserver.version>
<hamcrest-test.version>1.3</hamcrest-test.version>
<hamcrest-date.version>2.0.8</hamcrest-date.version>
<hapi.version>6.0.2</hapi.version>
<spring-security-core.version>5.7.5</spring-security-core.version>
<spring-core.version>5.3.21</spring-core.version>
<hapi.version>6.6.2</hapi.version>
<spring-security-core.version>6.1.5</spring-security-core.version>
<spring-core.version>5.3.29</spring-core.version>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>1.10.0</version> <!-- force version for CVE-2022-42889 ; remove when mockserver-netty updates -->
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
Expand Down Expand Up @@ -154,17 +164,16 @@
<artifactId>spring-security-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>

<dependency>
<groupId>org.mariadb.jdbc</groupId>
<artifactId>mariadb-java-client</artifactId>
<version>3.2.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-csv</artifactId>
Expand Down Expand Up @@ -243,6 +252,13 @@
<version>${mockserver.version}</version>
<scope>test</scope>
</dependency>
<!-- included to work around trivy issue with mock-server dependency CVE-2023-2976 in 31.1-jre .. remove when mock-server updates dependency -->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>32.1.3-jre</version>
</dependency>

<dependency>
<groupId>org.exparity</groupId>
<artifactId>hamcrest-date</artifactId>
Expand Down Expand Up @@ -283,6 +299,20 @@

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-help-plugin</artifactId>
<version>3.4.0</version>
<executions>
<execution>
<id>show-profiles</id>
<phase>compile</phase>
<goals>
<goal>active-profiles</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
Expand Down Expand Up @@ -312,7 +342,7 @@
<artifactId>jib-maven-plugin</artifactId>
<version>${jib.version}</version>
<configuration>
<from><image>aehrc/jre:openjdk-11-fontconfig</image></from>
<from><image>aehrc/jre:openjdk-17-fontconfig</image></from>
<container>
<ports>
<port>8080</port>
Expand All @@ -325,19 +355,11 @@
<to>
<image>${docker.registry.host}/${docker.repository}</image>
<tags>
<tag>${project.version}</tag>
<tag>latest</tag>
<tag>${project.version}-${user.name}</tag>
<tag>latest-${user.name}</tag>
</tags>
</to>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>dockerBuild</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
Expand Down Expand Up @@ -400,7 +422,7 @@
<limit>
<counter>LINE</counter>
<value>COVEREDRATIO</value>
<!-- TODO should raise this to something sensible when
<!-- TODO should raise this to something sensible when
it makes sense -->
<minimum>0.0</minimum>
</limit>
Expand All @@ -425,17 +447,96 @@
</plugins>

</build>

<profiles>
<profile>
<id>h2</id>
<dependencies>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>compile</scope>
</dependency>
</dependencies>
<id>docker</id>
<activation>
<property><name>!multi</name></property>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>${jib.version}</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>dockerBuild</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>

<profile>
<id>arm</id>
<activation>
<property><name>!multi</name></property>
<os>
<arch>aarch64</arch>
</os>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>${jib.version}</version>
<configuration>
<from>
<platforms>
<platform>
<architecture>arm64</architecture>
<os>linux</os>
</platform>
</platforms>
</from>
</configuration>
</plugin>
</plugins>
</build>
</profile>

<profile>
<id>multi</id>
<activation>
<property><name>multi</name></property>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>${jib.version}</version>
<configuration>
<from>
<platforms>
<platform>
<architecture>arm64</architecture>
<os>linux</os>
</platform>
<platform>
<architecture>amd64</architecture>
<os>linux</os>
</platform>
</platforms>
</from>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@

package org.snomed.snap2snomed;

import io.swagger.v3.oas.models.Components;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.info.License;
import org.snomed.snap2snomed.config.Snap2snomedConfiguration;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
Expand All @@ -30,6 +25,13 @@
import org.springframework.context.annotation.Bean;
import org.springframework.data.envers.repository.support.EnversRevisionRepositoryFactoryBean;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.web.filter.CommonsRequestLoggingFilter;

import io.swagger.v3.oas.models.Components;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.info.License;

@SpringBootApplication(exclude = ErrorMvcAutoConfiguration.class)
@EnableJpaRepositories(repositoryFactoryBeanClass = EnversRevisionRepositoryFactoryBean.class)
Expand All @@ -42,7 +44,7 @@ public class Snap2snomedApplication {
public static void main(String[] args) {
SpringApplication.run(Snap2snomedApplication.class, args);
}

/**
* Swagger ui customisation
*/
Expand Down
Loading

0 comments on commit 9f420fa

Please sign in to comment.