I created a custom directory connector which authenticates user against an external database. When I view the users in crowd, I see the correct email adress, but when I look at the profile of a user in Jira or Confleunce the email adress is not displayed.
Maybe I have to store it in a specific attribute ?
I am not sure how your implementation looks like, but I am guessing that you’ve implemented com.atlassian.crowd.directory.RemoteDirectory for your custom Crowd directory. How was searchUsers method implemented as this one takes important part in product to Crowd synchronization?
For the query that comes from Jira this method should be returning com.atlassian.crowd.model.user.User or com.atlassian.crowd.model.user.UserWithAttributes depending on what’s the return type in the query query.getReturnType() (parameter of searchUsers method)
Is the behavior the same in Confluence? When you say you are logging out and login in again is that using the user account you are checking in the profile tab?
I tried adding attributes “mail” and “displayName” and also “email” and “fullName” to my users but it is the same, when I log in with a user and look at the profile, no email address and wrong Fullname.
Can you see the email when you browse through users or is it only in profile. Also I would like to learn more about your setup. Here is how I understand it at the moment:
You have Crowd instance with your custom directory
There is a Jira instance connected to that Crowd and you are synchronizing users from there
What I do not know is how structure of directories looks like in Jira. I assume there must be an internal directory, but I am not sure what’s the order of directories in Jira nor I do not know if the user you are logging in to Jira exists in both of those directories (internal one and the one that points to Crowd).
Can you also check what is stored in Jira database, especially what do you see in cwd_table as this is the place where user data is being stored after synchronizing it with Crowd.
The article you’ve linked describes a problem with Bitbucket’s integration with LDAP which needs to have additional mapping of email address. In this case, since you are synchronizing users with Crowd there is no such need.
Thank You for Your persistence and ongoing support!
We have a Jira and a Confluence Instance connected to Crowd (Bitbucket is also planed), both have an LDAP Directory and our Custom Directory configured.
I found the problem, it was related to my custom directory connector wrongly retrieving the user data.
I couldn’t find the Postgres DB Table “cwd_table” that You mentioned ?
Another question showed up:
The LDAP Connector caches user/group information within the database (cwd_user, cwd_group, cwd_membership) and I wonder how I could implement this functionality within my custom directory connector.
I suppose I would need to enable “Add User/Group” permission on my directory and use the Crowd REST API to add users/groups, do You have any hints on this topic ?
Sorry for misleading you… I meant cwd_user of course.
Regarding:
The LDAP Connector caches user/group information within the database (cwd_user, cwd_group, cwd_membership) and I wonder how I could implement this functionality within my custom directory connector.
You would like to have a caching mechanism for your custom directory in Crowd? Unfortunately it is more than just setting this permission as some additional implementation is required. I am not quite sure how easy it would be.