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

Bug in TokenStoreCallbackHandler

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.1.7, 2.2.4
    • 2.1.8, 2.2.5, 2.3
    • WS-* Components
    • None

    Description

      There's a bug in WSS4JInInterceptor.TokenStoreCallbackHandler which manifests itself in Secure Conversation under certain circumstances.

      When CXF issues a SecurityContextToken it includes a wst:RequestedAttachedReference, however other stacks only return a SecurityContextToken. When trying to retrieve the SecurityContextToken in SecurityTokenReference in WSS4J it calls the TokenStoreCallbackHandler, which sets:

      pc.setCustomToken(tok.getAttachedReference());

      If there is no attached reference as in this scenario, the custom token is set to null and ends up causing an error in WSS4J. The correct fix is to call:

      pc.setCustomToken(tok.getToken());

      Attachments

        1. cxf-2525.patch
          0.7 kB
          Colm O hEigeartaigh

        Activity

          People

            dkulp Daniel Kulp
            coheigea Colm O hEigeartaigh
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: