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

Atlassian JIRA | Kah Loun Foong [Atlassian] | 6 months ago
  1. 0

    h3. Summary Adding a Plan with "en dash" in the name into another Plan Dependencies will break the Plan Dependencies page h3. Steps to Reproduce # Create a Plan with a name "Test – Test" # Add this Plan into another Plan Dependencies as a child plan # Click on the Save button h3. Expected Results The Plan Dependencies page will reload successfully h3. Actual Results The Plan Dependencies page will break with 500 Exception and it will always have the error. The below exception is thrown in the atlassian-bamboo.log file: {noformat} 2016-06-06 22:37:03,206 INFO [http-bio-8085-exec-13] [AccessLogFilter] kahloun.foong GET http://localhost:8085/chain/admin/config/editChainDependencies.action?planKey=BAM-STAS&saved=true 93230kb 2016-06-06 22:37:03,294 WARN [http-bio-8085-exec-13] [AuthorizationLoggerListener] Credentials not found: org.acegisecurity.AuthenticationCredentialsNotFoundException: An Authentication object was not found in the SecurityContext; secure object: com.atlassian.bamboo.ww2.actions.plans.admin.ConfigurePlanDependencies@61e0b86c; configuration attributes: [WW_EDIT, WW_NEWOBJECT, GLOBAL_READ] 2016-06-06 22:37:03,294 ERROR [http-bio-8085-exec-13] [ExceptionMappingInterceptor] An Authentication object was not found in the SecurityContext org.acegisecurity.AuthenticationCredentialsNotFoundException: An Authentication object was not found in the SecurityContext at org.acegisecurity.intercept.AbstractSecurityInterceptor.credentialsNotFound(AbstractSecurityInterceptor.java:339) at org.acegisecurity.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:261) at com.atlassian.bamboo.security.acegi.intercept.web.WebworkSecurityInterceptor.intercept(WebworkSecurityInterceptor.java:64) at com.atlassian.bamboo.security.acegi.intercept.web.WebworkSecurityInterceptorProxy.intercept(WebworkSecurityInterceptorProxy.java:31) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) at com.atlassian.xwork.interceptors.AroundInterceptor.intercept(AroundInterceptor.java:25) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) at com.atlassian.bamboo.ww2.interceptors.OnDemandNotSupportedInterceptor.intercept(OnDemandNotSupportedInterceptor.java:31) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) at com.atlassian.bamboo.ww2.interceptors.PaginationAwareInterceptor.doIntercept(PaginationAwareInterceptor.java:100) at com.atlassian.bamboo.ww2.interceptors.AbstractBambooInterceptor.intercept(AbstractBambooInterceptor.java:34) ... 2016-06-06 22:37:03,302 ERROR [http-bio-8085-exec-13] [FiveOhOh] 500 Exception was thrown. javax.servlet.ServletException: Filter execution threw an exception at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:267) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:70) at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:25) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:78) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:70) at com.atlassian.prettyurls.filter.PrettyUrlsSiteMeshFixupFilter.doFilter(PrettyUrlsSiteMeshFixupFilter.java:36) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:78) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:70) at com.atlassian.prettyurls.filter.PrettyUrlsDispatcherFilter.doFilter(PrettyUrlsDispatcherFilter.java:60) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:78) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:70) ... Caused by: freemarker.core.TokenMgrError: Lexical error at line 26, column 114. Encountered: "u" (117), after : "\"Test \\" at freemarker.core.FMParserTokenManager.getNextToken(FMParserTokenManager.java:6447) at freemarker.core.FMParser.jj_ntk(FMParser.java:4613) at freemarker.core.FMParser.UnaryExpression(FMParser.java:300) at freemarker.core.FMParser.MultiplicativeExpression(FMParser.java:435) at freemarker.core.FMParser.AdditiveExpression(FMParser.java:385) at freemarker.core.FMParser.RangeExpression(FMParser.java:556) at freemarker.core.FMParser.RelationalExpression(FMParser.java:511) at freemarker.core.FMParser.EqualityExpression(FMParser.java:476) at freemarker.core.FMParser.AndExpression(FMParser.java:585) at freemarker.core.FMParser.OrExpression(FMParser.java:608) at freemarker.core.FMParser.Expression(FMParser.java:221) at freemarker.core.FMParser.HashLiteral(FMParser.java:1036) {noformat} h3. Notes In some cases, it will just auto reload to the All Dashboard page h3.Workaround Edit all Plan Names that have en dash "–" to use hyphen-minus "-"

    Atlassian JIRA | 6 months ago | Kah Loun Foong [Atlassian]
    org.acegisecurity.AuthenticationCredentialsNotFoundException: An Authentication object was not found in the SecurityContext
  2. 0

    Client-Server-Authentication with RMI - Spring Forum

    spring.io | 1 year ago
    org.acegisecurity.AuthenticationCredentialsNotFoundException: An Authentication object was not found in the SecurityContext
  3. 0

    How Spring Security hooks to Central Authentication Service (CAS) | mattfleming.com

    mattfleming.com | 1 year ago
    org.acegisecurity.AuthenticationCredentialsNotFoundException: An Authentication object was not found in the SecurityContext
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    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)

    ICEsoft JIRA Issue Tracker | 9 years ago | Ted Goddard
    org.acegisecurity.AuthenticationCredentialsNotFoundException: VoterResource.authenticationNotFound: An Authentication object was n ot found in the SecurityContext
  6. 0

    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)

    ICEsoft JIRA Issue Tracker | 9 years ago | Ted Goddard
    org.acegisecurity.AuthenticationCredentialsNotFoundException: VoterResource.authenticationNotFound: An Authentication object was n ot found in the SecurityContext

    Root Cause Analysis

    1. org.acegisecurity.AuthenticationCredentialsNotFoundException

      An Authentication object was not found in the SecurityContext

      at org.acegisecurity.intercept.AbstractSecurityInterceptor.credentialsNotFound()
    2. Acegi Security Core
      AbstractSecurityInterceptor.beforeInvocation
      1. org.acegisecurity.intercept.AbstractSecurityInterceptor.credentialsNotFound(AbstractSecurityInterceptor.java:339)
      2. org.acegisecurity.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:261)
      2 frames
    3. com.atlassian.bamboo
      WebworkSecurityInterceptorProxy.intercept
      1. com.atlassian.bamboo.security.acegi.intercept.web.WebworkSecurityInterceptor.intercept(WebworkSecurityInterceptor.java:64)
      2. com.atlassian.bamboo.security.acegi.intercept.web.WebworkSecurityInterceptorProxy.intercept(WebworkSecurityInterceptorProxy.java:31)
      2 frames
    4. XWork
      DefaultActionInvocation.invoke
      1. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
      1 frame
    5. com.atlassian.xwork
      AroundInterceptor.intercept
      1. com.atlassian.xwork.interceptors.AroundInterceptor.intercept(AroundInterceptor.java:25)
      1 frame
    6. XWork
      DefaultActionInvocation.invoke
      1. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
      1 frame
    7. com.atlassian.bamboo
      OnDemandNotSupportedInterceptor.intercept
      1. com.atlassian.bamboo.ww2.interceptors.OnDemandNotSupportedInterceptor.intercept(OnDemandNotSupportedInterceptor.java:31)
      1 frame
    8. XWork
      DefaultActionInvocation.invoke
      1. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
      1 frame
    9. com.atlassian.bamboo
      AbstractBambooInterceptor.intercept
      1. com.atlassian.bamboo.ww2.interceptors.PaginationAwareInterceptor.doIntercept(PaginationAwareInterceptor.java:100)
      2. com.atlassian.bamboo.ww2.interceptors.AbstractBambooInterceptor.intercept(AbstractBambooInterceptor.java:34)
      2 frames