Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-51911

Jenkins refuses to send emails to authorised users when using Role Strategy permissions

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Component/s: role-strategy-plugin
    • Labels:
      None
    • Environment:
      Jenkins 2.107.3
      Role Strategy plugin 2.8.1
      Mailer 1.21
      Email Extension 2.62
    • Similar Issues:

      Description

      The simplest reproducible I can find:

      • Create a new freestyle job
      • Add an Editable Email Notification post-build action
      • Click Advanced settings
      • Add a "Always" filter and add "Requestor" to Send To
      • In Configure Global Security, select Role-Based Security (leave the default settings that make you an admin)
      • Run your test job
      • The output will say something like this even though you're an admin with permission to see everything:

      No emails were triggered.
      Email was triggered for: Always
      Sending email for trigger: Always
      Not sending mail to user Philip.Douglas@example.com with no permission to view Email test #5An attempt to send an e-mail to empty list of recipients, ignored.
      Finished: SUCCESS

        Attachments

          Activity

          Hide
          pdouglas Philip Douglas added a comment -

          We also see the same problem with emails triggered via Perforce and Git version control, but I suspect it's all the same cause so I've limited it to the above reproducible.

          Show
          pdouglas Philip Douglas added a comment - We also see the same problem with emails triggered via Perforce and Git version control, but I suspect it's all the same cause so I've limited it to the above reproducible.
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          CC Daniel Beck. This is caused by the security fix in the mailer plugin (SECURITY-372? in https://plugins.jenkins.io/mailer).
          I kindly ask the Security team to process it and to decide whether it is a regression somewhere. No capacity to triage the ticket further

          Show
          oleg_nenashev Oleg Nenashev added a comment - CC Daniel Beck . This is caused by the security fix in the mailer plugin (SECURITY-372? in https://plugins.jenkins.io/mailer ). I kindly ask the Security team to process it and to decide whether it is a regression somewhere. No capacity to triage the ticket further
          Hide
          pdouglas Philip Douglas added a comment - - edited

          I should also mention that I don't see the problem with other Authorization schemes (Logged-in users can do anything, Matrix-based).

          Show
          pdouglas Philip Douglas added a comment - - edited I should also mention that I don't see the problem with other Authorization schemes (Logged-in users can do anything, Matrix-based).
          Hide
          danielbeck Daniel Beck added a comment -

          Will investigate.

          Show
          danielbeck Daniel Beck added a comment - Will investigate.
          Hide
          danielbeck Daniel Beck added a comment -

          Cannot reproduce.

          Installed 2.107.2 from scratch, closing the setup wizard when it showed up.
          Installed latest email-ext (2.62) and role-strategy (2.8.1).
          Set an email address for my admin account.
          Switched to Role-Based Strategy.
          Created a job, set up the Editable Email Notification as described, started the build.

          Started by user admin
          Building in workspace /Users/danielbeck/Jenkins/Homes/JENKINS-51911/workspace/fs
          No emails were triggered.
          Email was triggered for: Always
          Sending email for trigger: Always
          Sending email to: (redacted)
          Connection error sending email, retrying once more in 10 seconds...
          Connection error sending email, retrying once more in 10 seconds...
          Failed after second try sending email
          Finished: SUCCESS 
          Show
          danielbeck Daniel Beck added a comment - Cannot reproduce. Installed 2.107.2 from scratch, closing the setup wizard when it showed up. Installed latest email-ext (2.62) and role-strategy (2.8.1). Set an email address for my admin account. Switched to Role-Based Strategy. Created a job, set up the Editable Email Notification as described, started the build. Started by user admin Building in workspace /Users/danielbeck/Jenkins/Homes/JENKINS-51911/workspace/fs No emails were triggered. Email was triggered for: Always Sending email for trigger: Always Sending email to: (redacted) Connection error sending email, retrying once more in 10 seconds... Connection error sending email, retrying once more in 10 seconds... Failed after second try sending email Finished: SUCCESS
          Hide
          pdouglas Philip Douglas added a comment -

          Thanks for looking into it. We did some more investigation and realised that the problem was that we have users log in as DOMAIN\username (and thus have the permissions configured to match that format) but Jenkins stores users as domain\username, so that's the form used to determine permissions for emails. So the actual bug is https://issues.jenkins-ci.org/browse/JENKINS-34545.

          Show
          pdouglas Philip Douglas added a comment - Thanks for looking into it. We did some more investigation and realised that the problem was that we have users log in as DOMAIN\username (and thus have the permissions configured to match that format) but Jenkins stores users as domain\username, so that's the form used to determine permissions for emails. So the actual bug is https://issues.jenkins-ci.org/browse/JENKINS-34545 .

            People

            • Assignee:
              Unassigned
              Reporter:
              pdouglas Philip Douglas
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: