Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-3014

JBossWS does not decode Nonce

    XMLWordPrintable

    Details

      Description

      I am filing this bug after discussing http://community.jboss.org/message/540669

      Nonce is not decoded when encoding type is Base64.

      UsernameToken has this piece of code:
      String encodingType = elem.getAttribute("EncodingType");
      if (encodingType != null && encodingType.length() > 0 && !Constants.BASE64_ENCODING_TYPE.equalsIgnoreCase(encodingType))
      throw new WSSecurityException("Unsupported nonce encoding type: " + encodingType);

      encodingType is not used anywhere else.

      In UsernameTokenCallback.java there is the need to decode nonce, so, something like:

      String nonce = (String)info.getInfo(NONCE);
      if (nonce != null) {
      try

      { digest.update(new BASE64Decoder().decodeBuffer(nonce)); }

      catch (IOException e)

      { // ignore exceptions }

      }

      need to be added to UsernameTokenCallback.java

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  dlofthouse Darran Lofthouse
                  Reporter:
                  romanojb Romano Silva
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: