Uploaded image for project: 'WildFly Elytron'
  1. WildFly Elytron
  2. ELY-1371

NullPointerException within DigestSaslClient if username is null.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • 1.1.3.Final, 1.2.0.Beta4
    • 1.1.2.Final
    • SASL
    • None
    • Hide

      Use attached zip with project and instructions

      Show
      Use attached zip with project and instructions

      When running an EJB client which uses scoped context or legacy jboss-remote-naming API to invoke secured EJBs, a NPE occurs.
      Additionally, in the case with jboss-remote-naming legacy API, after this exception is logged, the client thread freezes (in the scoped context case, the exception propagates to the client thread).

      Full stack trace for the case of scoped context:

      		Suppressed: java.lang.NullPointerException
      			at java.nio.charset.CharsetEncoder.canEncode(CharsetEncoder.java:984)
      			at org.wildfly.security.mechanism.digest.DigestUtil.userRealmPasswordDigest(DigestUtil.java:209)
      			at org.wildfly.security.sasl.digest.AbstractDigestMechanism.getSaltedPasswordFromTwoWay(AbstractDigestMechanism.java:539)
      			at org.wildfly.security.sasl.digest.DigestSaslClient.createResponse(DigestSaslClient.java:231)
      			at org.wildfly.security.sasl.digest.DigestSaslClient.evaluateMessage(DigestSaslClient.java:364)
      			at org.wildfly.security.sasl.util.AbstractSaslParticipant.evaluateMessage(AbstractSaslParticipant.java:180)
      			at org.wildfly.security.sasl.digest.DigestSaslClient.evaluateChallenge(DigestSaslClient.java:349)
      			at org.wildfly.security.sasl.util.AbstractDelegatingSaslClient.evaluateChallenge(AbstractDelegatingSaslClient.java:54)
      			at org.wildfly.security.sasl.util.PrivilegedSaslClient.lambda$evaluateChallenge$0(PrivilegedSaslClient.java:55)
      			at java.security.AccessController.doPrivileged(Native Method)
      			at org.wildfly.security.sasl.util.PrivilegedSaslClient.evaluateChallenge(PrivilegedSaslClient.java:55)
      			at org.jboss.remoting3.remote.ClientConnectionOpenListener$Authentication.lambda$handleEvent$0(ClientConnectionOpenListener.java:650)
      			at org.jboss.remoting3.EndpointImpl$TrackingExecutor.lambda$execute$0(EndpointImpl.java:926)
      			at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      			at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)			at java.lang.Thread.run(Thread.java:748)
      

              darran.lofthouse@redhat.com Darran Lofthouse
              darran.lofthouse@redhat.com Darran Lofthouse
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: