ICEfaces
  1. ICEfaces
  2. ICE-2816

Propagate Spring SecurityContextHolder to pooled threads

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: 1.7Beta1
    • Fix Version/s: 1.8RC2, 1.8
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      ICEfaces, acegi, Spring Security

      Description


      Acegi applies ThreadLocal security contexts (likely set in filters). When work is handed off to a thread in a thread pool, this context is not propagated. This needs to be addressed specifically for the acegi ThreadLocals.

      object was not found in the SecurityContext
      org.acegisecurity.AuthenticationCredentialsNotFoundException: VoterResource.authenticationNotFound: An Authentication object was n

      ot found in the SecurityContext
              at org.acegisecurity.vote.ResourceAccessBean.credentialsNotFound(ResourceAccessBean.java:181)
              at org.acegisecurity.vote.ResourceAccessBean.get(ResourceAccessBean.java:115)
              at com.sun.faces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:79)
              at org.springframework.faces.webflow.el.AbstractFlowExecutionPropertyResolver.getValue(AbstractFlowExecutionPropertyResolv

      er.java:77)
              at org.springframework.faces.webflow.el.WebFlowPropertyResolver.getValue(WebFlowPropertyResolver.java:70)
              at com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:141)
              at com.sun.el.parser.AstValue.getValue(AstValue.java:96)
              at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:183)
              at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
              at com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBinding.java:56)
              at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:335)
              at com.icesoft.faces.component.paneltabset.PanelTab.isRendered(PanelTab.java:310)
              at com.icesoft.faces.component.paneltabset.PanelTabSetRenderer.encodeEnd(PanelTabSetRenderer.java:368)
              at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:740)
              at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:362)

              at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:358)

              at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:358)

              at com.icesoft.faces.renderkit.dom_html_basic.GridRenderer.encodeChildren(GridRenderer.java:196)
              at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:721)
              at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:532)
              at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:536)
              at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:536)
              at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:536)
              at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:286)
              at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:154)
              at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:107)
              at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
              at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:137)
              at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.render(PersistentFacesState.java:151)
              at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.executeAndRender(PersistentFacesState.java:293)
              at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState$RenderRunner.run(PersistentFacesState.java:330)
              at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:643)

              at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:668)
              at java.lang.Thread.run(Thread.java:534)

        Issue Links

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Ted Goddard
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: