patorjk
patorjk

Reputation: 2182

Setting up an Alfresco Home Folder Provider for External Users (pre-4.0)

I'm working with the Hashed Home Folder Provider:

https://issues.alfresco.com/jira/browse/ALF-4727

It works great if I'm syncing up with LDAP, but I'm not sure how to configure it to work with External users. Basically, I've altered my setup so that authentication is done via a filter (with the username being returned via the X-Remote-User header). If the user doesn't exist, Alfresco creates an account for them. However, I'm not sure how to get Home Folder Provider to work in this setup. For the LDAP setup, you set this property in your alfresco-global.properties file:

ldap.synchronization.defaultHomeFolderProvider=hashedUserHomesHomeFolderProvider 

According to:

http://wiki.alfresco.com/wiki/Security_and_Authentication#Creating_home_spaces_-_from_1.4_onwards

You can set:

home_folder_provider_synchronizer.enabled=true
home_folder_provider_synchronizer.override_provider=largeHomeFolderProvider

But that doesn't appear to work for me (though I'm currently using Alfresco v3.4.4). Is there anyway to get the Home Folder Provider to work for External users for Alfresco v3.4.4?

Edit: This question deals with customizations to Alfresco, that may require code tweaks. If you don't like this question, I'd appreciate some feedback on why.

Edit #2:

After reading https://stackoverflow.com/a/9481704/256460, I updated authentication-services-context.xml under webapps/alfresco/WEB-INF/lib:

<property name="defaultProvider">
    <ref bean="hashedUserHomesHomeFolderProvider" />
</property>

But I get the following error in my catalina.out file when I attempt to start up Alfresco:

2012-03-02 20:08:33,482 ERROR [web.context.ContextLoader] Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'homeFolderManager' defined in class path resource [alfresco/authentication-services-context.xml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'org.alfresco.sample.UIDBasedHashingHomeFolderProvider' to required type 'org.alfresco.repo.security.person.HomeFolderProvider2' for property 'defaultProvider'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [org.alfresco.sample.UIDBasedHashingHomeFolderProvider] to required type [org.alfresco.repo.security.person.HomeFolderProvider2] for property 'defaultProvider': no matching editors or conversion strategy found

Upvotes: 0

Views: 1554

Answers (1)

skuro
skuro

Reputation: 13514

The Javadoc for the base class of the hash home folder provider (ExistingPathBasedHomeFolderProvider) reads as follows:

Deprecated. Depreciated since 4.0. ExistingPathBasedHomeFolderProvider2 should now be used.

I took that from the V3.4.4 enterprise sources. It seems to me that you might need to port the code for the custom provider to make use of the v2 class hierarchy.

Upvotes: 2

Related Questions