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

changes for signaturePropFile and decryptionPropFile of WSS4JInteceptor can't be reloaded if we use cxf in container

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.10, 2.1.4
    • 2.2, 2.0.11, 2.1.5
    • WS-* Components
    • None

    Description

      if we use cxf with ws-security in some kind of container such as servicemix, and if we change the content of decryptionPropFile and signaturePropFile, then if we hot redeploy artifacts into container, then the changes can't be loaded.
      The error is caused by WSSHandler of wss4j, the DEC_PROP_FILE(decryptionPropFile) and SIG_PROP_FILE(signaturePropFile)get loaded only once, see the code of loadDecryptionCrypto in WSSHandler
      Crypto crypto = null;
      String decPropFile = getString(WSHandlerConstants.DEC_PROP_FILE,
      reqData.getMsgContext());
      if (decPropFile != null) {
      if ((crypto = (Crypto) cryptos.get(decPropFile)) == null)

      { //the cryptos is static so means if decryptionPropFile loaded before, then it won't be loaded again even the content of decPropFile changed crypto = CryptoFactory.getInstance(decPropFile, this .getClassLoader(reqData.getMsgContext())); cryptos.put(decPropFile, crypto); }

      }
      we should override the method in AbstractWSS4JInterceptor which is subclass of WSHandler to ensure each change in DEC_PROP_FILE and SIG_PROP_FILE will be reloaded

      Attachments

        Activity

          People

            ffang Freeman Yue Fang
            ffang Freeman Yue Fang
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: