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

NullPointerException in ResourceOwnerOrSuperUserAuthzModule.getUserIdFromUri

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 14.0.0, 6.0.0
    • Fix Version/s: 13.5.3, 6.0.0, 14.1.2, 5.5.2
    • Component/s: rest
    • Labels:
    • Environment:
      Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
      Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)

      Apache Tomcat 8

      AM 5.0.0
    • Target Version/s:
    • Sprint:
      AM Sustaining Sprint 48
    • Story Points:
      2
    • Needs backport:
      Yes
    • Support Ticket IDs:
    • Needs QA verification:
      Yes
    • Functional tests:
      No
    • Are the reproduction steps defined?:
      Yes and I used the same an in the description

      Description

      Bug description

      NPE when accessing XUI Dashboard as user

      How to reproduce the issue

      1. Configured AM 5.0.0 with embedded configuration data store and user data store
      2. configure user data store to use
        "sun-idrepo-ldapv3-config-auth-naming-attr" : "mail"
        "sun-idrepo-ldapv3-config-users-search-attribute" : "mail"
      3. set up auth-chain with data store, HOTP and device print/save
      4. setup an SMTP server to get onetimepassword via email
      5. set email address for 'demo' user
      6. perform service-based auth with this chain and user 'demo'
      7. click on dashboard
      Expected behaviour
      NPEs should never occur
      
      Current behaviour

      The following shows up in CoreSystem debug log

      frRest:10/24/2017 05:10:15:065 PM CEST: Thread[http-nio-8080-exec-5,5,main]: TransactionId[002f1417-3e4d-417a-bfc5-1ca4f9d0a7ed-26183]
      ERROR: A runtime exception occurred during the CREST request handling
      java.lang.NullPointerException
      	at org.forgerock.openam.rest.authz.ResourceOwnerOrSuperUserAuthzModule.getUserIdFromUri(ResourceOwnerOrSuperUserAuthzModule.java:76)
      	at org.forgerock.openam.rest.authz.ResourceOwnerOrSuperUserAuthzModule.validateToken(ResourceOwnerOrSuperUserAuthzModule.java:63)
      	at org.forgerock.openam.rest.authz.SSOTokenAuthzModule.authorize(SSOTokenAuthzModule.java:81)
      	at org.forgerock.openam.rest.authz.SSOTokenAuthzModule.authorizeQuery(SSOTokenAuthzModule.java:74)
      	at org.forgerock.openam.rest.authz.LoggingAuthzModule.authorizeQuery(LoggingAuthzModule.java:119)
      	at org.forgerock.authz.filter.crest.AuthorizationFilters$AuthorizationFilter.filterQuery(AuthorizationFilters.java:337)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:93)
      	at org.forgerock.json.resource.FilterChain.handleQuery(FilterChain.java:246)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:95)
      	at org.forgerock.openam.rest.fluent.AuditFilter.filterQuery(AuditFilter.java:166)
      	at org.forgerock.openam.rest.fluent.AuditFilterWrapper.filterQuery(AuditFilterWrapper.java:76)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:93)
      	at org.forgerock.openam.rest.fluent.CrestLoggingFilter.filterQuery(CrestLoggingFilter.java:139)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:93)
      	at org.forgerock.openam.rest.ContextFilter.filterQuery(ContextFilter.java:73)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:93)
      	at org.forgerock.openam.rest.AuthenticationEnforcer.filterQuery(AuthenticationEnforcer.java:165)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:93)
      	at org.forgerock.json.resource.FilterChain.handleQuery(FilterChain.java:246)
      	at org.forgerock.json.resource.Router.handleQuery(Router.java:319)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:95)
      	at org.forgerock.openam.rest.ContextFilter.filterQuery(ContextFilter.java:73)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:93)
      	at org.forgerock.json.resource.FilterChain.handleQuery(FilterChain.java:246)
      	at org.forgerock.json.resource.InternalConnection.queryAsync(InternalConnection.java:74)
      	at org.forgerock.json.resource.http.RequestRunner.visitQueryRequest(RequestRunner.java:254)
      	at org.forgerock.json.resource.http.RequestRunner.visitQueryRequest(RequestRunner.java:87)
      	at org.forgerock.json.resource.Requests$QueryRequestImpl.accept(Requests.java:440)
      	at org.forgerock.json.resource.http.RequestRunner.handleResult(RequestRunner.java:133)
      	at org.forgerock.json.resource.http.HttpAdapter$1.apply(HttpAdapter.java:717)
      	at org.forgerock.json.resource.http.HttpAdapter$1.apply(HttpAdapter.java:714)
      	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.json.resource.http.HttpAdapter.doRequest(HttpAdapter.java:713)
      	at org.forgerock.json.resource.http.HttpAdapter.doQuery(HttpAdapter.java:472)
      	at org.forgerock.json.resource.http.HttpAdapter.handle(HttpAdapter.java:285)
      	at org.forgerock.http.handler.Handlers$HandlerDescribableAsDescribableHandler.handle(Handlers.java:146)
      	at org.forgerock.http.filter.OptionsFilter.filter(OptionsFilter.java:69)
      	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:729)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
      	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
      	at org.forgerock.openam.rest.ProtocolVersionFilter.doFilter(ProtocolVersionFilter.java:65)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
      	at org.forgerock.openam.validation.ResponseValidationFilter.doFilter(ResponseValidationFilter.java:36)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
      	at org.forgerock.openam.headers.SetHeadersFilter.doFilter(SetHeadersFilter.java:80)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
      	at com.sun.identity.setup.AMSetupFilter.doFilter(AMSetupFilter.java:111)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
      	at org.forgerock.openam.audit.context.AuditContextFilter.doFilter(AuditContextFilter.java:43)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:108)
      	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:522)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
      	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
      	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:1110)
      	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
      	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:785)
      	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1425)
      	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      	at java.lang.Thread.run(Thread.java:745)
      
      frRest:10/24/2017 05:10:15:065 PM CEST: Thread[http-nio-8080-exec-7,5,main]: TransactionId[002f1417-3e4d-417a-bfc5-1ca4f9d0a7ed-26180]
      ERROR: A runtime exception occurred during the CREST request handling
      java.lang.NullPointerException
      	at org.forgerock.openam.rest.authz.ResourceOwnerOrSuperUserAuthzModule.getUserIdFromUri(ResourceOwnerOrSuperUserAuthzModule.java:76)
      	at org.forgerock.openam.rest.authz.ResourceOwnerOrSuperUserAuthzModule.validateToken(ResourceOwnerOrSuperUserAuthzModule.java:63)
      	at org.forgerock.openam.rest.authz.SSOTokenAuthzModule.authorize(SSOTokenAuthzModule.java:81)
      	at org.forgerock.openam.rest.authz.SSOTokenAuthzModule.authorizeQuery(SSOTokenAuthzModule.java:74)
      	at org.forgerock.openam.rest.authz.LoggingAuthzModule.authorizeQuery(LoggingAuthzModule.java:119)
      	at org.forgerock.authz.filter.crest.AuthorizationFilters$AuthorizationFilter.filterQuery(AuthorizationFilters.java:337)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:93)
      	at org.forgerock.json.resource.FilterChain.handleQuery(FilterChain.java:246)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:95)
      	at org.forgerock.openam.rest.fluent.AuditFilter.filterQuery(AuditFilter.java:166)
      	at org.forgerock.openam.rest.fluent.AuditFilterWrapper.filterQuery(AuditFilterWrapper.java:76)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:93)
      	at org.forgerock.openam.rest.fluent.CrestLoggingFilter.filterQuery(CrestLoggingFilter.java:139)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:93)
      	at org.forgerock.openam.rest.ContextFilter.filterQuery(ContextFilter.java:73)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:93)
      	at org.forgerock.openam.rest.AuthenticationEnforcer.filterQuery(AuthenticationEnforcer.java:165)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:93)
      	at org.forgerock.json.resource.FilterChain.handleQuery(FilterChain.java:246)
      	at org.forgerock.json.resource.Router.handleQuery(Router.java:319)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:95)
      	at org.forgerock.openam.rest.ContextFilter.filterQuery(ContextFilter.java:73)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:93)
      	at org.forgerock.json.resource.FilterChain.handleQuery(FilterChain.java:246)
      	at org.forgerock.json.resource.InternalConnection.queryAsync(InternalConnection.java:74)
      	at org.forgerock.json.resource.http.RequestRunner.visitQueryRequest(RequestRunner.java:254)
      	at org.forgerock.json.resource.http.RequestRunner.visitQueryRequest(RequestRunner.java:87)
      	at org.forgerock.json.resource.Requests$QueryRequestImpl.accept(Requests.java:440)
      	at org.forgerock.json.resource.http.RequestRunner.handleResult(RequestRunner.java:133)
      	at org.forgerock.json.resource.http.HttpAdapter$1.apply(HttpAdapter.java:717)
      	at org.forgerock.json.resource.http.HttpAdapter$1.apply(HttpAdapter.java:714)
      	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.json.resource.http.HttpAdapter.doRequest(HttpAdapter.java:713)
      	at org.forgerock.json.resource.http.HttpAdapter.doQuery(HttpAdapter.java:472)
      	at org.forgerock.json.resource.http.HttpAdapter.handle(HttpAdapter.java:285)
      	at org.forgerock.http.handler.Handlers$HandlerDescribableAsDescribableHandler.handle(Handlers.java:146)
      	at org.forgerock.http.filter.OptionsFilter.filter(OptionsFilter.java:69)
      	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:729)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
      	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
      	at org.forgerock.openam.rest.ProtocolVersionFilter.doFilter(ProtocolVersionFilter.java:65)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
      	at org.forgerock.openam.validation.ResponseValidationFilter.doFilter(ResponseValidationFilter.java:36)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
      	at org.forgerock.openam.headers.SetHeadersFilter.doFilter(SetHeadersFilter.java:80)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
      	at com.sun.identity.setup.AMSetupFilter.doFilter(AMSetupFilter.java:111)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
      	at org.forgerock.openam.audit.context.AuditContextFilter.doFilter(AuditContextFilter.java:43)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:108)
      	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:522)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
      	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
      	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:1110)
      	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
      	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:785)
      	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1425)
      	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      	at java.lang.Thread.run(Thread.java:745)
      

      Code analysis

      org.forgerock.openam.rest.authz.ResourceOwnerOrSuperUserAuthzModule
          protected String getUserIdFromUri(Context context) throws InternalServerErrorException {
              String username = context.asContext(UriRouterContext.class).getUriTemplateVariables().get("user");
              String realm = context.asContext(RealmContext.class).getRealm().asPath();
              return IdUtils.getIdentity(username, realm).getUniversalId();
          }
      

      IdUtils.getIdentity(username, realm) returns null because the value of username is demo but the IdRepo search attribute is mail, hence no identity is retrieved.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                lawrence.yarham Lawrence Yarham
                Reporter:
                bthalmayr Bernhard Thalmayr
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: