0

I'm struggling with duplicated users in my Jenkins and Not sending mail to unregistered user ... problem.

I installed the plugin as per this answer but cannot configure it properly by reading the plugin documentation.

My jenkins collects data from Active Directory and some users have duplicated entry, e.g.:

john.doe, john.doe@mycompany.com -> duplicated user which is detected by Jenkins
doej, john.doe@mycompany.com -> correct user which is used when logging in

Jenkins after collecting responsible people from git changes in job ends with
Not sending mail to unregistered user john.doe@mycompany.com

I tried adding additional identity to user doej by setting:

Identity:  john.doe@mycompany.com
Realm: <empty>

but it doesn't work.

How should I configure correctly the Additional Identities Plugin?

makozaki
  • 3,772
  • 4
  • 23
  • 47

1 Answers1

1

Seems it's not possible to configure the additional identity plugin in Jenkins for merge the duplicate user

As Jenkins is missing a way to ensure users unicity(unique) since they are created from various sources: authentication method (LDAP in my case), code commits (Subversion, Mercurial, Git, ...).

Depending on the way the user is retrieved by Jenkins (from a commit on a given SCM or its authentication), multiple identities are created for the same real user.

As a consequence, some features are not fully or badly working (login, notifications, user's builds, continuous integration game, ...) and configuration of users is a pain as it must be done multiple times for each real user.

Still the required features are:

  • a merging features. Allow to merge multiple Jenkins users into a single account.
  • a user pattern per SCM. Allow to choose how to extract a username from a commit for each SCM and how to optionally match existing one instead of creating a new user.
  • an id pattern per notification type. Allow to define how to generate the default id used for notification from the user data (from his jenkins id, his name, his scm id, ...): for instance, his mail or his jabber id, ...

Reference: [JENKINS-10258] Allow users unicity - Jenkins Jira

Solution is Jenkins 1.480 but this is still in Vulnerabilities state and have bug as well.

Jenkins 1.480 introduces an extension point to resolve jenkins user "canonical" ID when searching for user in Database by id or full name. This plugin uses this extension point to let user configure external identities as user properties.

You can reach out to Jenkins community or Support team to know the status or when they will final release

Madhuraj Vadde
  • 1,099
  • 1
  • 5
  • 13
  • Hey @makozaki, do let me know if the provided information provided solved your problem else share more details so I can troubleshoot share you more details. – Madhuraj Vadde Apr 12 '22 at 07:24