diff --git a/docs/changelog/122737.yaml b/docs/changelog/122737.yaml new file mode 100644 index 0000000000000..97128009e5fe3 --- /dev/null +++ b/docs/changelog/122737.yaml @@ -0,0 +1,5 @@ +pr: 122737 +summary: Bump json-smart and oauth2-oidc-sdk +area: Authentication +type: upgrade +issues: [] diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml index 11138b42f4f5f..44c339eb5ad69 100644 --- a/gradle/verification-metadata.xml +++ b/gradle/verification-metadata.xml @@ -974,36 +974,24 @@ + + + + + - - - - - - - - - - - - - - - - - - - - + + + @@ -1764,9 +1752,9 @@ - - - + + + @@ -1774,24 +1762,14 @@ - - - - - - - - - - - - - + + + diff --git a/modules/repository-azure/build.gradle b/modules/repository-azure/build.gradle index 382852a09e535..b86520aadef10 100644 --- a/modules/repository-azure/build.gradle +++ b/modules/repository-azure/build.gradle @@ -62,20 +62,20 @@ dependencies { api "com.github.stephenc.jcip:jcip-annotations:1.0-1" api "com.nimbusds:content-type:2.3" api "com.nimbusds:lang-tag:1.7" - api("com.nimbusds:nimbus-jose-jwt:9.37.3"){ + api("com.nimbusds:nimbus-jose-jwt:10.0.1"){ exclude group: 'com.google.crypto.tink', module: 'tink' // it's an optional dependency on which we don't rely } - api("com.nimbusds:oauth2-oidc-sdk:11.9.1"){ + api("com.nimbusds:oauth2-oidc-sdk:11.22.2"){ exclude group: 'com.google.crypto.tink', module: 'tink' // it's an optional dependency on which we don't rely } api "jakarta.activation:jakarta.activation-api:1.2.1" api "jakarta.xml.bind:jakarta.xml.bind-api:2.3.3" api "net.java.dev.jna:jna-platform:${versions.jna}" // Maven says 5.14.0 but this aligns with the Elasticsearch-wide version api "net.java.dev.jna:jna:${versions.jna}" // Maven says 5.14.0 but this aligns with the Elasticsearch-wide version - api "net.minidev:accessors-smart:2.5.0" - api "net.minidev:json-smart:2.5.0" + api "net.minidev:accessors-smart:2.5.2" + api "net.minidev:json-smart:2.5.2" api "org.codehaus.woodstox:stax2-api:4.2.2" - api "org.ow2.asm:asm:9.3" + api "org.ow2.asm:asm:9.7.1" runtimeOnly "com.google.code.gson:gson:2.11.0" runtimeOnly "org.cryptomator:siv-mode:1.5.2" @@ -189,11 +189,6 @@ tasks.named("thirdPartyAudit").configure { 'org.bouncycastle.cert.X509CertificateHolder', 'org.bouncycastle.cert.jcajce.JcaX509CertificateHolder', 'org.bouncycastle.cert.jcajce.JcaX509v3CertificateBuilder', - 'org.bouncycastle.crypto.InvalidCipherTextException', - 'org.bouncycastle.crypto.engines.AESEngine', - 'org.bouncycastle.crypto.modes.GCMBlockCipher', - 'org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider', - 'org.bouncycastle.jce.provider.BouncyCastleProvider', 'org.bouncycastle.openssl.PEMKeyPair', 'org.bouncycastle.openssl.PEMParser', 'org.bouncycastle.openssl.jcajce.JcaPEMKeyConverter', diff --git a/x-pack/plugin/security/build.gradle b/x-pack/plugin/security/build.gradle index d3425c1e42e5b..eef4ca6d523d8 100644 --- a/x-pack/plugin/security/build.gradle +++ b/x-pack/plugin/security/build.gradle @@ -79,21 +79,21 @@ dependencies { runtimeOnly "joda-time:joda-time:2.10.10" // Dependencies for oidc - api "com.nimbusds:oauth2-oidc-sdk:11.10.1" + api "com.nimbusds:oauth2-oidc-sdk:11.22.2" api project(path: xpackModule('security:lib:nimbus-jose-jwt-modified'), configuration: 'shadow') if (isEclipse) { /* * Eclipse can't pick up the shadow dependency so we point it at the unmodified version of the library * so it can compile things. */ - api "com.nimbusds:nimbus-jose-jwt:9.37.3" + api "com.nimbusds:nimbus-jose-jwt:10.0.1" } - api "com.nimbusds:lang-tag:1.4.4" + api "com.nimbusds:lang-tag:1.7" api "com.sun.mail:jakarta.mail:1.6.3" api "net.jcip:jcip-annotations:1.0" - api "net.minidev:json-smart:2.5.1" - api "net.minidev:accessors-smart:2.4.2" - api "org.ow2.asm:asm:8.0.1" + api "net.minidev:json-smart:2.5.2" + api "net.minidev:accessors-smart:2.5.2" + api "org.ow2.asm:asm:9.7.1" testImplementation "org.elasticsearch:mocksocket:${versions.mocksocket}" diff --git a/x-pack/plugin/security/lib/nimbus-jose-jwt-modified-part1/build.gradle b/x-pack/plugin/security/lib/nimbus-jose-jwt-modified-part1/build.gradle index f53ff7027f126..d7a32bca6e523 100644 --- a/x-pack/plugin/security/lib/nimbus-jose-jwt-modified-part1/build.gradle +++ b/x-pack/plugin/security/lib/nimbus-jose-jwt-modified-part1/build.gradle @@ -11,7 +11,7 @@ apply plugin: 'com.gradleup.shadow' // See the build.gradle file in the parent directory for an explanation of this unusual build dependencies { - implementation "com.nimbusds:nimbus-jose-jwt:9.37.3" + implementation "com.nimbusds:nimbus-jose-jwt:10.0.1" } tasks.named('shadowJar').configure { diff --git a/x-pack/plugin/security/lib/nimbus-jose-jwt-modified/build.gradle b/x-pack/plugin/security/lib/nimbus-jose-jwt-modified/build.gradle index 4418bd32e64cf..f618f96706d63 100644 --- a/x-pack/plugin/security/lib/nimbus-jose-jwt-modified/build.gradle +++ b/x-pack/plugin/security/lib/nimbus-jose-jwt-modified/build.gradle @@ -11,7 +11,7 @@ apply plugin: 'com.gradleup.shadow' // See the build.gradle file in the parent directory for an explanation of this unusual build dependencies { - implementation "com.nimbusds:nimbus-jose-jwt:9.37.3" + implementation "com.nimbusds:nimbus-jose-jwt:10.0.1" implementation project(path: xpackModule('security:lib:nimbus-jose-jwt-modified-part2'), configuration: 'shadow') } diff --git a/x-pack/plugin/security/lib/nimbus-jose-jwt-modified/src/main/java/com/nimbusds/jose/util/JSONObjectUtils.java b/x-pack/plugin/security/lib/nimbus-jose-jwt-modified/src/main/java/com/nimbusds/jose/util/JSONObjectUtils.java index 1ea11f5c280ef..34b61e612c747 100644 --- a/x-pack/plugin/security/lib/nimbus-jose-jwt-modified/src/main/java/com/nimbusds/jose/util/JSONObjectUtils.java +++ b/x-pack/plugin/security/lib/nimbus-jose-jwt-modified/src/main/java/com/nimbusds/jose/util/JSONObjectUtils.java @@ -13,6 +13,7 @@ import java.security.PrivilegedActionException; import java.security.PrivilegedExceptionAction; import java.text.ParseException; +import java.util.Date; import java.util.List; import java.util.Map; @@ -192,6 +193,16 @@ public static Base64URL getBase64URL(final Map o, final String k } } + public static Date getEpochSecondAsDate(final Map o, final String key) throws ParseException { + try { + return AccessController.doPrivileged( + (PrivilegedExceptionAction) () -> org.elasticsearch.nimbus.jose.util.JSONObjectUtils.getEpochSecondAsDate(o, key) + ); + } catch (PrivilegedActionException e) { + throw (ParseException) e.getException(); + } + } + public static String toJSONString(final Map o) { return AccessController.doPrivileged( (PrivilegedAction) () -> org.elasticsearch.nimbus.jose.util.JSONObjectUtils.toJSONString(o)