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

jira-plugin does not use global credentials anymore

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • jira-plugin
    • None
    • Jenkins 2.249.2
      jira-plugin 3.1.1

    Description

      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.

      Attachments

        Issue Links

          Activity

            capf 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.

            warden 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

             

            dplatonoff 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  
            kwimmer 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

            kwimmer 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?

            ashishk 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

            warden Radek Antoniuk added a comment - Released in v. 3.7

            Thanks a lot!

            capf Carsten Pfeiffer added a comment - Thanks a lot!

            People

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

              Dates

                Created:
                Updated:
                Resolved: