Skip to content

Commit 6b32bce

Browse files
Remove optional transitive tink and protobuf-java dependencies (#115916)
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.
1 parent 36ed99c commit 6b32bce

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
@@ -579,11 +579,6 @@
579579
<sha256 value="c8fb4839054d280b3033f800d1f5a97de2f028eb8ba2eb458ad287e536f3f25f" origin="Generated by Gradle"/>
580580
</artifact>
581581
</component>
582-
<component group="com.google.crypto.tink" name="tink" version="1.14.0">
583-
<artifact name="tink-1.14.0.jar">
584-
<sha256 value="47b2248705e0c9771bc259f22465a79655c1296e2d47aaee852adb7cdacb6198" origin="Generated by Gradle"/>
585-
</artifact>
586-
</component>
587582
<component group="com.google.errorprone" name="error_prone_annotations" version="2.11.0">
588583
<artifact name="error_prone_annotations-2.11.0.jar">
589584
<sha256 value="721cb91842b46fa056847d104d5225c8b8e1e8b62263b993051e1e5a0137b7ec" origin="Generated by Gradle"/>
@@ -759,11 +754,6 @@
759754
<sha256 value="8540247fad9e06baefa8fb45eb313802d019f485f14300e0f9d6b556ed88e753" origin="Generated by Gradle"/>
760755
</artifact>
761756
</component>
762-
<component group="com.google.protobuf" name="protobuf-java" version="4.27.0">
763-
<artifact name="protobuf-java-4.27.0.jar">
764-
<sha256 value="9072e60fe66cff5d6c0f11a1df21d8f3e4b29b5ee782b45c3fc75f59fbe2b839" origin="Generated by Gradle"/>
765-
</artifact>
766-
</component>
767757
<component group="com.google.protobuf" name="protobuf-java-util" version="3.25.5">
768758
<artifact name="protobuf-java-util-3.25.5.jar">
769759
<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
@@ -63,8 +63,12 @@ dependencies {
6363
api "com.github.stephenc.jcip:jcip-annotations:1.0-1"
6464
api "com.nimbusds:content-type:2.3"
6565
api "com.nimbusds:lang-tag:1.7"
66-
api "com.nimbusds:nimbus-jose-jwt:9.37.3"
67-
api "com.nimbusds:oauth2-oidc-sdk:11.9.1"
66+
api("com.nimbusds:nimbus-jose-jwt:9.37.3"){
67+
exclude group: 'com.google.crypto.tink', module: 'tink' // it's an optional dependency on which we don't rely
68+
}
69+
api("com.nimbusds:oauth2-oidc-sdk:11.9.1"){
70+
exclude group: 'com.google.crypto.tink', module: 'tink' // it's an optional dependency on which we don't rely
71+
}
6872
api "jakarta.activation:jakarta.activation-api:1.2.1"
6973
api "jakarta.xml.bind:jakarta.xml.bind-api:2.3.3"
7074
api "net.java.dev.jna:jna-platform:${versions.jna}" // Maven says 5.14.0 but this aligns with the Elasticsearch-wide version
@@ -74,8 +78,6 @@ dependencies {
7478
api "org.codehaus.woodstox:stax2-api:4.2.2"
7579
api "org.ow2.asm:asm:9.3"
7680

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

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

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

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

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)