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

X509TokenValidator uses signature-crypto-provider instead of encryption-crypto-provider

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.5
    • 3.1.11, 3.2.0
    • WS-* Components
    • None
    • Moderate

    Description

      I found a bug in X509TokenValidator class.

      There are two crypto handler which can be configured:
      <entry key="ws-security.signature.crypto" value-ref="..."/>
      <entry key="ws-security.encryption.crypto" value-ref="..."/>

      ws-security.signature.crypto is for my own signature, when sending messages, and to decrypt messages, which have been send to me. (here is my private key)
      ws-security.encryption.crypto is for encrypting messages before sending and validating of signatures in received messages. (here are all my trusted public keys/CAs)

      In X509TokenValidator the signature crypto provider is used to validate a received message signature. But instead the encryption provider should be used! See line 101 in X509TokenValidator.java:
      Crypto sigCrypto = stsProperties.getSignatureCrypto();

      There might be other sections which needs to be updated as well...

      Best regards
      Jan

      See post on the mailinglist regarding this topic also:
      http://cxf.547215.n5.nabble.com/X509TokenValidator-td5139681.html

      Attachments

        Activity

          People

            coheigea Colm O hEigeartaigh
            jan4talend Jan Bernhardt
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 4h
                4h
                Remaining:
                Remaining Estimate - 4h
                4h
                Logged:
                Time Spent - Not Specified
                Not Specified