Your best bet is to ask this question on the Spring Security Forum, as its not a CAS issue. Its most likely a Spring Security configuration issue.
Cheers, Scott On Wed, May 13, 2009 at 1:39 PM, deanhe01 <[email protected]> wrote: > > Let me preface this by saying I am a CAS neophyte. > > I have casified an existing application using Cas/SpringSecurity > integration. Everything is working fine, until I remove the user from the > User Service. Here is the behaviour I am seeing. > > > 1) User hits a cas protected page for the first time > 2) User is successfully re-directed to Cas login page > 3) Cas successfuly auths the user against my LDAP auth tree and returns > the > following fragment > > [btpool0-2] DEBUG > org.jasig.cas.client.validation.Cas20ServiceTicketValidator - Loading > custom > parameters from configuration. > [btpool0-2] DEBUG > org.jasig.cas.client.validation.Cas20ServiceTicketValidator - Constructing > validation > url: > https://a123488vm2.noa.nintendo.com:8443/cas-server-webapp-3.3.2/serviceValidate?service=http3A%2F%2Fa123488vm2.noa.nintendo.com%3A8888%2Fcornerstone-sso2Fj_spring_cas_security_check&ticket=ST-1732-LcB9NWG5l4kUkcwmuekk-cas& > [btpool0-2<https://a123488vm2.noa.nintendo.com:8443/cas-server-webapp-3.3.2/serviceValidate?service=http3A%2F%2Fa123488vm2.noa.nintendo.com%3A8888%2Fcornerstone-sso2Fj_spring_cas_security_check&ticket=ST-1732-LcB9NWG5l4kUkcwmuekk-cas&%0A%5Bbtpool0-2>] > DEBUG > org.jasig.cas.client.validation.Cas20ServiceTicketValidator - Retrieving > response from server. > [btpool0-2] DEBUG > org.jasig.cas.client.validation.Cas20ServiceTicketValidator - Server > response: > > <cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'> > <cas:authenticationSuccess> > <cas:user>deanhe01</cas:user> > > this makes me think that Cas successfully auth'd the user.. > > Now, we enter spring security which does not contain the user and his roles > in the user service. I expect to see the following: > > [btpool0-2] DEBUG org.springframework.security.ui.cas.CasProcessingFilter - > Authentication request failed: > org.springframework.security.userdetails.UsernameNotFoundException: Could > not find user: deanhe01 > [btpool0-2] DEBUG org.springframework.security.ui.cas.CasProcessingFilter - > Authentication request failed: > org.springframework.security.userdetails.UsernameNotFoundException: Could > not find user: deanhe01 > > > ultimately, this is thrown by spring: > > [btpool0-2] DEBUG > org.springframework.web.context.support.XmlWebApplicationContext - > Publishing event in context > [org.springframework.web.context.support.xmlwebapplicationcont...@14da86b > ]: > > org.springframework.security.event.authorization.AuthenticationCredentialsNotFoundEvent[source=FilterInvocation: > URL: /noAccess.jsp] > [btpool0-2] DEBUG > org.springframework.security.ui.ExceptionTranslationFilter > - Authentication exception occurred; redirecting to authentication entry > point > org.springframework.security.AuthenticationCredentialsNotFoundException: An > Authentication object was not found in the SecurityContext > at > > org.springframework.security.intercept.AbstractSecurityInterceptor.credentialsNotFound(AbstractSecurityInterceptor.java:342) > at > > org.springframework.security.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:254) > ........ > > Spring is redirection to the cas entry point not the noaccess.jsp and this > sets up an infinite loop > > I am pretty sure this is not the expected behaviour, maybe a bogus test > case. > > Any Ideas on how to break the loop? > > Thanks > > Dean > -- > View this message in context: > http://www.nabble.com/Problem%3A--User-in-LDAP-auth-tree-but-not-in-InMemoryUserService-tp23526574p23526574.html > Sent from the CAS Users mailing list archive at Nabble.com. > > > -- > You are currently subscribed to [email protected] as: > [email protected] > To unsubscribe, change settings or access archives, see > http://www.ja-sig.org/wiki/display/JSG/cas-user > -- You are currently subscribed to [email protected] as: [email protected] To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user
