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

[risk=low][RW-14199] Bump some packages related to google-auth #9041

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft
Changes from 7 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
30 changes: 18 additions & 12 deletions api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,12 @@ buildscript {
// outside of the buildscript block aren't usable here.
ext {
GAE_VERSION = '2.0.31'
GOOGLE_AUTH_LIBRARY_VERSION = '1.30.1'
// error for 2.11
// org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'javers' defined in org.pmiops.workbench.config.CommonConfig: Failed to instantiate [org.javers.core.Javers]: Factory method 'javers' threw exception with message: Cannot override built-in adapter for class com.google.gson.JsonElement
GSON_VERSION = '2.10'
HIBERNATE_VERSION = '6.5.2.Final'
JACKSON_VERSION = '2.17.2'
JACKSON_VERSION = '2.18.2'
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

also opportunistically bumping a few more packages

LIQUIBASE_VERSION = '4.29.2'
// 1.5.7+ results in a runtime error:
// Logging system failed to initialize using configuration from 'null'
Expand Down Expand Up @@ -431,15 +434,15 @@ dependencies {
implementation 'com.mysql:mysql-connector-j:9.0.0'
implementation "org.apache.commons:commons-collections4:4.4"
implementation 'org.apache.commons:commons-lang3:3.15.0'
implementation 'org.apache.commons:commons-text:1.11.0'
implementation 'org.apache.commons:commons-text:1.13.0'
// 5.4+ results in a runtime error:
// java.lang.NoSuchMethodError: 'void org.apache.hc.core5.http.impl.io.DefaultHttpRequestWriterFactory.<init>(org.apache.hc.core5.http.config.Http1Config)'
implementation "org.apache.httpcomponents.client5:httpclient5:5.3.1"
implementation "org.springframework.boot:spring-boot-starter-validation:$project.ext.SPRING_BOOT_VERSION"
implementation 'commons-codec:commons-codec:1.17.0'
implementation 'com.auth0:java-jwt:4.4.0'
implementation 'io.netty:netty-common:4.1.112.Final'
implementation 'org.json:json:20231013'
implementation 'org.json:json:20250107'


// Assure compatible dependencies by using Bills of Materials (BOMs)
Expand All @@ -462,21 +465,24 @@ dependencies {
implementation("com.google.appengine:appengine-api-1.0-sdk:$project.ext.GAE_VERSION") {
exclude group: 'com.google.api-client', module: 'google-api-client-servlet'
}
implementation 'com.google.apis:google-api-services-admin-directory:directory_v1-rev20220919-2.0.0'
implementation 'com.google.apis:google-api-services-cloudbilling:v1-rev20220908-2.0.0'
implementation 'com.google.apis:google-api-services-cloudresourcemanager:v3-rev20220925-2.0.0'
implementation 'com.google.apis:google-api-services-admin-directory:directory_v1-rev20241210-2.0.0'
implementation 'com.google.apis:google-api-services-cloudbilling:v1-rev20241011-2.0.0'
implementation 'com.google.apis:google-api-services-cloudresourcemanager:v3-rev20240310-2.0.0'
implementation 'com.google.apis:google-api-services-oauth2:v2-rev20200213-2.0.0'
implementation 'com.google.apis:google-api-services-iam:v1-rev20220825-2.0.0'
implementation 'com.google.api-client:google-api-client-appengine:2.5.0'
implementation 'com.google.auth:google-auth-library-appengine:1.23.0'
implementation 'com.google.auth:google-auth-library-oauth2-http:1.23.0'
implementation 'com.google.apis:google-api-services-iam:v1-rev20241114-2.0.0'
implementation 'com.google.api-client:google-api-client-appengine:2.7.1'
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was mainly searching for "auth", seeing which packages were referenced in error messages, and trial and error.

implementation "com.google.auth:google-auth-library-appengine:$project.ext.GOOGLE_AUTH_LIBRARY_VERSION"
implementation "com.google.auth:google-auth-library-oauth2-http:$project.ext.GOOGLE_AUTH_LIBRARY_VERSION"
// 1.11.2+ results in a compilation error:
// > Could not find com.google.cloud.sql:mysql-socket-factory-connector-j-8:1.11.1-SNAPSHOT.
// Required by:
// project : > com.google.cloud.sql:mysql-socket-factory:1.11.2
implementation 'com.google.cloud.sql:mysql-socket-factory:1.11.1'
implementation "com.google.code.gson:gson:$project.ext.GSON_VERSION"
implementation 'com.google.oauth-client:google-oauth-client-jetty:1.34.1'
implementation 'com.google.oauth-client:google-oauth-client-jetty:1.37.0'
// required by google-oauth-client-jetty
implementation 'io.grpc:grpc-core:1.69.0'

implementation 'com.google.protobuf:protobuf-java:3.25.5'
implementation 'com.google.protobuf:protobuf-java-util:3.25.5'
implementation 'com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer:20240325.1'
Expand Down Expand Up @@ -510,7 +516,7 @@ dependencies {
// https://security.snyk.io/vuln/SNYK-JAVA-ORGBOUNCYCASTLE-6612984
// https://security.snyk.io/vuln/SNYK-JAVA-ORGBOUNCYCASTLE-6613076
// https://security.snyk.io/vuln/SNYK-JAVA-ORGBOUNCYCASTLE-6613079
implementation 'org.bouncycastle:bcprov-jdk18on:1.78'
implementation 'org.bouncycastle:bcprov-jdk18on:1.79'
// https://spring.io/blog/2022/03/31/spring-framework-rce-early-announcement
implementation "org.springframework:spring-aop:$project.ext.SPRING_FRAMEWORK_VERSION"
implementation "org.springframework:spring-aspects:$project.ext.SPRING_FRAMEWORK_VERSION"
Expand Down