Hi!
I have been using OpenMaint for the last weeks testing it, I already created some preventive activity definitions with their preventive tasks. I have no problem at all if I’m using a user with Admin rights, but if I try to list the preventive tasks with a user with any other rights (even the Limited Administrator), i get the next generic error:
java.lang.IllegalArgumentException: access denied: invalid unsafe cql =< from PrevMaintTask where PrevMaintDef = 0{client:Id} >
The Node information is:
3.4.3 [ff7eb8d/3.4.3 (2023-12-14T14:41:15Z) (dirty)]
I just updated it to check if it was a known bug.
Does any one know how can this be fixed or can point me to the right direction?
Thanks.
Best regards.
The cmdbuild_req.log show the next errors:
2024-02-01T09:15:45.455-06:00 [req:26d92a] ERROR o.c.s.r.v.p.ExceptionHandlerService - ws processing error
org.cmdbuild.utils.ws3.utils.Ws3Exception: error processing request =< ws3rest:get:classes/PrevMaintTask/cards >
at org.cmdbuild.utils.ws3.servlet.Ws3RestRequestHandlerServlet.handleRequest(Ws3RestRequestHandlerServlet.java:31) ~[cmdbuild-utils-ws3-3.4.3.jar:3.4.3]
at org.cmdbuild.utils.ws3.servlet.Ws3AbstractHandlerServlet.service(Ws3AbstractHandlerServlet.java:99) ~[cmdbuild-utils-ws3-3.4.3.jar:3.4.3]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:764) ~[tomcat-servlet-api.jar:na]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227) ~[catalina.jar:9.0.62]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[catalina.jar:9.0.62]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-websocket.jar:9.0.62]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[catalina.jar:9.0.62]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[catalina.jar:9.0.62]
at org.cmdbuild.webapp.filters.AsyncJobFilter.doFilterInternal(AsyncJobFilter.java:49) ~[classes/:3.4.3]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.30.jar:5.3.30]
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354) ~[spring-web-5.3.30.jar:5.3.30]
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267) ~[spring-web-5.3.30.jar:5.3.30]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[catalina.jar:9.0.62]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[catalina.jar:9.0.62]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:352) ~[spring-security-web-5.8.8.jar:5.8.8]
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:117) ~[spring-security-web-5.8.8.jar:5.8.8]
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83) ~[spring-security-web-5.8.8.jar:5.8.8]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361) ~[spring-security-web-5.8.8.jar:5.8.8]
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:126) ~[spring-security-web-5.8.8.jar:5.8.8]
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:120) ~[spring-security-web-5.8.8.jar:5.8.8]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361) ~[spring-security-web-5.8.8.jar:5.8.8]
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:131) ~[spring-security-web-5.8.8.jar:5.8.8]
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:85) ~[spring-security-web-5.8.8.jar:5.8.8]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361) ~[spring-security-web-5.8.8.jar:5.8.8]
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:100) ~[spring-security-web-5.8.8.jar:5.8.8]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361) ~[spring-security-web-5.8.8.jar:5.8.8]
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:164) ~[spring-security-web-5.8.8.jar:5.8.8]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361) ~[spring-security-web-5.8.8.jar:5.8.8]
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63) ~[spring-security-web-5.8.8.jar:5.8.8]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361) ~[spring-security-web-5.8.8.jar:5.8.8]
at org.cmdbuild.webapp.security.SessionTokenFilter.doFilterInternal(SessionTokenFilter.java:177) ~[classes/:3.4.3]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.30.jar:5.3.30]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361) ~[spring-security-web-5.8.8.jar:5.8.8]
at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91) ~[spring-web-5.3.30.jar:5.3.30]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.30.jar:5.3.30]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361) ~[spring-security-web-5.8.8.jar:5.8.8]
at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90) ~[spring-security-web-5.8.8.jar:5.8.8]
at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75) ~[spring-security-web-5.8.8.jar:5.8.8]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.30.jar:5.3.30]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361) ~[spring-security-web-5.8.8.jar:5.8.8]
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:117) ~[spring-security-web-5.8.8.jar:5.8.8]
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) ~[spring-security-web-5.8.8.jar:5.8.8]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361) ~[spring-security-web-5.8.8.jar:5.8.8]
at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:62) ~[spring-security-web-5.8.8.jar:5.8.8]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.30.jar:5.3.30]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361) ~[spring-security-web-5.8.8.jar:5.8.8]
at org.springframework.security.web.session.DisableEncodeUrlFilter.doFilterInternal(DisableEncodeUrlFilter.java:42) ~[spring-security-web-5.8.8.jar:5.8.8]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.30.jar:5.3.30]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361) ~[spring-security-web-5.8.8.jar:5.8.8]
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:225) ~[spring-security-web-5.8.8.jar:5.8.8]
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:190) ~[spring-security-web-5.8.8.jar:5.8.8]
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354) ~[spring-web-5.3.30.jar:5.3.30]
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267) ~[spring-web-5.3.30.jar:5.3.30]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[catalina.jar:9.0.62]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[catalina.jar:9.0.62]
at org.cmdbuild.webapp.filters.LanguageFilter.doFilterInternal(LanguageFilter.java:54) ~[classes/:3.4.3]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.30.jar:5.3.30]
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354) ~[spring-web-5.3.30.jar:5.3.30]
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267) ~[spring-web-5.3.30.jar:5.3.30]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[catalina.jar:9.0.62]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[catalina.jar:9.0.62]
at org.cmdbuild.webapp.filters.RequestTrackingFilter.doFilterInternal(RequestTrackingFilter.java:190) ~[classes/:3.4.3]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.30.jar:5.3.30]
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354) ~[spring-web-5.3.30.jar:5.3.30]
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267) ~[spring-web-5.3.30.jar:5.3.30]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[catalina.jar:9.0.62]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[catalina.jar:9.0.62]
at org.cmdbuild.webapp.filters.BootCheckFilter.doFilterAfterBootCheck(BootCheckFilter.java:111) ~[classes/:3.4.3]
at org.cmdbuild.webapp.filters.BootCheckFilter.doFilterInternal(BootCheckFilter.java:70) ~[classes/:3.4.3]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.30.jar:5.3.30]
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354) ~[spring-web-5.3.30.jar:5.3.30]
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267) ~[spring-web-5.3.30.jar:5.3.30]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[catalina.jar:9.0.62]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[catalina.jar:9.0.62]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197) ~[catalina.jar:9.0.62]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) ~[catalina.jar:9.0.62]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541) ~[catalina.jar:9.0.62]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135) ~[catalina.jar:9.0.62]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) ~[catalina.jar:9.0.62]
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687) ~[catalina.jar:9.0.62]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) ~[catalina.jar:9.0.62]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360) ~[catalina.jar:9.0.62]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399) ~[tomcat-coyote.jar:9.0.62]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) ~[tomcat-coyote.jar:9.0.62]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:890) ~[tomcat-coyote.jar:9.0.62]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1743) ~[tomcat-coyote.jar:9.0.62]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-coyote.jar:9.0.62]
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) ~[tomcat-util.jar:9.0.62]
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) ~[tomcat-util.jar:9.0.62]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-util.jar:9.0.62]
at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]
Caused by: org.cmdbuild.utils.ws3.utils.Ws3Exception: error processing request with handler = Ws3RequestMethodHanlder{service=org.cmdbuild.service.rest.v3.endpoint.CardWs, method=readMany}
at org.cmdbuild.utils.ws3.inner.Ws3RequestHandlerImpl.handleRequest(Ws3RequestHandlerImpl.java:83) ~[cmdbuild-utils-ws3-3.4.3.jar:3.4.3]
at org.cmdbuild.utils.ws3.servlet.Ws3RestRequestHandlerServlet.handleRequest(Ws3RestRequestHandlerServlet.java:29) ~[cmdbuild-utils-ws3-3.4.3.jar:3.4.3]
… 90 common frames omitted
Caused by: org.cmdbuild.utils.ws3.utils.Ws3Exception: error processing ws3 request = Ws3RestRequest{uri=ws3rest:get:classes/PrevMaintTask/cards}
at org.cmdbuild.utils.ws3.inner.Ws3RequestMethodHandler.handleRequest(Ws3RequestMethodHandler.java:86) ~[cmdbuild-utils-ws3-3.4.3.jar:3.4.3]
at org.cmdbuild.utils.ws3.inner.Ws3RequestHandlerImpl.handleRequest(Ws3RequestHandlerImpl.java:81) ~[cmdbuild-utils-ws3-3.4.3.jar:3.4.3]
… 91 common frames omitted
Caused by: java.lang.IllegalArgumentException: access denied: invalid unsafe cql =< from PrevMaintTask where PrevMaintDef = 0{client:Id} >
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:218) ~[guava-32.1.2-jre.jar:na]
at org.cmdbuild.classe.access.UserFilterAccessServiceImpl.checkUnsafeCql(UserFilterAccessServiceImpl.java:62) ~[cmdbuild-core-access-3.4.3.jar:3.4.3]
at org.cmdbuild.classe.access.UserFilterAccessServiceImpl.checkUserFilterAccess(UserFilterAccessServiceImpl.java:47) ~[cmdbuild-core-access-3.4.3.jar:3.4.3]
at org.cmdbuild.classe.access.UserCardServiceImpl.getUserCards(UserCardServiceImpl.java:333) ~[cmdbuild-core-access-3.4.3.jar:3.4.3]
at org.cmdbuild.classe.access.UserCardService.getUserCards(UserCardService.java:72) ~[cmdbuild-core-api-3.4.3.jar:3.4.3]
at org.cmdbuild.service.rest.common.helpers.CardsForDomainFetcherImpl.fetchCards(CardsForDomainFetcherImpl.java:65) ~[cmdbuild-services-rest-commons-3.4.3.jar:3.4.3]
at org.cmdbuild.service.rest.v3.endpoint.CardWs.readMany(CardWs.java:178) ~[cmdbuild-services-rest-v3-3.4.3.jar:3.4.3]
at jdk.internal.reflect.GeneratedMethodAccessor433.invoke(Unknown Source) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
at org.cmdbuild.utils.ws3.inner.Ws3RequestMethodHandler.handleRequest(Ws3RequestMethodHandler.java:82) ~[cmdbuild-utils-ws3-3.4.3.jar:3.4.3]
… 92 common frames omitted