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

We need to revisit when HTTP Digest mechanism can not obtain hA1

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • 2.8.3.CR1
    • 1.15.27.Final, 2.2.15.Final, 2.6.7.Final, 2.8.2.Final
    • HTTP
    • None

      The mechanism presently contains the following implementation:

              byte[] hA1 = getH_A1(messageDigest, username, messageRealm);
      
              if (hA1 == null) {
                  httpDigest.trace("Failed: unable to get expected proof");
                  fail();
                  request.authenticationFailed(httpDigest.authenticationFailed(), httpResponse -> prepareResponse(selectedRealm, httpResponse, false));
                  return;
              }
      

      However getH_A1 will never return null, instead it will throw AuthenticationMechanismException.

      This block should be updated to handle the Exception instead of the null check.

      We probably need to be careful with the call to fail() incase the username was not set on the ServerAuthenticationContext as this now could throw an IllegalStateException which we would want to ignore.

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

                Created:
                Updated: