Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-18508

Access (view) denied randomly on pages and solr search

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 15.6-rc-1
    • 12.10.4, 13.5, 13.6
    • Security
    • None
    • Unit
    • Unknown
    • N/A
    • N/A

    Description

      Since we upgrade from 10.11.9 to 12.10.4 we are encountering some permission exception while trying to access a page or even to perform a search in the global solr search.

      It’s not reproducible easily, it happens randomly, I think often when a page was programatically created ( maybe by someone else or programatically ) and first time visited by a user.

      But as seen in the stack trace in the image it happens also with the solr search. I think we can agree that a search in the solr global search should not throw a stacktrace to the user in any case.

      Did something changed in permission management to start investigating that ?

      Theses view permission issue are simply solved by a refresh of the page or re-hitting the search, but maybe it should be critical since it's stacktrace in production.

      The stack trace on solr search

      org.xwiki.rendering.macro.MacroExecutionException: Current user [xwiki:XWiki.chaney08] doesn't have view rights on document [Document xwiki:Main.SolrSearch]
      at org.xwiki.rendering.internal.macro.include.IncludeMacro.execute(IncludeMacro.java:108)
      at org.xwiki.rendering.internal.macro.include.IncludeMacro.execute(IncludeMacro.java:54)
      at org.xwiki.rendering.internal.transformation.macro.MacroTransformation.transform(MacroTransformation.java:297)
      at org.xwiki.rendering.internal.transformation.DefaultRenderingContext.transformInContext(DefaultRenderingContext.java:183)
      at org.xwiki.rendering.internal.transformation.DefaultTransformationManager.performTransformations(DefaultTransformationManager.java:103)
      at org.xwiki.display.internal.DocumentContentAsyncExecutor.executeInCurrentExecutionContext(DocumentContentAsyncExecutor.java:348)
      at org.xwiki.display.internal.DocumentContentAsyncExecutor.execute(DocumentContentAsyncExecutor.java:221)
      at org.xwiki.display.internal.DocumentContentAsyncRenderer.execute(DocumentContentAsyncRenderer.java:107)
      at org.xwiki.rendering.async.internal.block.AbstractBlockAsyncRenderer.render(AbstractBlockAsyncRenderer.java:157)
      at org.xwiki.rendering.async.internal.block.AbstractBlockAsyncRenderer.render(AbstractBlockAsyncRenderer.java:54)
      at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.syncRender(DefaultAsyncRendererExecutor.java:273)
      at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.render(DefaultAsyncRendererExecutor.java:250)
      at org.xwiki.rendering.async.internal.block.DefaultBlockAsyncRendererExecutor.execute(DefaultBlockAsyncRendererExecutor.java:125)
      at org.xwiki.display.internal.DocumentContentDisplayer.display(DocumentContentDisplayer.java:67)
      at org.xwiki.display.internal.DocumentContentDisplayer.display(DocumentContentDisplayer.java:43)
      at org.xwiki.display.internal.DefaultDocumentDisplayer.display(DefaultDocumentDisplayer.java:96)
      at org.xwiki.display.internal.DefaultDocumentDisplayer.display(DefaultDocumentDisplayer.java:39)
      at org.xwiki.sheet.internal.SheetDocumentDisplayer.display(SheetDocumentDisplayer.java:123)
      at org.xwiki.sheet.internal.SheetDocumentDisplayer.display(SheetDocumentDisplayer.java:52)
      at org.xwiki.display.internal.ConfiguredDocumentDisplayer.display(ConfiguredDocumentDisplayer.java:68)
      at org.xwiki.display.internal.ConfiguredDocumentDisplayer.display(ConfiguredDocumentDisplayer.java:42)
      at com.xpn.xwiki.doc.XWikiDocument.display(XWikiDocument.java:1216)
      at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:1357)
      at com.xpn.xwiki.doc.XWikiDocument.displayDocument(XWikiDocument.java:1306)
      at com.xpn.xwiki.doc.XWikiDocument.displayDocument(XWikiDocument.java:1273)
      at com.xpn.xwiki.api.Document.displayDocument(Document.java:786)
      at sun.reflect.GeneratedMethodAccessor529.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:565)
      at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:548)
      at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:219)
      at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:369)
      at org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:701)
      at org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:72)
      at org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:240)
      at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:144)
      at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:423)
      at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:191)
      at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:144)
      at org.xwiki.velocity.internal.directive.TryCatchDirective.render(TryCatchDirective.java:86)
      at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:301)
      at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:423)
      at org.apache.velocity.Template.merge(Template.java:358)
      at org.apache.velocity.Template.merge(Template.java:262)
      at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:284)
      at com.xpn.xwiki.render.DefaultVelocityManager.evaluate(DefaultVelocityManager.java:321)
      at com.xpn.xwiki.internal.template.VelocityTemplateEvaluator.evaluateContent(VelocityTemplateEvaluator.java:95)
      at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.evaluateContent(TemplateAsyncRenderer.java:217)
      at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.renderVelocity(TemplateAsyncRenderer.java:180)
      at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.render(TemplateAsyncRenderer.java:137)
      at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.render(TemplateAsyncRenderer.java:53)
      at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.lambda$syncRender$0(DefaultAsyncRendererExecutor.java:267)
      at com.xpn.xwiki.internal.security.authorization.DefaultAuthorExecutor.call(DefaultAuthorExecutor.java:98)
      at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.syncRender(DefaultAsyncRendererExecutor.java:267)
      at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.render(DefaultAsyncRendererExecutor.java:250)
      at org.xwiki.rendering.async.internal.block.DefaultBlockAsyncRendererExecutor.render(DefaultBlockAsyncRendererExecutor.java:154)
      at com.xpn.xwiki.internal.template.InternalTemplateManager.render(InternalTemplateManager.java:772)
      at com.xpn.xwiki.internal.template.InternalTemplateManager.renderFromSkin(InternalTemplateManager.java:745)
      at com.xpn.xwiki.internal.template.InternalTemplateManager.renderFromSkin(InternalTemplateManager.java:725)
      at com.xpn.xwiki.internal.template.InternalTemplateManager.render(InternalTemplateManager.java:711)
      at com.xpn.xwiki.internal.template.DefaultTemplateManager.render(DefaultTemplateManager.java:78)
      at com.xpn.xwiki.XWiki.evaluateTemplate(XWiki.java:2516)
      at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:2494)
      at com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:983)
      at sun.reflect.GeneratedMethodAccessor216.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:565)
      at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:548)
      at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:219)
      at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:369)
      at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:490)
      at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:144)
      at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:215)
      at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:328)
      at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:258)
      at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:301)
      at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:423)
      at org.apache.velocity.Template.merge(Template.java:358)
      at org.apache.velocity.Template.merge(Template.java:262)
      at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:284)
      at com.xpn.xwiki.render.DefaultVelocityManager.evaluate(DefaultVelocityManager.java:321)
      at com.xpn.xwiki.internal.template.VelocityTemplateEvaluator.evaluateContent(VelocityTemplateEvaluator.java:95)
      at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.evaluateContent(TemplateAsyncRenderer.java:217)
      at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.renderVelocity(TemplateAsyncRenderer.java:180)
      at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.render(TemplateAsyncRenderer.java:137)
      at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.render(TemplateAsyncRenderer.java:53)
      at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.lambda$syncRender$0(DefaultAsyncRendererExecutor.java:267)
      at com.xpn.xwiki.internal.security.authorization.DefaultAuthorExecutor.call(DefaultAuthorExecutor.java:98)
      at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.syncRender(DefaultAsyncRendererExecutor.java:267)
      at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.render(DefaultAsyncRendererExecutor.java:250)
      at org.xwiki.rendering.async.internal.block.DefaultBlockAsyncRendererExecutor.render(DefaultBlockAsyncRendererExecutor.java:154)
      at com.xpn.xwiki.internal.template.InternalTemplateManager.render(InternalTemplateManager.java:772)
      at com.xpn.xwiki.internal.template.InternalTemplateManager.renderFromSkin(InternalTemplateManager.java:745)
      at com.xpn.xwiki.internal.template.InternalTemplateManager.renderFromSkin(InternalTemplateManager.java:725)
      at com.xpn.xwiki.internal.template.InternalTemplateManager.render(InternalTemplateManager.java:711)
      at com.xpn.xwiki.internal.template.DefaultTemplateManager.render(DefaultTemplateManager.java:78)
      at com.xpn.xwiki.XWiki.evaluateTemplate(XWiki.java:2516)
      at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:2494)
      at com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:983)
      at sun.reflect.GeneratedMethodAccessor216.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:565)
      at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:548)
      at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:219)
      at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:369)
      at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:490)
      at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:144)
      at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:215)
      at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:328)
      at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:258)
      at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:301)
      at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:144)
      at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:172)
      at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:144)
      at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:423)
      at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:191)
      at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:423)
      at org.apache.velocity.Template.merge(Template.java:358)
      at org.apache.velocity.Template.merge(Template.java:262)
      at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:284)
      at com.xpn.xwiki.render.DefaultVelocityManager.evaluate(DefaultVelocityManager.java:321)
      at com.xpn.xwiki.internal.template.VelocityTemplateEvaluator.evaluateContent(VelocityTemplateEvaluator.java:95)
      at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.evaluateContent(TemplateAsyncRenderer.java:217)
      at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.renderVelocity(TemplateAsyncRenderer.java:180)
      at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.render(TemplateAsyncRenderer.java:137)
      at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.render(TemplateAsyncRenderer.java:53)
      at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.lambda$syncRender$0(DefaultAsyncRendererExecutor.java:267)
      at com.xpn.xwiki.internal.security.authorization.DefaultAuthorExecutor.call(DefaultAuthorExecutor.java:98)
      at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.syncRender(DefaultAsyncRendererExecutor.java:267)
      at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.render(DefaultAsyncRendererExecutor.java:250)
      at org.xwiki.rendering.async.internal.block.DefaultBlockAsyncRendererExecutor.render(DefaultBlockAsyncRendererExecutor.java:154)
      at com.xpn.xwiki.internal.template.InternalTemplateManager.render(InternalTemplateManager.java:772)
      at com.xpn.xwiki.internal.template.InternalTemplateManager.renderFromSkin(InternalTemplateManager.java:745)
      at com.xpn.xwiki.internal.template.InternalTemplateManager.renderFromSkin(InternalTemplateManager.java:725)
      at com.xpn.xwiki.internal.template.InternalTemplateManager.render(InternalTemplateManager.java:711)
      at com.xpn.xwiki.internal.template.DefaultTemplateManager.render(DefaultTemplateManager.java:78)
      at com.xpn.xwiki.XWiki.evaluateTemplate(XWiki.java:2516)
      at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:179)
      at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:572)
      at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:250)
      at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
      at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:122)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at org.xwiki.wysiwyg.filter.ConversionFilter.doFilter(ConversionFilter.java:109)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:132)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
      at org.keycloak.adapters.tomcat.AbstractAuthenticatedActionsValve.invoke(AbstractAuthenticatedActionsValve.java:67)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
      at org.keycloak.adapters.tomcat.AbstractKeycloakAuthenticatorValve.invoke(AbstractKeycloakAuthenticatorValve.java:181)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
      at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
      at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
      at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
      at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:770)
      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)
      at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      at java.lang.Thread.run(Thread.java:748)
      

       

      Attachments

        1. 2021_08_20.jetty.log
          87 kB
          Patrick Koska
        2. 2021-08-04 16_23_43-.png
          260 kB
          Patrick Koska
        3. image.png
          69 kB
          Axel
        4. image-2021-08-04-16-42-47-300.png
          260 kB
          Patrick Koska
        5. Screenshot 2021-03-26 at 16.20.28.png
          14 kB
          Axel
        6. stacktraceDefaultSecurityCacheLoader.txt
          19 kB
          Axel
        7. threadDump.txt
          90 kB
          Patrick Koska

        Issue Links

          Activity

            People

              MichaelHamann Michael Hamann
              cracky5457 Axel
              Votes:
              2 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: