In a scenario in which a user exists multiple times in an external directory, but each time with a different case in the username - thus having a unique identifier for each instance of the user, Crowd will try to add all instances of the user to the cwd_user table, as expected.
However, due to the constraint we have in the cwd_user table, Crowd will consider only the lower_user_name + directory_id to make sure that the user is unique, while in fact, the user is already unique if we consider the external_id value and the user_name with case sensitive.
- Create a user called MyUser in an external LDAP;
- Create a user called myuser in the same external LDAP;
- Synchronize the directory in Crowd using a Unique Identifier (e.g. objectGUID if using AD).
Both users should be synchronized in Crowd since they are different users in the LDAP (Unique Identifier proves that).
The below exception is thrown in the atlassian-crowd.log file: