Uploaded image for project: 'OpenAM'
  1. OpenAM
  2. OPENAM-4370

NPE when trying to authenticate via the REST authentication service

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Not a defect
    • Affects Version/s: 12.0.0
    • Fix Version/s: None
    • Component/s: authentication, rest
    • Labels:
      None
    • Environment:
      CentOS 6.4, apache tomcat 7.0.47
    • Support Ticket IDs:

      Description

      When attempting to login like:

      $ curl \
      --request POST \
      --header "X-OpenAM-Username: demo" \
      --header "X-OpenAM-Password: changeit" \
      --header "Content-Type: application/json" \
      --data "{}" \
      https://openam.example.com:8443/openam/json/authenticate
      

      The following error can be seen in the logs:

      Caused by: java.lang.NullPointerException
      at org.forgerock.json.jose.jws.handlers.HmacSigningHandler.signWithHMAC(HmacSigningHandler.java:56)
      at org.forgerock.json.jose.jws.handlers.HmacSigningHandler.sign(HmacSigningHandler.java:42)
      at org.forgerock.json.jose.jws.SignedJwt.build(SignedJwt.java:171)
      at org.forgerock.json.jose.builders.SignedJwtBuilderImpl.build(SignedJwtBuilderImpl.java:92)
      at org.forgerock.openam.forgerockrest.authn.AuthIdHelper.generateAuthId(AuthIdHelper.java:169)
      at org.forgerock.openam.forgerockrest.authn.AuthIdHelper.createAuthId(AuthIdHelper.java:98)
      at org.forgerock.openam.forgerockrest.authn.RestAuthenticationHandler.createJsonCallbackResponse(RestAuthenticationHandler.java:293)
      at org.forgerock.openam.forgerockrest.authn.RestAuthenticationHandler.processAuthentication(RestAuthenticationHandler.java:221)
      at org.forgerock.openam.forgerockrest.authn.RestAuthenticationHandler.authenticate(RestAuthenticationHandler.java:156)
      at org.forgerock.openam.forgerockrest.authn.RestAuthenticationHandler.initiateAuthentication(RestAuthenticationHandler.java:89)
      at org.forgerock.openam.forgerockrest.authn.restlet.AuthenticationService.authenticate(AuthenticationService.java:139)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                peter.major Peter Major [X] (Inactive)
                Reporter:
                amitccet Amit Doshi [X] (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: