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

Unknown error in Oauth2/OIDC when user is not created

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 14.1.1, 14.1.2
    • Fix Version/s: None
    • Component/s: authentication, oauth2
    • Labels:
    • Environment:
      CentOS 7
      java version "1.8.0_131"
      Apache Tomcat Version 7.0.78
      OpenAM 14.1.2-M1

      Description

      Bug description

      When I don't create user following description in step 5 of OPENAM-11789 - I see Unknown Error - contact your administrator instead "User not found". This will not happen with disabled 'Prompt for password setting and activation code' in module configuration.

      How to reproduce the issue

      Follow reproduction steps in OPENAM-11789 and don't create user in configuration preparation step 5. Then don't let access token expire in test step 2 and just login.

      Expected behaviour
      We should see user console after successful login or error invalid credentials or missing account or something to tell user what he can do to login.
      Current behaviour
      Login is not successful and there is "Unknown error - contact your Administrator" on screen. In debug I can see NPE:
      
      WARNING: Could not invoke method:
      java.lang.reflect.InvocationTargetException
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:606)
          at org.forgerock.openam.http.annotations.AnnotatedMethod.invoke(AnnotatedMethod.java:76)
          at org.forgerock.openam.http.annotations.Endpoints$1.handle(Endpoints.java:64)
          at org.forgerock.http.routing.Router.handle(Router.java:100)
          at org.forgerock.openam.audit.AbstractHttpAccessAuditFilter.filter(AbstractHttpAccessAuditFilter.java:65)
          at org.forgerock.http.handler.Handlers$1.handle(Handlers.java:53)
          at org.forgerock.http.routing.Router.handle(Router.java:100)
          at org.forgerock.openam.rest.RealmContextFilter.filter(RealmContextFilter.java:80)
          at org.forgerock.http.handler.Handlers$1.handle(Handlers.java:53)
          at org.forgerock.http.routing.Router.handle(Router.java:100)
          at org.forgerock.http.routing.Router.handle(Router.java:100)
          at org.forgerock.openam.rest.RealmRoutingFactory$ChfRealmRouter.handle(RealmRoutingFactory.java:139)
          at org.forgerock.http.handler.Handlers$UndescribedAsDescribableHandler.handle(Handlers.java:179)
          at org.forgerock.openam.rest.RealmRoutingFactory$HostnameFilter.filter(RealmRoutingFactory.java:116)
          at org.forgerock.http.handler.Handlers$1.handle(Handlers.java:53)
          at org.forgerock.http.routing.Router.handle(Router.java:100)
          at org.forgerock.http.routing.Router.handle(Router.java:100)
          at org.forgerock.http.routing.ResourceApiVersionRoutingFilter.filter(ResourceApiVersionRoutingFilter.java:56)
          at org.forgerock.http.handler.Handlers$1.handle(Handlers.java:53)
          at org.forgerock.caf.authentication.framework.AuthenticationFramework.grantAccess(AuthenticationFramework.java:193)
          at org.forgerock.caf.authentication.framework.AuthenticationFramework.access$200(AuthenticationFramework.java:56)
          at org.forgerock.caf.authentication.framework.AuthenticationFramework$2.apply(AuthenticationFramework.java:185)
          at org.forgerock.caf.authentication.framework.AuthenticationFramework$2.apply(AuthenticationFramework.java:178)
          at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:247)
          at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:236)
          at org.forgerock.caf.authentication.framework.AuthenticationFramework.validateRequest(AuthenticationFramework.java:141)
          at org.forgerock.caf.authentication.framework.AuthenticationFramework.processMessage(AuthenticationFramework.java:133)
          at org.forgerock.caf.authentication.framework.AuthenticationFilter.filter(AuthenticationFilter.java:84)
          at org.forgerock.http.handler.Handlers$1.handle(Handlers.java:53)
          at org.forgerock.openam.http.GuiceHandler.handle(GuiceHandler.java:51)
          at org.forgerock.openam.http.HttpRoute$6.handle(HttpRoute.java:206)
          at org.forgerock.http.routing.Router.handle(Router.java:100)
          at org.forgerock.http.swagger.OpenApiRequestFilter.filter(OpenApiRequestFilter.java:62)
          at org.forgerock.http.handler.Handlers$1.handle(Handlers.java:53)
          at org.forgerock.openam.http.ApiDescriptorFilter.filter(ApiDescriptorFilter.java:139)
          at org.forgerock.http.handler.Handlers$1.handle(Handlers.java:53)
          at org.forgerock.openam.http.OpenAMHttpApplication$1.filter(OpenAMHttpApplication.java:70)
          at org.forgerock.http.handler.Handlers$1.handle(Handlers.java:53)
          at org.forgerock.http.filter.TransactionIdInboundFilter.filter(TransactionIdInboundFilter.java:52)
          at org.forgerock.http.handler.Handlers$1.handle(Handlers.java:53)
          at org.forgerock.http.servlet.HttpFrameworkServlet.service(HttpFrameworkServlet.java:236)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
          at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
          at org.forgerock.openam.rest.ProtocolVersionFilter.doFilter(ProtocolVersionFilter.java:65)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
          at org.forgerock.openam.validation.ResponseValidationFilter.doFilter(ResponseValidationFilter.java:36)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
          at org.forgerock.openam.headers.SetHeadersFilter.doFilter(SetHeadersFilter.java:80)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
          at com.sun.identity.setup.AMSetupFilter.doFilter(AMSetupFilter.java:111)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
          at org.forgerock.openam.audit.context.AuditContextFilter.doFilter(AuditContextFilter.java:43)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
          at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
          at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
          at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
          at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
          at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
          at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.NullPointerException
          at org.forgerock.openam.core.rest.authn.RestAuthCallbackHandlerManager.handleCallbacksInternally(RestAuthCallbackHandlerManager.java:96)
          at org.forgerock.openam.core.rest.authn.RestAuthCallbackHandlerManager.handleCallbacks(RestAuthCallbackHandlerManager.java:62)
          at org.forgerock.openam.core.rest.authn.RestAuthenticationHandler.handleCallbacks(RestAuthenticationHandler.java:307)
          at org.forgerock.openam.core.rest.authn.RestAuthenticationHandler.processAuthentication(RestAuthenticationHandler.java:243)
          at org.forgerock.openam.core.rest.authn.RestAuthenticationHandler.processAuthentication(RestAuthenticationHandler.java:261)
          at org.forgerock.openam.core.rest.authn.RestAuthenticationHandler.authenticate(RestAuthenticationHandler.java:165)
          at org.forgerock.openam.core.rest.authn.RestAuthenticationHandler.continueAuthentication(RestAuthenticationHandler.java:112)
          at org.forgerock.openam.core.rest.authn.http.AuthenticationServiceV1.authenticate(AuthenticationServiceV1.java:153)
          ... 80 more
      
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                lubomir.mlich Ľubomír Mlích
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: