-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Exception in UI when attacks should be displayed/are created #106
Comments
Can you show me how you're sending events? |
also, can you share the appsensor log for the UI and the rest backend? |
Hey, Method that wraps AppSensor processes:
And the class that executes the reporting:
Please not that the source code is for a POC so it has a lot of space for improvements. Now the logs: Startup log of rest-server:
Startup log of the UI:
Now adding an event (access a secured ressource without JWT header)from the way shown above: Server:
Now I call the UI:
That are the logs. Additionally, my app-sensor-server-config. For demo purposes, all thresholds are set to 1:
|
Hello,
I am using ApPSensor 2.3.3 and report Events to it. However, as soon as a Attack is reported or creted by threshholds, the UI fails displaying detection points and the event graph with the following stacktrace. Server and UI are version 2.3.3
2020-02-26 11:23:22.527 ERROR 1 --- [nio-8084-exec-1] o.o.a.u.h.AssociatedApplicationsFilter : Error setting associated applications. appsensor-ui | appsensor-ui | org.springframework.web.util.NestedServletException: Request processing failed; nested exception is javax.ws.rs.ProcessingException: Error reading entity from input stream. appsensor-ui | at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:979) appsensor-ui | at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:858) appsensor-ui | at javax.servlet.http.HttpServlet.service(HttpServlet.java:622) appsensor-ui | at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:843) appsensor-ui | at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) appsensor-ui | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291) appsensor-ui | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) appsensor-ui | at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) appsensor-ui | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) appsensor-ui | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) appsensor-ui | at org.springframework.boot.actuate.autoconfigure.EndpointWebMvcAutoConfiguration$ApplicationContextHeaderFilter.doFilterInternal(EndpointWebMvcAutoConfiguration.java:295) appsensor-ui | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) appsensor-ui | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) appsensor-ui | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) appsensor-ui | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) appsensor-ui | at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118) appsensor-ui | at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84) appsensor-ui | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) appsensor-ui | at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) appsensor-ui | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) appsensor-ui | at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103) appsensor-ui | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) appsensor-ui | at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113) appsensor-ui | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) appsensor-ui | at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154) appsensor-ui | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) appsensor-ui | at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45) appsensor-ui | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) appsensor-ui | at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199) appsensor-ui | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) appsensor-ui | at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110) appsensor-ui | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) appsensor-ui | at org.springframework.security.web.csrf.CsrfFilter.doFilterInternal(CsrfFilter.java:85) appsensor-ui | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) appsensor-ui | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) appsensor-ui | at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:57) appsensor-ui | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) appsensor-ui | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) appsensor-ui | at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) appsensor-ui | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) appsensor-ui | at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50) appsensor-ui | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) appsensor-ui | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) appsensor-ui | at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192) appsensor-ui | at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160) appsensor-ui | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) appsensor-ui | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) appsensor-ui | at org.owasp.appsensor.ui.handler.AssociatedApplicationsFilter.doFilter(AssociatedApplicationsFilter.java:31) appsensor-ui | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) appsensor-ui | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) appsensor-ui | at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:102) appsensor-ui | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) appsensor-ui | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) appsensor-ui | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) appsensor-ui | at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77) appsensor-ui | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) appsensor-ui | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) appsensor-ui | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) appsensor-ui | at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85) appsensor-ui | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) appsensor-ui | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) appsensor-ui | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) appsensor-ui | at org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:69) appsensor-ui | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) appsensor-ui | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) appsensor-ui | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) appsensor-ui | at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219) appsensor-ui | at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) appsensor-ui | at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) appsensor-ui | at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142) appsensor-ui | at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) appsensor-ui | at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) appsensor-ui | at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518) appsensor-ui | at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091) appsensor-ui | at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:673) appsensor-ui | at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1526) appsensor-ui | at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1482) appsensor-ui | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) appsensor-ui | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) appsensor-ui | at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) appsensor-ui | at java.lang.Thread.run(Thread.java:748) appsensor-ui | Caused by: javax.ws.rs.ProcessingException: Error reading entity from input stream. appsensor-ui | at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:866) appsensor-ui | at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:810) appsensor-ui | at org.glassfish.jersey.client.ClientResponse.readEntity(ClientResponse.java:368) appsensor-ui | at org.glassfish.jersey.client.JerseyInvocation.translate(JerseyInvocation.java:846) appsensor-ui | at org.glassfish.jersey.client.JerseyInvocation.access$600(JerseyInvocation.java:91) appsensor-ui | at org.glassfish.jersey.client.JerseyInvocation$3.call(JerseyInvocation.java:705) appsensor-ui | at org.glassfish.jersey.internal.Errors.process(Errors.java:315) appsensor-ui | at org.glassfish.jersey.internal.Errors.process(Errors.java:297) appsensor-ui | at org.glassfish.jersey.internal.Errors.process(Errors.java:228) appsensor-ui | at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:424) appsensor-ui | at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:701) appsensor-ui | at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:417) appsensor-ui | at org.glassfish.jersey.client.JerseyInvocation$Builder.get(JerseyInvocation.java:313) appsensor-ui | at org.owasp.appsensor.ui.rest.RestReportingEngineFacade.findAttacks(RestReportingEngineFacade.java:93) appsensor-ui | at org.owasp.appsensor.ui.rest.RestReportingEngineFacade$$FastClassBySpringCGLIB$$5b83c141.invoke(<generated>) appsensor-ui | at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) appsensor-ui | at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:717) appsensor-ui | at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) appsensor-ui | at org.springframework.cache.interceptor.CacheInterceptor$1.invoke(CacheInterceptor.java:52) appsensor-ui | at org.springframework.cache.interceptor.CacheAspectSupport.invokeOperation(CacheAspectSupport.java:317) appsensor-ui | at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:350) appsensor-ui | at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:299) appsensor-ui | at org.springframework.cache.interceptor.CacheInterceptor.invoke(CacheInterceptor.java:61) appsensor-ui | at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) appsensor-ui | at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:653) appsensor-ui | at org.owasp.appsensor.ui.rest.RestReportingEngineFacade$$EnhancerBySpringCGLIB$$7c94a485.findAttacks(<generated>) appsensor-ui | at org.owasp.appsensor.ui.controller.DashboardController.byCategory(DashboardController.java:124) appsensor-ui | at org.owasp.appsensor.ui.controller.DashboardController.allContent(DashboardController.java:56) appsensor-ui | at org.owasp.appsensor.ui.controller.DashboardController$$FastClassBySpringCGLIB$$41fbf83.invoke(<generated>) appsensor-ui | at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) appsensor-ui | at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:717) appsensor-ui | at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) appsensor-ui | at org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:64) appsensor-ui | at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) appsensor-ui | at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:653) appsensor-ui | at org.owasp.appsensor.ui.controller.DashboardController$$EnhancerBySpringCGLIB$$74f7cada.allContent(<generated>) appsensor-ui | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) appsensor-ui | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) appsensor-ui | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) appsensor-ui | at java.lang.reflect.Method.invoke(Method.java:498) appsensor-ui | at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221) appsensor-ui | at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137) appsensor-ui | at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110) appsensor-ui | at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:776) appsensor-ui | at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:705) appsensor-ui | at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) appsensor-ui | at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959) appsensor-ui | at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893) appsensor-ui | at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:967) appsensor-ui | ... 80 common frames omitted appsensor-ui | Caused by: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "name" (class org.owasp.appsensor.core.Attack), not marked as ignorable (8 known properties: "detectionSystem", "timestamp", "id", "detectionPoint", "user", "rule", "resource", "metadata"]) appsensor-ui | at [Source: org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream@abcc33; line: 1, column: 520] (through reference chain: java.util.ArrayList[0]->org.owasp.appsensor.core.Attack["name"]) appsensor-ui | at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:51) appsensor-ui | at com.fasterxml.jackson.databind.DeserializationContext.reportUnknownProperty(DeserializationContext.java:744) appsensor-ui | at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:915) appsensor-ui | at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1306) appsensor-ui | at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownVanilla(BeanDeserializerBase.java:1284) appsensor-ui | at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:243) appsensor-ui | at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:118) appsensor-ui | at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:232) appsensor-ui | at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:206) appsensor-ui | at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:25) appsensor-ui | at com.fasterxml.jackson.databind.ObjectReader._bind(ObjectReader.java:1232) appsensor-ui | at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:676) appsensor-ui | at com.fasterxml.jackson.jaxrs.base.ProviderBase.readFrom(ProviderBase.java:777) appsensor-ui | at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.invokeReadFrom(ReaderInterceptorExecutor.java:264) appsensor-ui | at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.aroundReadFrom(ReaderInterceptorExecutor.java:234) appsensor-ui | at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor.proceed(ReaderInterceptorExecutor.java:154) appsensor-ui | at org.glassfish.jersey.message.internal.MessageBodyFactory.readFrom(MessageBodyFactory.java:1124) appsensor-ui | at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:851) appsensor-ui | ... 128 common frames omitted appsensor-ui |
The text was updated successfully, but these errors were encountered: