Thanks, Axel. I come from a .NET/IIS world so most of what you describe is Chinese for me :) I will give it my best try and post my progress.
I appreciate your time. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Axel Mendoza Pupo Sent: Tuesday, April 29, 2008 4:45 PM To: [email protected] Subject: RE: Logging Client IP address To make ip address available to whatever you want you can use the Acegi configuration of CAS. I do that in my case. First you should create a context that implements org.acegisecurity.context.SecurityContextImpl to save your data like ip address, session id, etc. Second you should create a filter to set this information to your security context and the next step is configuration. In web.xml changes the url pattern that Acegi Filter Chain Proxy going to filter from /services/* to /* and in the securityContext.xml change this: <bean id="filterChainProxy" class="org.acegisecurity.util.FilterChainProxy"> <property name="filterInvocationDefinitionSource"> <value> CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON PATTERN_TYPE_APACHE_ANT /**=httpSessionContextIntegrationFilter,logoutFilter,casProcessingFilter ,exceptionTranslationFilter,filterInvocationInterceptor </value> </property> </bean> To this <bean id="filterChainProxy" class="org.acegisecurity.util.FilterChainProxy"> <property name="filterInvocationDefinitionSource"> <value> CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON PATTERN_TYPE_APACHE_ANT /login = httpSessionContextIntegrationFilter, ipAddressSessionIdSetterFilter /services/**=httpSessionContextIntegrationFilter,logoutFilter,casProcess ingFilter,exceptionTranslationFilter,filterInvocationInterceptor </value> </property> </bean> ipAddressSessionIdSetterFilter is your filter that set the data to the security context and should be configured as a bean change this too <bean id="httpSessionContextIntegrationFilter" class="org.acegisecurity.context.HttpSessionContextIntegrationFilter"> <property name="context"> <value>package.path.to.your.CASContext</value> </property> </bean> Next do what you want with the saved data when you want simple doing ((CASContext)SecurityContextHolder.getContext()).CASContextMethod() _______________________________________________ Yale CAS mailing list [email protected] http://tp.its.yale.edu/mailman/listinfo/cas _______________________________________________ Yale CAS mailing list [email protected] http://tp.its.yale.edu/mailman/listinfo/cas
