Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-16460

TokenUtilsEncryptTest failing on OpenJDK 19 EA

XMLWordPrintable

      Tested on: java -version
      openjdk version "19-ea" 2022-09-20
      OpenJDK Runtime Environment (build 19-ea+25-1892)
      OpenJDK 64-Bit Server VM (build 19-ea+25-1892, mixed mode, sharing)

      Failure:
      Expected exception of type class org.jose4j.jwt.consumer.InvalidJwtException but got org.jose4j.lang.InvalidKeyException: Invalid key for JWE A128KW, expected a 128 bit key but a 256 bit key was provided.
      <------>at org.testng.internal.ExpectedExceptionsHolder.wrongException(ExpectedExceptionsHolder.java:68)
      <------>at org.testng.internal.Invoker.considerExceptions(Invoker.java:1130)
      <------>at org.testng.internal.Invoker.invokeMethod(Invoker.java:615)
      <------>at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:719)
      <------>at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:989)
      <------>at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
      <------>at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
      <------>at org.testng.TestRunner.privateRun(TestRunner.java:648)
      <------>at org.testng.TestRunner.run(TestRunner.java:505)
      <------>at org.testng.SuiteRunner.runTest(SuiteRunner.java:455)
      <------>at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:450)
      <------>at org.testng.SuiteRunner.privateRun(SuiteRunner.java:415)
      <------>at org.testng.SuiteRunner.run(SuiteRunner.java:364)
      <------>at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
      <------>at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84)
      <------>at org.testng.TestNG.runSuitesSequentially(TestNG.java:1208)
      <------>at org.testng.TestNG.runSuitesLocally(TestNG.java:1137)
      <------>at org.testng.TestNG.runSuites(TestNG.java:1049)
      <------>at org.testng.TestNG.run(TestNG.java:1017)
      <------>at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:283)
      <------>at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:75)
      <------>at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:120)
      <------>at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
      <------>at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
      <------>at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
      <------>at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)
      Caused by: org.jose4j.lang.InvalidKeyException: Invalid key for JWE A128KW, expected a 128 bit key but a 256 bit key was provided.
      <------>at org.jose4j.jwx.KeyValidationSupport.validateAesWrappingKey(KeyValidationSupport.java:103)
      <------>at org.jose4j.jwe.AesKeyWrapManagementAlgorithm.validateKey(AesKeyWrapManagementAlgorithm.java:64)
      <------>at org.jose4j.jwe.AesKeyWrapManagementAlgorithm.validateEncryptionKey(AesKeyWrapManagementAlgorithm.java:53)
      <------>at org.jose4j.jwe.JsonWebEncryption.getCompactSerialization(JsonWebEncryption.java:314)
      <------>at org.eclipse.microprofile.jwt.tck.util.TokenUtils.encryptString(TokenUtils.java:465)
      <------>at org.eclipse.microprofile.jwt.tck.util.TokenUtils.encryptClaims(TokenUtils.java:348)
      <------>at org.eclipse.microprofile.jwt.tck.util.TokenUtils.encryptClaims(TokenUtils.java:288)
      <------>at org.eclipse.microprofile.jwt.tck.util.TokenUtils.encryptClaims(TokenUtils.java:272)
      <------>at org.eclipse.microprofile.jwt.tck.util.TokenUtilsEncryptTest.testFailAlgorithm(TokenUtilsEncryptTest.java:49)
      <------>at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
      <------>at java.base/java.lang.reflect.Method.invoke(Method.java:578)
      <------>at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
      <------>at org.testng.internal.Invoker.invokeMethod(Invoker.java:583)
      <------>... 23 more

              rhn-support-rmartinc Ricardo Martin Camarero
              ropalka Richard Opalka
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: