cancel
Showing results for 
Search instead for 
Did you mean: 

Home Space based on LDAP Attributes

dtmiller1976
Champ in-the-making
Champ in-the-making
Hi all.  I'm trying to find a way to create user home directories automatically NOT based on UID and I could use some help.  Here's the situation:

We've got LDAP authentication working successfully against our OpenLDAP server.  I was able to configure UID-based directory creation using the "UIDBasedHomeFolderProvider" bean.  I want to automatically create home directories based on OTHER attributes in LDAP, for example first name (givenName), last name (sn), and organization.  To that end, I created another HomeFolderProvider class called "NameBasedHomeFolderProvider".  It creates a folder name from the "PROP_FIRSTNAME" and "PROP_LASTNAME" properties, but I quickly found that these were not correctly set.  (The class did work, however, and confirmed the ability to customize folder names.  All that is missing is the correct LDAP attributes.)

I want to avoid a full LDAP synchronization because we have a large number of users in LDAP and I don't want to add data from all of them into Alfresco.  What would ideally happen is some kind of attribute mapping at initial login time so the above properties would be set correctly and I could use them.  Unfortunately I can't figure out where this could be configured (if at all).

Is an LDAP synchronize operation the only way to map LDAP attributes?  What happens if a user tries to log in before synchronization has completed (or begun)?  In that case, a home space would be created that would later need to be changed.  Would a conflict arise during the sync operation?

I've searched the forums extensively and the closest I've gotten is the Wiki entry on LDAP configuration.  Unfortunately that only covers synchronization (import), but I'd really like to avoid that if at all possible and instead grab the necessary attributes at login time.

Thanks in advance for any help,

Damon
1 REPLY 1

andy
Champ on-the-rise
Champ on-the-rise
Hi

To sync from LDAP at login time you would have to write a custom AuthenticationComponent and DAO or do it in the authentication filters.

You also need to be able to find all users to which you can assign permissions (for invite users, assign workflow  …. etc)

What you require is not provideded out of the box.

Andy