LDAP displayName attribute - Modify logic if it has a value

Using LDAP user directory, with Copy User on Login enabled.

Our LDAP schema has a value for displayName only if the user has a "nickname" set, and if it is set, it only has the nickname (which excludes lastname, example: William -> Will). But most users don't have that set at all, and it appears that JIRA is then creating a displayName based on firstName + lastName. If it possible to change this behavior (via a plugin?) so that if displayName is not empty, to always concatenate the lastName to it, and if it is empty, to leave the default behavior?

I realize the "best" fix would be to add a new LDAP attribute that had "(nickName Or firstName) lastName", but that may not be possible, so I'm seeing if there's another option.

Thanks!

3 answers

1 accepted

0 votes
Answer accepted

I don't see any option other than creating a plugin to handle it. I tried modifying the DB directly (via a trigger), but the application doesn't reread the value (and it ends up getting overwritten the next time the user logs in).

You can resolve this problem altering the displayName attribute on LDAP.

First you need create a .ldif file with this sequence of commands:

dn: uid=Willian,ou=People,dc=your_company,dc=com
changetype: modify
delete: displayName

after, you need execute the following command as admin ldap:

ldapmodify -D "cn=root,dc=your_company,dc=com" -h localhost -f file.ldif -W -x

now you need modify the .ldif file this way:

dn: uid=marcelo,ou=People,dc=duxus,dc=com
changetype: modify
add: displayName
displayName: William Walker

after modify, you need execute the following command as admin ldap again:

ldapmodify -D "cn=root,dc=your_company,dc=com" -h localhost -f file.ldif -W -x

Done this, you should resolve your problem.

Modifying LDAP is not an option, which is why I am asking for other options (but I agree, it would be the best and easiest way to fix). I started looking into creating a plugin that will tie JIRA into our SSO system (it seems likely the displayname would be updated there), but haven't had much time to work on it (and the documentation isn't super clear, a full example would help tremendously).

I don't see any option other than creating a plugin to handle it. I tried modifying the DB directly (via a trigger), but the application doesn't reread the value (and it ends up getting overwritten the next time the user logs in).

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted yesterday in United States

From Atlassian: Confluence Security Advisory - 2019-03-20

Atlassian released a security advisory on 3/20/2019.  The full advisory is here:  https://confluence.atlassian.com/doc/confluence-security-advisory-2019-03-20-966660264.html In a nutshe...

22 views 0 1
View post

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you