Skip to content

Commit a5ba3e0

Browse files
Remove optional transitive tink and protobuf-java dependencies (elastic#115916) (elastic#115953)
This commit removes `com.google.crypto.tink` which is transitive and optional dependency of `oauth2-oidc-sdk` and `nimbus-jose-jwt`. We don't seem to be using any functionality that requires `tink` and thus `protobuf-java`. Removing them feels safer than having to maintain misaligned versions. (cherry picked from commit 6b32bce)
1 parent 92c862f commit a5ba3e0

File tree

6 files changed

+11
-263
lines changed

6 files changed

+11
-263
lines changed

gradle/verification-metadata.xml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -574,11 +574,6 @@
574574
<sha256 value="c8fb4839054d280b3033f800d1f5a97de2f028eb8ba2eb458ad287e536f3f25f" origin="Generated by Gradle"/>
575575
</artifact>
576576
</component>
577-
<component group="com.google.crypto.tink" name="tink" version="1.14.0">
578-
<artifact name="tink-1.14.0.jar">
579-
<sha256 value="47b2248705e0c9771bc259f22465a79655c1296e2d47aaee852adb7cdacb6198" origin="Generated by Gradle"/>
580-
</artifact>
581-
</component>
582577
<component group="com.google.errorprone" name="error_prone_annotations" version="2.11.0">
583578
<artifact name="error_prone_annotations-2.11.0.jar">
584579
<sha256 value="721cb91842b46fa056847d104d5225c8b8e1e8b62263b993051e1e5a0137b7ec" origin="Generated by Gradle"/>
@@ -754,11 +749,6 @@
754749
<sha256 value="8540247fad9e06baefa8fb45eb313802d019f485f14300e0f9d6b556ed88e753" origin="Generated by Gradle"/>
755750
</artifact>
756751
</component>
757-
<component group="com.google.protobuf" name="protobuf-java" version="4.27.0">
758-
<artifact name="protobuf-java-4.27.0.jar">
759-
<sha256 value="9072e60fe66cff5d6c0f11a1df21d8f3e4b29b5ee782b45c3fc75f59fbe2b839" origin="Generated by Gradle"/>
760-
</artifact>
761-
</component>
762752
<component group="com.google.protobuf" name="protobuf-java-util" version="3.25.5">
763753
<artifact name="protobuf-java-util-3.25.5.jar">
764754
<sha256 value="dacc58b2c3d2fa8d4bddc1acb881e78d6cf7c137dd78bc1d67f6aca732436a8d" origin="Generated by Gradle"/>

modules/repository-azure/build.gradle

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,12 @@ dependencies {
6262
api "com.github.stephenc.jcip:jcip-annotations:1.0-1"
6363
api "com.nimbusds:content-type:2.3"
6464
api "com.nimbusds:lang-tag:1.7"
65-
api "com.nimbusds:nimbus-jose-jwt:9.37.3"
66-
api "com.nimbusds:oauth2-oidc-sdk:11.9.1"
65+
api("com.nimbusds:nimbus-jose-jwt:9.37.3"){
66+
exclude group: 'com.google.crypto.tink', module: 'tink' // it's an optional dependency on which we don't rely
67+
}
68+
api("com.nimbusds:oauth2-oidc-sdk:11.9.1"){
69+
exclude group: 'com.google.crypto.tink', module: 'tink' // it's an optional dependency on which we don't rely
70+
}
6771
api "jakarta.activation:jakarta.activation-api:1.2.1"
6872
api "jakarta.xml.bind:jakarta.xml.bind-api:2.3.3"
6973
api "net.java.dev.jna:jna-platform:${versions.jna}" // Maven says 5.14.0 but this aligns with the Elasticsearch-wide version
@@ -73,8 +77,6 @@ dependencies {
7377
api "org.codehaus.woodstox:stax2-api:4.2.2"
7478
api "org.ow2.asm:asm:9.3"
7579

76-
runtimeOnly "com.google.crypto.tink:tink:1.14.0"
77-
runtimeOnly "com.google.protobuf:protobuf-java:4.27.0"
7880
runtimeOnly "com.google.code.gson:gson:2.11.0"
7981
runtimeOnly "org.cryptomator:siv-mode:1.5.2"
8082

@@ -174,13 +176,11 @@ tasks.named("thirdPartyAudit").configure {
174176
// 'org.slf4j.ext.EventData' - bring back when https://github.com/elastic/elasticsearch/issues/93714 is done
175177

176178
// Optional dependency of tink
177-
'com.google.api.client.http.HttpHeaders',
178-
'com.google.api.client.http.HttpRequest',
179-
'com.google.api.client.http.HttpRequestFactory',
180-
'com.google.api.client.http.HttpResponse',
181-
'com.google.api.client.http.HttpTransport',
182-
'com.google.api.client.http.javanet.NetHttpTransport',
183-
'com.google.api.client.http.javanet.NetHttpTransport$Builder',
179+
'com.google.crypto.tink.subtle.Ed25519Sign',
180+
'com.google.crypto.tink.subtle.Ed25519Sign$KeyPair',
181+
'com.google.crypto.tink.subtle.Ed25519Verify',
182+
'com.google.crypto.tink.subtle.X25519',
183+
'com.google.crypto.tink.subtle.XChaCha20Poly1305',
184184

185185
// Optional dependency of nimbus-jose-jwt and oauth2-oidc-sdk
186186
'org.bouncycastle.asn1.pkcs.PrivateKeyInfo',
@@ -252,14 +252,6 @@ tasks.named("thirdPartyAudit").configure {
252252
'javax.activation.MailcapCommandMap',
253253
'javax.activation.MimetypesFileTypeMap',
254254
'reactor.core.publisher.Traces$SharedSecretsCallSiteSupplierFactory$TracingException',
255-
256-
'com.google.protobuf.MessageSchema',
257-
'com.google.protobuf.UnsafeUtil',
258-
'com.google.protobuf.UnsafeUtil$1',
259-
'com.google.protobuf.UnsafeUtil$Android32MemoryAccessor',
260-
'com.google.protobuf.UnsafeUtil$Android64MemoryAccessor',
261-
'com.google.protobuf.UnsafeUtil$JvmMemoryAccessor',
262-
'com.google.protobuf.UnsafeUtil$MemoryAccessor',
263255
)
264256
}
265257

modules/repository-azure/licenses/protobuf-java-LICENSE.txt

Lines changed: 0 additions & 32 deletions
This file was deleted.

modules/repository-azure/licenses/protobuf-java-NOTICE.txt

Whitespace-only changes.

modules/repository-azure/licenses/tink-LICENSE.txt

Lines changed: 0 additions & 202 deletions
This file was deleted.

modules/repository-azure/licenses/tink-NOTICE.txt

Whitespace-only changes.

0 commit comments

Comments
 (0)