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

FLA-1566 Critical Vulnerabilies. Bumped Java -> 17, Sprint -> 3 #348

Merged
merged 4 commits into from
Sep 25, 2023

Conversation

KDNeufeld
Copy link
Contributor

@KDNeufeld KDNeufeld commented Sep 20, 2023

FLA-1566 attempts to address a great many critical vulnerabilities with this project.

  • bumped Java from 1.8 to 17
  • bumped Spring Boot from 2.2.4.RELEASE to 3.1.3
  • bumped spring-boot-starters from 1.1.1 to 2.0.0 (which now also uses java 17)
  • removed deprecated spring keycloak client library in favour of native spring oauth2 resource support
  • bumped openapi generator from 5.1.1 to 6.2.1
  • Fixed m2e activation so mapstruct properly generates code in Eclipse.
  • bumped .github workflow and publish builds to use Java 17
  • bumped commons.io to 2.13.0

Since this is a major change, bumped project version from 1.1.1 to 2.0.0.

Note:
Several environment variables are now deprecated with the removal of the Keycloak library and one new variable. This will likely need to be a DevOps task to get the containers running in OpenShift.
To Add:

  • KEYCLOAK_REALM_SERVER_URL

To Remove:

  • KEYCLOAK_AUTH_SERVER_URL
  • KEYCLOAK_REALM
  • KEYCLOAK_CREDENTIALS_SECRET
  • KEYCLOAK_SSL_REQUIRED

TODO: Cucumber is still running java 1.8, spring 2

@KDNeufeld KDNeufeld changed the title FLA-1566 FLA-1566 Upgrade Java from 8 -> 17, Spring Boot from 2 -> 3 Sep 20, 2023
@KDNeufeld KDNeufeld changed the title FLA-1566 Upgrade Java from 8 -> 17, Spring Boot from 2 -> 3 FLA-1566 Critical Vulnerabilies. Bumped Java -> 17, Sprint -> 3 Sep 20, 2023
</plugin>

<!--openapi server autogen-->
<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<version>5.1.1</version>
<!-- Anything >= 6.3.0 is broken. Spring seems to scan for components twice which breaks at runtime when trying to create the application context. -->
<version>6.2.1</version>
Copy link
Contributor Author

@KDNeufeld KDNeufeld Sep 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one was tricky. 7.0.0 is the latest version, however for some reason nothing > 6.2.1 seems to work for this project as the spring context cannot load - a component scans seems to happen twice (but only for this project, not for others, like mail-it). This is fortunate since 6.1.0 is the version <useJakartaEe> was added to support Java 17.

@KDNeufeld KDNeufeld force-pushed the feature/FLA-1566 branch 2 times, most recently from c29997b to cab52fb Compare September 20, 2023 18:12
@KDNeufeld KDNeufeld force-pushed the feature/FLA-1566 branch 6 times, most recently from eb8ee00 to 55c7066 Compare September 20, 2023 22:29
@KDNeufeld KDNeufeld marked this pull request as ready for review September 20, 2023 22:34
@@ -110,7 +112,7 @@ services:
#### KEYCLOAK ###
##############################################################################################
keycloak:
image: quay.io/keycloak/keycloak
image: quay.io/keycloak/keycloak:legacy
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docker-compose up did not work locally for keycloak or redis unless I made these 2 small changes.

<!-- LOG everything at INFO level -->
<root level="info">
<appender-ref ref="Console"/>
<if condition='isDefined("SPLUNK_URL")'>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An if element is not valid inside a root element. The new version of spring enforces correct xml or logging won't work at all.

Copy link
Contributor

@TayGov TayGov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 🥇

@TayGov TayGov merged commit 4a04408 into main Sep 25, 2023
5 checks passed
@TayGov TayGov deleted the feature/FLA-1566 branch September 25, 2023 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants