Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-8999

KerberosTokenTest testKerberosViaCustomTokenAction should not run on IBM Java

    XMLWordPrintableJSON

Details

    • Test
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.0.4
    • 3.5.9, 4.0.5, 3.6.4
    • None
    • None
    • Unknown
    • Patch

    Description

      KerberosTokenTest testKerberosViaCustomTokenAction should not run on IBM Java.

      The test case fails on ClassNotFound com.ibm.security.jgss.InquireType - this is thrown due to wss4j-ws-security-common having a hard coded check for IBM Java to use the above mentioned class. 

      KerberosClientExceptionAction.class:
      `
      try{}{ {}
      {{ Class inquireType = Class.forName(IS_IBM_VENDOR ? "com.ibm.security.jgss.InquireType" : "com.sun.security.jgss.InquireType"); }}
      {{ Class extendedGSSContext = Class.forName(IS_IBM_VENDOR ? "com.ibm.security.jgss.ExtendedGSSContext" : "com.sun.security.jgss.ExtendedGSSContext"); }}
      {{ Method inquireSecContext = extendedGSSContext.getMethod("inquireSecContext", inquireType); }}
      {{ Key key = (Key)inquireSecContext.invoke(secContext, Enum.valueOf(inquireType, "KRB5_GET_SESSION_KEY"));  krbCtx.setSecretKey(key); }}
      {{ return krbCtx; }}
      } }}{{{}catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException | ClassNotFoundException var13){}{ {}
      {{ throw new WSSecurityException(ErrorCode.FAILURE, var13, "kerberosServiceTicketError"); }}
      }

      `

      Most of the test cases in KerberosTokenTest are set to avoid running when on IBM, I believe this test case should also be set to not run. A future improvement would be to update wss4j-ws-security-common to be IBM Semeru friendly, then update CXF accordingly.

      Attachments

        Issue Links

          Activity

            People

              coheigea Colm O hEigeartaigh
              jgoodyear Jamie Mark Goodyear
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: