I am upgrading to .80 and the AbstractProcessingFilter is not Updating the ContextHolder. I am missing something here, and I just can't figure it out.
The only real change is that I have converted to the FilterChainProxy.
I have stripped down the Sample app to only do what my app does (No Anon, or RememberMe stuff). Except for the DaoAuthenticationProvider everything is the same that I can think of (I am using a custom made provider with Hibernate - that was/is working with .70).
Anyway, here is what blows my mind:
This is from the Sample Apps Log
This is from my log:Code:[DEBUG,EhCacheBasedUserCache,http-8080-Processor24] Cache hit: false; username: marissa [DEBUG,EhCacheBasedUserCache,http-8080-Processor24] Cache put: marissa [INFO,LoggerListener,http-8080-Processor24] Authentication success for user: marissa; details: net.sf.acegisecurity.ui.WebAuthenticationDetails@13d7254: RemoteIpAddress: 127.0.0.1; SessionId: F9E86703A0F34A9AB0D78C516BC1FD63 [DEBUG,AbstractProcessingFilter,http-8080-Processor24] Authentication success: net.sf.acegisecurity.providers.UsernamePasswordAuthenticationToken@11d20d3: Username: marissa; Password: [PROTECTED]; Authenticated: false; Details: net.sf.acegisecurity.ui.WebAuthenticationDetails@13d7254: RemoteIpAddress: 127.0.0.1; SessionId: F9E86703A0F34A9AB0D78C516BC1FD63; Granted Authorities: ROLE_SUPERVISOR, ROLE_USER [DEBUG,AbstractProcessingFilter,http-8080-Processor24] Updated ContextHolder to contain the following Authentication: 'net.sf.acegisecurity.providers.UsernamePasswordAuthenticationToken@11d20d3: Username: marissa; Password: [PROTECTED]; Authenticated: false; Details: net.sf.acegisecurity.ui.WebAuthenticationDetails@13d7254: RemoteIpAddress: 127.0.0.1; SessionId: F9E86703A0F34A9AB0D78C516BC1FD63; Granted Authorities: ROLE_SUPERVISOR, ROLE_USER' [DEBUG,AbstractProcessingFilter,http-8080-Processor24] Redirecting to target URL from HTTP Session (or default): http://localhost:8080/acegi-security-sample-contacts-filter/secure/index.htm
Slightly edited to protect a bit of privacy
What I am missing is theCode:2005-03-10 22:02:53,564 DEBUG [net.sf.acegisecurity.providers.dao.cache.EhCacheBasedUserCache] - <Cache hit: false; username: joe@blow.com> 2005-03-10 22:02:53,564 DEBUG [com.bifco.orma.dao.hibernate.UserDAOHibernate] - <loadUserByUsername called with joe@blow.com> 2005-03-10 22:02:53,623 DEBUG [net.sf.acegisecurity.providers.dao.cache.EhCacheBasedUserCache] - <Cache put: joe@blow.com> 2005-03-10 22:02:53,624 INFO [net.sf.acegisecurity.providers.dao.event.LoggerListener] - <Authentication success for user: joe@blow.com; details: 127.0.0.1> 2005-03-10 22:02:53,671 DEBUG [net.sf.acegisecurity.ui.AbstractProcessingFilter] - <Authentication success: net.sf.acegisecurity.providers.UsernamePasswordAuthenticationToken@17a6686: Username: com.flarn.wibble.model.User@b81eaa[ log=org.apache.commons.logging.impl.Log4JLogger@74b10b id=10 name=joe@blow.com password=apassword description=Dude roles=[abc, default, test, flarn] authorities={ROLE_ABC,ROLE_DEFAULT,ROLE_TEST,ROLE_FLARN} ]; Password: [PROTECTED]; Authenticated: false; Details: 127.0.0.1; Granted Authorities: ROLE_ABC, ROLE_DEFAULT, ROLE_TEST, ROLE_FLARN> 2005-03-10 22:02:53,671 DEBUG [net.sf.acegisecurity.ui.AbstractProcessingFilter] - <Redirecting to target URL from HTTP Session (or default): http://localhost:8080/flarn/welcome.htm>
section.Code:Updated ContextHolder to contain the following Authentication:....
From the successfulAuthentication method of AbstractProcessingFilter
Best guess is that something is not working for me hereCode:.... if (logger.isDebugEnabled()) { logger.debug("Authentication success: " + authResult.toString()); } SecureContext sc = SecureContextUtils.getSecureContext(); sc.setAuthentication(authResult); if (logger.isDebugEnabled()) { logger.debug( "Updated ContextHolder to contain the following Authentication: '" + authResult + "'"); } String targetUrl = (String) request.getSession().getAttribute(ACEGI_SECURITY_TARGET_URL_KEY); request.getSession().removeAttribute(ACEGI_SECURITY_TARGET_URL_KEY); if (alwaysUseDefaultTargetUrl == true) { targetUrl = null; } if (targetUrl == null) { targetUrl = request.getContextPath() + defaultTargetUrl; } if (logger.isDebugEnabled()) { logger.debug( "Redirecting to target URL from HTTP Session (or default): " + targetUrl); } ....But why oh why is the log method "Updated ContextHolder" not showing up in the log ? It gets to the Redirecting log entry, so it's not thowing out before that..Code:SecureContext sc = SecureContextUtils.getSecureContext(); sc.setAuthentication(authResult);
While not the root of my problem, the missing log entry is driving me bonkers. I am fairly new to Java, so it must be something secret but obvious to the hardened.
Any insight would be appreciated.
Thanks


