cancel
Showing results for 
Search instead for 
Did you mean: 

Share 3.3g with mod_auth_cas

forsetiavatar
Champ in-the-making
Champ in-the-making
I am having problems getting Share working with mod_auth_cas according to this guide… http://wiki.alfresco.com/wiki/Alfresco_With_mod_auth_cas
(minus the x509 stuff as I have no intention of using client certificates)
A few notes:
  • I am using Alfresco 3.3g, and CAS 3.3.5 and 389DS for LDAP

  • CAS and LDAP both are on separate servers servers.

  • snoop.jsp returns the proper username after login through CAS

  • Logging into Alfresco Explorer through CAS works fine.

  • Logging into other tomcat servers through CAS works fine.

  • I have been fighting with this thing for a week now and it is driving me crazy.
I found this issue in JIRA but it seems to indicate that commenting out the filter in web.xml (which I have) will solve the problem (which it did't)… http://issues.alfresco.com/jira/browse/ALF-2788

Could someone please provide me with some help on this matter.

Here is the error I am getting…

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.extensions.surf.exception.UserFactoryException: Unable to retrieve user from repository
   org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:659)
   org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:552)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause

org.springframework.extensions.surf.exception.UserFactoryException: Unable to retrieve user from repository
   org.springframework.extensions.surf.support.AlfrescoUserFactory.loadUser(AlfrescoUserFactory.java:179)
   org.springframework.extensions.surf.support.AbstractUserFactory.initialiseUser(AbstractUserFactory.java:165)
   org.springframework.extensions.surf.support.AbstractUserFactory.initialiseUser(AbstractUserFactory.java:99)
   org.springframework.extensions.surf.RequestContextUtil.initialiseUser(RequestContextUtil.java:202)
   org.springframework.extensions.surf.RequestContextUtil.populateRequestContext(RequestContextUtil.java:175)
   org.springframework.extensions.surf.RequestContextUtil.populateRequestContext(RequestContextUtil.java:130)
   org.springframework.extensions.surf.mvc.AbstractWebFrameworkView.populateRequestContext(AbstractWebFrameworkView.java:243)
   org.springframework.extensions.surf.mvc.AbstractWebFrameworkView.renderMergedOutputModel(AbstractWebFrameworkView.java:105)
   org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
   org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1060)
   org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:798)
   org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
   org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)
   org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:552)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause

org.json.JSONException: A JSONObject text must begin with '{' at character 9
   org.json.JSONTokener.syntaxError(JSONTokener.java:413)
   org.json.JSONObject.<init>(JSONObject.java:180)
   org.json.JSONObject.<init>(JSONObject.java:420)
   org.springframework.extensions.surf.support.AlfrescoUserFactory.loadUser(AlfrescoUserFactory.java:173)
   org.springframework.extensions.surf.support.AbstractUserFactory.initialiseUser(AbstractUserFactory.java:165)
   org.springframework.extensions.surf.support.AbstractUserFactory.initialiseUser(AbstractUserFactory.java:99)
   org.springframework.extensions.surf.RequestContextUtil.initialiseUser(RequestContextUtil.java:202)
   org.springframework.extensions.surf.RequestContextUtil.populateRequestContext(RequestContextUtil.java:175)
   org.springframework.extensions.surf.RequestContextUtil.populateRequestContext(RequestContextUtil.java:130)
   org.springframework.extensions.surf.mvc.AbstractWebFrameworkView.populateRequestContext(AbstractWebFrameworkView.java:243)
   org.springframework.extensions.surf.mvc.AbstractWebFrameworkView.renderMergedOutputModel(AbstractWebFrameworkView.java:105)
   org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
   org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1060)
   org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:798)
   org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
   org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)
   org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:552)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

Here is the relevant section of my cas logs…


2010-10-14 15:46:17,025 DEBUG [org.jasig.cas.web.flow.InitialFlowSetupAction] - <Action 'InitialFlowSetupAction' beginning execution>
2010-10-14 15:46:17,025 DEBUG [org.jasig.cas.web.support.CasArgumentExtractor] - <Extractor generated service for: http://kocw-vmg-alf-002/share>
2010-10-14 15:46:17,030 DEBUG [org.jasig.cas.web.flow.InitialFlowSetupAction] - <Placing service in FlowScope: http://kocw-vmg-alf-002/share>
2010-10-14 15:46:17,035 DEBUG [org.jasig.cas.web.flow.InitialFlowSetupAction] - <Action 'InitialFlowSetupAction' completed execution; result is 'success'>
2010-10-14 15:46:17,036 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Action 'AuthenticationViaFormAction' beginning execution>
2010-10-14 15:46:17,036 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Executing setupForm>
2010-10-14 15:46:17,037 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Creating new form object with name 'credentials'>
2010-10-14 15:46:17,037 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Creating new instance of form object class [class org.jasig.cas.authentication.principal.UsernamePasswordCredentials]>
2010-10-14 15:46:17,037 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Putting form object of type [class org.jasig.cas.authentication.principal.UsernamePasswordCredentials] in scope Flow with name 'credentials'>
2010-10-14 15:46:17,038 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Creating new form errors for object with name 'credentials'>
2010-10-14 15:46:17,038 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <No property editor registrar set, no custom editors to register>
2010-10-14 15:46:17,038 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Putting form errors instance in scope Flash>
2010-10-14 15:46:17,039 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Action 'AuthenticationViaFormAction' completed execution; result is 'success'>
2010-10-14 15:46:17,039 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Action 'AuthenticationViaFormAction' beginning execution>
2010-10-14 15:46:17,039 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Action 'AuthenticationViaFormAction' completed execution; result is 'success'>
2010-10-14 15:46:40,578 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Action 'AuthenticationViaFormAction' beginning execution>
2010-10-14 15:46:40,578 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Executing bind>
2010-10-14 15:46:40,578 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Found existing form object with name 'credentials' of type [class org.jasig.cas.authentication.principal.UsernamePasswordCredentials] in scope Flow>
2010-10-14 15:46:40,578 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <No property editor registrar set, no custom editors to register>
2010-10-14 15:46:40,579 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Binding allowed request parameters in map['lt' -> '_c54525115-9025-FF36-3E2F-AE6DE616E735_kD537FA5F-EAAD-79DD-E628-28F03D529A9E', 'service' -> 'http://kocw-vmg-alf-002/share', '_eventId' -> 'submit', 'password' -> 'p4ssw0rd', 'submit' -> 'LOGIN', 'username' -> 'jharrison'] to form object with name 'credentials', pre-bind formObject toString = [username: null]>
2010-10-14 15:46:40,579 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <(Any field is allowed)>
2010-10-14 15:46:40,587 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Binding completed for form object with name 'credentials', post-bind formObject toString = [username: jharrison]>
2010-10-14 15:46:40,587 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <There are [0] errors, details: []>
2010-10-14 15:46:40,587 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Executing validation>
2010-10-14 15:46:40,588 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Invoking validator org.jasig.cas.validation.UsernamePasswordCredentialsValidator@5f8f127c>
2010-10-14 15:46:40,588 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Validation completed for form object>
2010-10-14 15:46:40,588 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <There are [0] errors, details: []>
2010-10-14 15:46:40,588 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Putting form errors instance in scope Flash>
2010-10-14 15:46:40,588 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Action 'AuthenticationViaFormAction' completed execution; result is 'success'>
2010-10-14 15:46:40,589 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Action 'AuthenticationViaFormAction' beginning execution>
2010-10-14 15:46:40,589 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Found existing form object with name 'credentials' of type [class org.jasig.cas.authentication.principal.UsernamePasswordCredentials] in scope Flow>
2010-10-14 15:46:40,589 DEBUG [org.jasig.cas.CentralAuthenticationServiceImpl] - <Attempting to create TicketGrantingTicket for [username: jharrison]>
2010-10-14 15:46:40,589 DEBUG [org.jasig.cas.authentication.handler.support.SimpleTestUsernamePasswordAuthenticationHandler] - <User [jharrison] failed authentication>
2010-10-14 15:46:40,589 INFO [org.jasig.cas.authentication.AuthenticationManagerImpl] - <AuthenticationHandler: org.jasig.cas.authentication.handler.support.SimpleTestUsernamePasswordAuthenticationHandler failed to authenticate the user which provided the following credentials: [username: jharrison]>
2010-10-14 15:46:40,589 DEBUG [org.jasig.cas.adaptors.ldap.FastBindLdapAuthenticationHandler] - <Performing LDAP bind with credential: uid=jharrison,dc=kocw,dc=com>
2010-10-14 15:46:40,655 INFO [org.jasig.cas.authentication.AuthenticationManagerImpl] - <AuthenticationHandler: org.jasig.cas.adaptors.ldap.FastBindLdapAuthenticationHandler successfully authenticated the user which provided the following credentials: [username: jharrison]>
2010-10-14 15:46:40,655 DEBUG [org.jasig.cas.authentication.principal.UsernamePasswordCredentialsToPrincipalResolver] - <Attempting to resolve a principal…>
2010-10-14 15:46:40,656 DEBUG [org.jasig.cas.authentication.principal.UsernamePasswordCredentialsToPrincipalResolver] - <Creating SimplePrincipal for [jharrison]>
2010-10-14 15:46:40,657 DEBUG [org.jasig.cas.ticket.registry.DefaultTicketRegistry] - <Added ticket [TGT-53-KST1Gt5EHdO3xiayZSycCUveJwKM0GbzpfDTMBFeQGAfp6edTQ-kocw-vmg-cas-002] to registry.>
2010-10-14 15:46:40,657 DEBUG [org.jasig.cas.web.support.CookieRetrievingCookieGenerator] - <Removed cookie with name [CASPRIVACY]>
2010-10-14 15:46:40,657 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Action 'AuthenticationViaFormAction' completed execution; result is 'success'>
2010-10-14 15:46:40,658 DEBUG [org.jasig.cas.web.flow.SendTicketGrantingTicketAction] - <Action 'SendTicketGrantingTicketAction' beginning execution>
2010-10-14 15:46:40,658 DEBUG [org.jasig.cas.web.support.CookieRetrievingCookieGenerator] - <Added cookie with name [CASTGC] and value [TGT-53-KST1Gt5EHdO3xiayZSycCUveJwKM0GbzpfDTMBFeQGAfp6edTQ-kocw-vmg-cas-002]>
2010-10-14 15:46:40,658 DEBUG [org.jasig.cas.web.flow.SendTicketGrantingTicketAction] - <Action 'SendTicketGrantingTicketAction' completed execution; result is 'success'>
2010-10-14 15:46:40,658 DEBUG [org.jasig.cas.web.flow.GenerateServiceTicketAction] - <Action 'GenerateServiceTicketAction' beginning execution>
2010-10-14 15:46:40,658 DEBUG [org.jasig.cas.ticket.registry.DefaultTicketRegistry] - <Attempting to retrieve ticket [TGT-53-KST1Gt5EHdO3xiayZSycCUveJwKM0GbzpfDTMBFeQGAfp6edTQ-kocw-vmg-cas-002]>
2010-10-14 15:46:40,658 DEBUG [org.jasig.cas.ticket.registry.DefaultTicketRegistry] - <Ticket [TGT-53-KST1Gt5EHdO3xiayZSycCUveJwKM0GbzpfDTMBFeQGAfp6edTQ-kocw-vmg-cas-002] found in registry.>
2010-10-14 15:46:40,659 DEBUG [org.jasig.cas.ticket.registry.DefaultTicketRegistry] - <Added ticket [ST-82-fKV3nptbfhIHt9Azfxnj-kocw-vmg-cas-002] to registry.>
2010-10-14 15:46:40,659 INFO [org.jasig.cas.CentralAuthenticationServiceImpl] - <Granted service ticket [ST-82-fKV3nptbfhIHt9Azfxnj-kocw-vmg-cas-002] for service [http://kocw-vmg-alf-002/share] for user [jharrison]>
2010-10-14 15:46:40,659 DEBUG [org.jasig.cas.web.flow.GenerateServiceTicketAction] - <Action 'GenerateServiceTicketAction' completed execution; result is 'success'>
2010-10-14 15:46:40,724 DEBUG [org.jasig.cas.web.support.CasArgumentExtractor] - <Extractor generated service for: http://kocw-vmg-alf-002/share>
2010-10-14 15:46:40,724 DEBUG [org.jasig.cas.ticket.registry.DefaultTicketRegistry] - <Attempting to retrieve ticket [ST-82-fKV3nptbfhIHt9Azfxnj-kocw-vmg-cas-002]>
2010-10-14 15:46:40,725 DEBUG [org.jasig.cas.ticket.registry.DefaultTicketRegistry] - <Ticket [ST-82-fKV3nptbfhIHt9Azfxnj-kocw-vmg-cas-002] found in registry.>
2010-10-14 15:46:40,725 DEBUG [org.jasig.cas.ticket.registry.DefaultTicketRegistry] - <Removing ticket [ST-82-fKV3nptbfhIHt9Azfxnj-kocw-vmg-cas-002] from registry>
2010-10-14 15:46:42,572 DEBUG [org.jasig.cas.web.flow.InitialFlowSetupAction] - <Action 'InitialFlowSetupAction' beginning execution>
2010-10-14 15:46:42,579 DEBUG [org.jasig.cas.web.support.CasArgumentExtractor] - <Extractor generated service for: http://kocw-vmg-alf-002/alfresco/wcs/remotestore/has/alfresco/site-data/configurations/slingshot.sit...>
2010-10-14 15:46:42,579 DEBUG [org.jasig.cas.web.flow.InitialFlowSetupAction] - <Placing service in FlowScope: http://kocw-vmg-alf-002/alfresco/wcs/remotestore/has/alfresco/site-data/configurations/slingshot.sit...>
2010-10-14 15:46:42,579 DEBUG [org.jasig.cas.web.flow.InitialFlowSetupAction] - <Action 'InitialFlowSetupAction' completed execution; result is 'success'>
2010-10-14 15:46:42,580 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Action 'AuthenticationViaFormAction' beginning execution>
2010-10-14 15:46:42,580 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Executing setupForm>
2010-10-14 15:46:42,580 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Creating new form object with name 'credentials'>
2010-10-14 15:46:42,580 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Creating new instance of form object class [class org.jasig.cas.authentication.principal.UsernamePasswordCredentials]>
2010-10-14 15:46:42,580 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Putting form object of type [class org.jasig.cas.authentication.principal.UsernamePasswordCredentials] in scope Flow with name 'credentials'>
2010-10-14 15:46:42,581 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Creating new form errors for object with name 'credentials'>
2010-10-14 15:46:42,581 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <No property editor registrar set, no custom editors to register>
2010-10-14 15:46:42,581 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Putting form errors instance in scope Flash>
2010-10-14 15:46:42,581 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Action 'AuthenticationViaFormAction' completed execution; result is 'success'>
2010-10-14 15:46:42,581 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Action 'AuthenticationViaFormAction' beginning execution>
2010-10-14 15:46:42,581 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Action 'AuthenticationViaFormAction' completed execution; result is 'success'>
2010-10-14 15:46:42,642 DEBUG [org.jasig.cas.web.flow.InitialFlowSetupAction] - <Action 'InitialFlowSetupAction' beginning execution>
2010-10-14 15:46:42,643 DEBUG [org.jasig.cas.web.support.CasArgumentExtractor] - <Extractor generated service for: http://kocw-vmg-alf-002/alfresco/wcs/remotestore/has/alfresco/site-data/themes/default.xml?s=sitesto...>
2010-10-14 15:46:42,643 DEBUG [org.jasig.cas.web.flow.InitialFlowSetupAction] - <Placing service in FlowScope: http://kocw-vmg-alf-002/alfresco/wcs/remotestore/has/alfresco/site-data/themes/default.xml?s=sitesto...>
2010-10-14 15:46:42,643 DEBUG [org.jasig.cas.web.flow.InitialFlowSetupAction] - <Action 'InitialFlowSetupAction' completed execution; result is 'success'>
2010-10-14 15:46:42,643 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Action 'AuthenticationViaFormAction' beginning execution>
2010-10-14 15:46:42,647 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Executing setupForm>
2010-10-14 15:46:42,648 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Creating new form object with name 'credentials'>
2010-10-14 15:46:42,648 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Creating new instance of form object class [class org.jasig.cas.authentication.principal.UsernamePasswordCredentials]>
2010-10-14 15:46:42,648 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Putting form object of type [class org.jasig.cas.authentication.principal.UsernamePasswordCredentials] in scope Flow with name 'credentials'>
2010-10-14 15:46:42,648 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Creating new form errors for object with name 'credentials'>
2010-10-14 15:46:42,655 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <No property editor registrar set, no custom editors to register>
2010-10-14 15:46:42,655 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Putting form errors instance in scope Flash>
2010-10-14 15:46:42,656 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Action 'AuthenticationViaFormAction' completed execution; result is 'success'>
2010-10-14 15:46:42,656 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Action 'AuthenticationViaFormAction' beginning execution>
2010-10-14 15:46:42,656 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Action 'AuthenticationViaFormAction' completed execution; result is 'success'>
2010-10-14 15:46:42,703 DEBUG [org.jasig.cas.web.flow.InitialFlowSetupAction] - <Action 'InitialFlowSetupAction' beginning execution>
2010-10-14 15:46:42,703 DEBUG [org.jasig.cas.web.support.CasArgumentExtractor] - <Extractor generated service for: http://kocw-vmg-alf-002/alfresco/wcs/remotestore/has/alfresco/site-data/pages/site-index.xml?s=sites...>
2010-10-14 15:46:42,703 DEBUG [org.jasig.cas.web.flow.InitialFlowSetupAction] - <Placing service in FlowScope: http://kocw-vmg-alf-002/alfresco/wcs/remotestore/has/alfresco/site-data/pages/site-index.xml?s=sites...>
2010-10-14 15:46:42,703 DEBUG [org.jasig.cas.web.flow.InitialFlowSetupAction] - <Action 'InitialFlowSetupAction' completed execution; result is 'success'>
2010-10-14 15:46:42,704 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Action 'AuthenticationViaFormAction' beginning execution>
2010-10-14 15:46:42,704 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Executing setupForm>
2010-10-14 15:46:42,704 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Creating new form object with name 'credentials'>
2010-10-14 15:46:42,704 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Creating new instance of form object class [class org.jasig.cas.authentication.principal.UsernamePasswordCredentials]>
2010-10-14 15:46:42,704 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Putting form object of type [class org.jasig.cas.authentication.principal.UsernamePasswordCredentials] in scope Flow with name 'credentials'>
2010-10-14 15:46:42,704 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Creating new form errors for object with name 'credentials'>
2010-10-14 15:46:42,704 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <No property editor registrar set, no custom editors to register>
2010-10-14 15:46:42,705 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Putting form errors instance in scope Flash>
2010-10-14 15:46:42,705 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Action 'AuthenticationViaFormAction' completed execution; result is 'success'>
2010-10-14 15:46:42,705 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Action 'AuthenticationViaFormAction' beginning execution>
2010-10-14 15:46:42,705 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Action 'AuthenticationViaFormAction' completed execution; result is 'success'>
2010-10-14 15:46:42,755 DEBUG [org.jasig.cas.web.flow.InitialFlowSetupAction] - <Action 'InitialFlowSetupAction' beginning execution>
2010-10-14 15:46:42,755 DEBUG [org.jasig.cas.web.support.CasArgumentExtractor] - <Extractor generated service for: http://kocw-vmg-alf-002/alfresco/wcs/webframework/content/metadata?user=jharrison>
2010-10-14 15:46:42,755 DEBUG [org.jasig.cas.web.flow.InitialFlowSetupAction] - <Placing service in FlowScope: http://kocw-vmg-alf-002/alfresco/wcs/webframework/content/metadata?user=jharrison>
2010-10-14 15:46:42,755 DEBUG [org.jasig.cas.web.flow.InitialFlowSetupAction] - <Action 'InitialFlowSetupAction' completed execution; result is 'success'>
2010-10-14 15:46:42,756 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Action 'AuthenticationViaFormAction' beginning execution>
2010-10-14 15:46:42,756 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Executing setupForm>
2010-10-14 15:46:42,756 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Creating new form object with name 'credentials'>
2010-10-14 15:46:42,757 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Creating new instance of form object class [class org.jasig.cas.authentication.principal.UsernamePasswordCredentials]>
2010-10-14 15:46:42,757 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Putting form object of type [class org.jasig.cas.authentication.principal.UsernamePasswordCredentials] in scope Flow with name 'credentials'>
2010-10-14 15:46:42,757 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Creating new form errors for object with name 'credentials'>
2010-10-14 15:46:42,757 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <No property editor registrar set, no custom editors to register>
2010-10-14 15:46:42,757 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Putting form errors instance in scope Flash>
2010-10-14 15:46:42,757 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Action 'AuthenticationViaFormAction' completed execution; result is 'success'>
2010-10-14 15:46:42,757 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Action 'AuthenticationViaFormAction' beginning execution>
2010-10-14 15:46:42,758 DEBUG [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <Action 'AuthenticationViaFormAction' completed execution; result is 'success'>

and my share-config-custom.xml
<alfresco-config>

   <!– Global config section –>
   <config replace="true">
      <flags>
         <!–
            Developer debugging setting to turn on DEBUG mode for client scripts in the browser
         –>
         <client-debug>true</client-debug>

         <!–
            LOGGING can always be toggled at runtime when in DEBUG mode (Ctrl, Ctrl, Shift, Shift).
            This flag automatically activates logging on page load.
         –>
         <client-debug-autologging>true</client-debug-autologging>
      </flags>
   </config>

   <!– Document Library config section –>
   <config evaluator="string-compare" condition="DocumentLibrary" replace="true">

      <!–
         Whether the folder Tree component should enumerate child folders or not.
         This is a relatively expensive operation, so should be set to "false" for Repositories with broad folder structures.
      –>
      <tree>
         <evaluate-child-folders>false</evaluate-child-folders>
      </tree>

      <!–
         Used by the "Manage Aspects" action

         For custom aspects, remember to also add the relevant i18n string(s)
            cm_myaspect=My Aspect
      –>
      <aspects>
         <!– Aspects that a user can see –>
         <visible>
            <aspect name="cm:generalclassifiable" />
            <aspect name="cm:complianceable" />
            <aspect name="cm:dublincore" />
            <aspect name="cm:effectivity" />
            <aspect name="cm:summarizable" />
            <aspect name="cm:versionable" />
            <aspect name="cm:templatable" />
            <aspect name="cm:emailed" />
            <aspect name="emailserver:aliasable" />
            <aspect name="cm:taggable" />
            <aspect name="app:inlineeditable" />
            <aspect name="gd:googleEditable" />
         </visible>

         <!– Aspects that a user can add. Same as "visible" if left empty –>
         <addable>
         </addable>

         <!– Aspects that a user can remove. Same as "visible" if left empty –>
         <removeable>
         </removeable>
      </aspects>

      <!–
         Used by the "Change Type" action

         Define valid subtypes using the following example:
            <type name="cm:content">
               <subtype name="cm:mysubtype" />
            </type>

         Remember to also add the relevant i18n string(s):
            cm_mysubtype=My SubType
      –>
      <types>
         <type name="cm:content">
         </type>

         <type name="cm:folder">
         </type>
      </types>

      <!–
         If set, will present a WebDAV link for the current item on the Document and Folder details pages.
         Also used to generate the "View in Alfresco Explorer" action for folders.
      –>
      <repository-url>http://localhost:8080/alfresco</repository-url>

      <!–
         Google Docs integration
      –>
      <google-docs>
         <!–
            Enable/disable the Google Docs UI integration (Extra types on Create Content menu, Google Docs actions).
            If enabled, remember to also make sure the gd:googleEditable aspect is made visible in the <aspects> section above.
         –>
         <enabled>true</enabled>
        
         <!–
            The mimetypes of documents Google Docs allows you to create via the Share interface.
            The I18N label is created from the "type" attribute, e.g. google-docs.doc=Google Docs&trade; Document
         –>
         <creatable-types>
            <creatable type="doc">application/msword</creatable>
            <creatable type="xls">application/vnd.ms-excel</creatable>
            <creatable type="ppt">application/vnd.ms-powerpoint</creatable>
         </creatable-types>
      </google-docs>
   </config>

   <!– Repository Library config section –>
   <config evaluator="string-compare" condition="RepositoryLibrary" replace="true">
      <!–
         Whether the link to the Repository Library appears in the header component or not.
      –>
      <visible>false</visible>

      <!–
         Root nodeRef for top-level folder.
      –>
      <root-node>alfresco://company/home</root-node>

      <!–
         Whether the folder Tree component should enumerate child folders or not.
         This is a relatively expensive operation, so should be set to "false" for Repositories with broad folder structures.
      –>
      <tree>
         <evaluate-child-folders>false</evaluate-child-folders>
      </tree>
   </config>
  
   <!–
        NTLM authentication config for Share
        NOTE: you will also need to enable the NTLM authentication filter in Share web.xml
              change localhost:8080 below to appropriate alfresco server location if required
   –>
  
   <config evaluator="string-compare" condition="Remote">
      <remote>
         <connector>
            <id>alfrescoCookie</id>
            <name>Alfresco Connector</name>
            <description>Connects to an Alfresco instance using cookie-based authentication</description>
            <class>org.springframework.extensions.webscripts.connector.AlfrescoConnector</class>
         </connector>
        
         <endpoint>
            <id>alfresco</id>
            <name>Alfresco - user access</name>
            <description>Access to Alfresco Repository WebScripts that require user authentication</description>
            <connector-id>alfrescoCookie</connector-id>
            <endpoint-url>http://kocw-vmg-alf-002/alfresco/wcs</endpoint-url>
            <identity>user</identity>
            <external-auth>true</external-auth>
         </endpoint>
      </remote>
   </config>
  
<!–
      <config evaluator="string-compare" condition="Remote">
        <remote>
        
            <endpoint>
                <id>alfresco</id>
                <name>Alfresco - user access</name>
                <description>Access to Alfresco Repository WebScripts that require user authentication</description>
                <connector-id>alfresco</connector-id>
                <endpoint-url>http://kocw-vmg-alf-002/alfresco/wcs</endpoint-url>
                <identity>user</identity>
                <external-auth>true</external-auth>
                <authenticator-id>alfresco-ticket</authenticator-id>
            </endpoint>
           
        </remote>
    </config>
–>
   <!– example changing port used to access remote Alfresco server (default is 8080)
   <config evaluator="string-compare" condition="Remote">
      <remote>
         <endpoint>
            <id>alfresco-noauth</id>
            <name>Alfresco - unauthenticated access</name>
            <description>Access to Alfresco Repository WebScripts that do not require authentication</description>
            <connector-id>alfresco</connector-id>
            <endpoint-url>http://kocw-vmg-alf-002/alfresco/s</endpoint-url>
            <identity>none</identity>
         </endpoint>

         <endpoint>
            <id>alfresco</id>
            <name>Alfresco - user access</name>
            <description>Access to Alfresco Repository WebScripts that require user authentication</description>
            <connector-id>alfresco</connector-id>
            <endpoint-url>http://localhost:8080/alfresco/s</endpoint-url>
            <identity>user</identity>
         </endpoint>

         <endpoint>
            <id>alfresco-feed</id>
            <name>Alfresco Feed</name>
            <description>Alfresco Feed - supports basic HTTP authentication via the EndPointProxyServlet</description>
            <connector-id>http</connector-id>
            <endpoint-url>http://localhost:8080/alfresco/s</endpoint-url>
            <basic-auth>true</basic-auth>
            <identity>user</identity>
         </endpoint>
      </remote>
   </config>
   –>

         <!– Authenticator Implementations –>
<!–
         <authenticator>
            <id>alfresco-ticket</id>
            <name>Alfresco Authenticator</name>
            <description>Alfresco Authenticator</description>
            <class>com.atolcd.alfresco.CasAlfrescoAuthenticator</class>
         </authenticator>
–>
</alfresco-config>
11 REPLIES 11

warren_mcdonald
Champ in-the-making
Champ in-the-making
Hey,

glad you found a solution.

I have been thinking about a proxy solutions for some of our needs too. We need webdav protected by CAS for one purpose but also for hosting podcast xml files which need basic auth for iTunes. So multiple proxy directives may work (you will need rewriting as well).  One possible way may be to use a more specific set of locations in the mod_auth_cas.conf file. Perhaps protecting only some /alfresco/<subdirs> will do the trick and leave others for normal auth. This will require bit of fiddling with a lot more directives, but there are not that many possible paths. 

The 3.4.a solution requires a new class file. I have extracted this from a 3.4.a jar and packed it up in a jar to supplement my 3.3 install. I now have the error mentioned in the above Jira, but should be able to configure around it. I do like the aim of this solution which is the same generic external_auth handling for share as already exists for alfresco. It is unfortunate is only half baked for community as yet.

Cheers,

Warren

forsetiavatar
Champ in-the-making
Champ in-the-making
So is it pretty much confirmed that the wiki is wrong? Why would they go through all the time and effort to create that if the information is not accurate. Someone on the team should correct that page, or at the very least post specifically what platform those instructions run on. I am using Fedora 12 in my implementation with OpenJDK1.6 and CAS 3.3.5. I did test it with Sun JDK as well to ensure it was not some weird thing w/ OpenJDK. A few other notes…. Since the x509 portion does not function in 3.3g there is no need to build CAS from source. After x509 failed and I used the solution I described earlier I went back to using my original CAS server which was just the WAR file I downloaded from jasig. Also my solution seems to have broken task actions in the My Tasks dashlet when using a secure site. Tasks work under HTTP but does not function under HTTPS. When trying to accept a task on a secure site I get the 'failed to action task' message. I think this may be related to an active bug that has something to do with using tasks while working through a proxy.