Thank you for your continued assistance.
I've removed the second factor of authentication to simplify the process.
Now the use logs in:
Code:
17:13:11,709 DEBUG [org.springframework.security.authentication.ProviderManager] - Authentication attempt using com.example.MyAppName.server.auth.MyAppNameAuthenticationProvider
14-Jul-2011 17:13:11 com.example.MyAppName.server.SessionListener sessionCreated
SEVERE: Session Created
17:13:12,308 DEBUG [org.springframework.web.context.support.XmlWebApplicationContext] - Publishing event in Root WebApplicationContext: org.springframework.security.authentication.event.AuthenticationSuccessEvent[source=com.example.MyAppName.server.auth.MyAppNameUserAuthentication@6b499c6]
After a few calls to get HTML and other page related content the first method is called:
Code:
17:13:13,888 DEBUG [org.springframework.security.web.FilterChainProxy] - /myappname/myAppNameService at position 1 of 10 in additional filter chain; firing Filter: 'SecurityContextPersistenceFilter'
17:13:13,888 DEBUG [org.springframework.security.web.context.HttpSessionSecurityContextRepository] - Obtained a valid SecurityContext from SPRING_SECURITY_CONTEXT: 'org.springframework.security.core.context.SecurityContextImpl@6b499c6: Authentication: com.example.MyAppName.server.auth.MyAppNameUserAuthentication@6b499c6'
17:13:13,888 DEBUG [org.springframework.security.web.FilterChainProxy] - /myappname/myAppNameService at position 2 of 10 in additional filter chain; firing Filter: 'LogoutFilter'
17:13:13,888 DEBUG [org.springframework.security.web.FilterChainProxy] - /myappname/myAppNameService at position 3 of 10 in additional filter chain; firing Filter: 'UsernamePasswordAuthenticationFilter'
17:13:13,888 DEBUG [org.springframework.security.web.FilterChainProxy] - /myappname/myAppNameService at position 4 of 10 in additional filter chain; firing Filter: 'RequestCacheAwareFilter'
17:13:13,892 DEBUG [org.springframework.security.web.FilterChainProxy] - /myappname/myAppNameService at position 5 of 10 in additional filter chain; firing Filter: 'SecurityContextHolderAwareRequestFilter'
17:13:13,892 DEBUG [org.springframework.security.web.FilterChainProxy] - /myappname/myAppNameService at position 6 of 10 in additional filter chain; firing Filter: 'RememberMeAuthenticationFilter'
17:13:13,893 DEBUG [org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter] - SecurityContextHolder not populated with remember-me token, as it already contained: 'com.example.MyAppName.server.auth.MyAppNameUserAuthentication@6b499c6'
17:13:13,893 DEBUG [org.springframework.security.web.FilterChainProxy] - /myappname/myAppNameService at position 7 of 10 in additional filter chain; firing Filter: 'AnonymousAuthenticationFilter'
17:13:13,895 DEBUG [org.springframework.security.web.authentication.AnonymousAuthenticationFilter] - SecurityContextHolder not populated with anonymous token, as it already contained: 'com.example.MyAppName.server.auth.MyAppNameUserAuthentication@6b499c6'
17:13:13,895 DEBUG [org.springframework.security.web.FilterChainProxy] - /myappname/myAppNameService at position 8 of 10 in additional filter chain; firing Filter: 'SessionManagementFilter'
17:13:13,895 DEBUG [org.springframework.security.web.FilterChainProxy] - /myappname/myAppNameService at position 9 of 10 in additional filter chain; firing Filter: 'ExceptionTranslationFilter'
17:13:13,895 DEBUG [org.springframework.security.web.FilterChainProxy] - /myappname/myAppNameService at position 10 of 10 in additional filter chain; firing Filter: 'FilterSecurityInterceptor'
17:13:13,896 DEBUG [org.springframework.security.web.util.AntPathRequestMatcher] - Checking match of request : '/myappname/myappnameservice'; against '/favicon.ico'
17:13:13,896 DEBUG [org.springframework.security.web.util.AntPathRequestMatcher] - Checking match of request : '/myappname/myappnameservice'; against '/login.html'
17:13:13,896 DEBUG [org.springframework.security.web.util.AntPathRequestMatcher] - Checking match of request : '/myappname/myappnameservice'; against '/j_spring_security_check'
17:13:13,896 DEBUG [org.springframework.security.web.util.AntPathRequestMatcher] - Checking match of request : '/myappname/myappnameservice'; against '/myappname/**'
17:13:13,896 DEBUG [org.springframework.security.web.access.intercept.FilterSecurityInterceptor] - Secure object: FilterInvocation: URL: /myappname/myAppNameService; Attributes: [permitAll()]
17:13:13,896 DEBUG [org.springframework.security.web.access.intercept.FilterSecurityInterceptor] - Previously Authenticated: com.example.MyAppName.server.auth.MyAppNameUserAuthentication@6b499c6
17:13:13,896 DEBUG [org.springframework.security.access.vote.UnanimousBased] - Voter: com.example.MyAppName.server.auth.TwoFactorAuthenticationVoter@2324fb16, returned: 0
17:13:13,896 DEBUG [org.springframework.security.access.vote.UnanimousBased] - Voter: org.springframework.security.access.vote.RoleVoter@50e07360, returned: 0
17:13:13,896 DEBUG [org.springframework.security.access.vote.UnanimousBased] - Voter: org.springframework.security.access.vote.AuthenticatedVoter@3fb6cd1b, returned: 0
17:13:13,896 DEBUG [org.springframework.security.access.vote.UnanimousBased] - Voter: org.springframework.security.web.access.expression.WebExpressionVoter@27b47740, returned: 1
17:13:13,896 DEBUG [org.springframework.security.web.access.intercept.FilterSecurityInterceptor] - Authorization successful
17:13:13,896 DEBUG [org.springframework.security.web.access.intercept.FilterSecurityInterceptor] - RunAsManager did not change Authentication object
17:13:13,896 DEBUG [org.springframework.security.web.FilterChainProxy] - /myappname/myAppNameService reached end of additional filter chain; proceeding with original chain
17:13:13,907 DEBUG [org.springframework.security.access.prepost.PrePostAnnotationSecurityMetadataSource] - Looking for Pre/Post annotations for method 'secureMethod1' on target class 'class com.example.MyAppName.server.MyAppNameServiceImpl'
17:13:13,914 DEBUG [org.springframework.security.access.prepost.PrePostAnnotationSecurityMetadataSource] - No expression annotations found
17:13:13,915 DEBUG [org.springframework.security.access.method.DelegatingMethodSecurityMetadataSource] - Adding security method [CacheKey[com.example.MyAppName.server.MyAppNameServiceImpl; public com.example.MyAppName.shared.Type1 com.example.MyAppName.server.MyAppNameServiceImpl.secureMethod1()]] with attributes [ROLE_USER]
17:13:13,915 DEBUG [org.springframework.security.access.intercept.aspectj.AspectJMethodSecurityInterceptor] - Secure object: org.springframework.security.access.intercept.aspectj.MethodInvocationAdapter@1fed9fff; Attributes: [ROLE_USER]
17:13:13,917 DEBUG [org.springframework.security.access.intercept.aspectj.AspectJMethodSecurityInterceptor] - Previously Authenticated: com.example.MyAppName.server.auth.MyAppNameUserAuthentication@6b499c6
17:13:13,918 DEBUG [org.springframework.security.access.vote.AffirmativeBased] - Voter: org.springframework.security.access.prepost.PreInvocationAuthorizationAdviceVoter@4f54fbfe, returned: 0
17:13:13,918 DEBUG [org.springframework.security.access.vote.AffirmativeBased] - Voter: org.springframework.security.access.vote.RoleVoter@546c0962, returned: 1
17:13:13,918 DEBUG [org.springframework.security.access.intercept.aspectj.AspectJMethodSecurityInterceptor] - Authorization successful
17:13:13,918 DEBUG [org.springframework.security.access.intercept.aspectj.AspectJMethodSecurityInterceptor] - RunAsManager did not change Authentication object
...
17:13:14,051 DEBUG [org.springframework.security.web.context.HttpSessionSecurityContextRepository] - SecurityContext is empty or contents are anonymous - context will not be stored in HttpSession.
17:13:14,051 DEBUG [org.springframework.security.web.context.SecurityContextPersistenceFilter] - SecurityContextHolder now cleared, as request processing completed
17:13:14,051 DEBUG [org.springframework.web.filter.RequestContextFilter] - Cleared thread-bound request context: POST /myappname/myAppNameService HTTP/1.1
Then the next method is called:
Code:
17:13:14,678 DEBUG [org.springframework.security.web.FilterChainProxy] - /myappname/myAppNameService at position 1 of 10 in additional filter chain; firing Filter: 'SecurityContextPersistenceFilter'
17:13:14,678 DEBUG [org.springframework.security.web.context.HttpSessionSecurityContextRepository] - HttpSession returned null object for SPRING_SECURITY_CONTEXT
17:13:14,678 DEBUG [org.springframework.security.web.context.HttpSessionSecurityContextRepository] - No SecurityContext was available from the HttpSession: org.mortbay.jetty.servlet.HashSessionManager$Session:1t7zqd181e5jf@492609590. A new one will be created.
Both method calls are on the same page and happen straight after the user has logged in and require no further interaction from the user.
I tried to provide as much of the log as possible, without providing unrelated data. I can supply a complete log or more of the log if that would be better.