LDAP authenticator and user names / user pages

I just set up LDAP authentication against our company LDAP.

After I login I see that my name is associated with my last modification and I have a user page.
But:

  • my identity appears in Last modified by as <Lastname><Firstname> (no space between the two)
  • my profile page is /xwiki/bin/view/XWiki/<Lastname><Firstname> (this is fine)
  • my profile page title says Profile of <Lastname><Firstname> (again with no space between the two)

this is different with respect to what I see on the official xwiki site, where first and last name are space separated (I don’t care about the ordering, but I want the space in between):

immagine

immagine

In LDAP my CN is like this:

cn=<Lastname><space><Firstname>

In my xwiki.cfg I set:

  • # xwiki.authentication.ldap.UID_attr=cn (the default looked good to me)
  • # xwiki.authentication.ldap.userPageName=${domain}-${uid} (commented out too, there’s no uid in our LDAP)

In those examples the user profile actually have a first and a last name indicated, I guess you don’t have any mapping for them (or not the right one) so what is displayed is the user id.

You mean inside the user profile page in XWiki?

Ah, that worked, during the latest reconfiguration I enabled:

xwiki.authentication.ldap.fields_mapping=last_name=sn,first_name=givenName

and now I see Last modified by <Firstname> <Lastname> :slight_smile:
Is that format fixed, or can I reorder the two? Not that I really need it, but just for curiosity.

But now I’m wondering what this configuration prop does:

#-# Specifies the LDAP attribute containing the identifier to be used as the XWiki name
#-# The default is cn
# xwiki.authentication.ldap.UID_attr=cn

since my cn is <Lastname><space><Firstname> :thinking:

I don’t find any way to customize that format currently (but that would make sense).

White spaces are not allowed in XWiki user identifiers, so they are removed automatically (same for . and /).

Thanks.

Oops, forgot a piece, between restarts, reconfigurations, etc.

My cn is like above mentioned, my username in stored in the sAMAccountName attribute of my LDAP entry, and now my user page has url /xwiki/bin/view/XWiki/<username>

I don’t understand where / how that property is being used.