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

jira-plugin does not use global credentials anymore

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • jira-plugin
    • None
    • Jenkins 2.249.2
      jira-plugin 3.1.1

      jira-plugin fails builds with "The system configuration does not allow remote Jira access".

      There seems to be a regression in the fix for JENKINS-61689. When looking up credentials, and not finding local credentials, it should fall back to looking them up at the system level. Otherwise, without credentials, it will fail with the above message.

          [JENKINS-64083] jira-plugin does not use global credentials anymore

          Carsten Pfeiffer added a comment - See https://github.com/GEBIT/jira-plugin/commit/786f2c79445f89ca8fea2e537578a9df1f703e4a for a quick fix.

          Thanks for investigating the root cause Carsten! I just looked at your fix, this is indeed a nasty regression oversight indeed. Would you have some time to create a Pull Request for this with associated unit test?
          There are a bunch of tests already there so this shouldn't be hard to cover this, if you have any questions though, feel free to open a PR and then we can give some hints there.

          Radek Antoniuk added a comment - Thanks for investigating the root cause Carsten! I just looked at your fix, this is indeed a nasty regression oversight indeed. Would you have some time to create a Pull Request for this with associated unit test? There are a bunch of tests already there so this shouldn't be hard to cover this, if you have any questions though, feel free to open a PR and then we can give some hints there.

          We've had the same problem for a few months, driving me crazy. Used capf's patch for some time, then decided to investigate a little deeper.

          Turns out Jira was configured with a credential that had a "SYSTEM" scope in credentials.xml, migrated by an older Jira plugin back when access control for builds was initially introduced.

          Changing the scope to "GLOBAL" got Jira to work. The question here, is this how it's supposed to work if Jenkins is configured to run builds as "SYSTEM"?

          Here's another related issue: JENKINS-63936

           

          Dmitry Platonoff added a comment - We've had the same problem for a few months, driving me crazy. Used capf 's patch for some time, then decided to investigate a little deeper. Turns out Jira was configured with a credential that had a "SYSTEM" scope in credentials.xml , migrated by an older Jira plugin back when access control for builds was initially introduced. Changing the scope to "GLOBAL" got Jira to work. The question here, is this how it's supposed to work if Jenkins is configured to run builds as "SYSTEM" ? Here's another related issue: JENKINS-63936  

          Kevin Wimmer added a comment -

          warden, I posted pull request that contains the fix from capf as well as a new test method to verify the fix here: https://github.com/jenkinsci/jira-plugin/pull/401

          Kevin Wimmer added a comment - warden , I posted pull request that contains the fix from capf as well as a new test method to verify the fix here: https://github.com/jenkinsci/jira-plugin/pull/401

          wardenshouldn't this ticket be changed to "Fixed but Unreleased" state since the above PR was merged?

          Ashish Kulkarni added a comment - warden shouldn't this ticket be changed to "Fixed but Unreleased" state since the above PR was merged?

          Released in v. 3.7

          Radek Antoniuk added a comment - Released in v. 3.7

          Thanks a lot!

          Carsten Pfeiffer added a comment - Thanks a lot!

            Unassigned Unassigned
            capf Carsten Pfeiffer
            Votes:
            3 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: