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

Jira plugin can't validate credentials due to breaking change in JIRA-- "permissions query parameter" is now required

    Details

    • Type: Bug
    • Status: Fixed but Unreleased (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: jira-plugin
    • Environment:
      Jenkins ver. 2.190.2 (official Docker image)
      Jira Plugin 3.0.11
    • Similar Issues:

      Description

      I'm trying to connect Jenkins to my company's cloud-hosted Jira (e.g. https://MYCOMPANY.atlassian.net/).  My account there is set up with google, so based on JIRA Rest API authentication always returns 401 unauthorized I took the step of creating an API token from https://id.atlassian.com/manage/api-tokens

      Using this, I am able to successfully curl my Jira site:

      $ curl -D- -u "me@MYCOMPANY.com:aUthT0K3n" -X GET -H "Content-Type: application/json" https://MYCOMPANY.atlassian.net/rest/api/2/issue/TST-123

      HTTP/2 200

      [...snip...] 

      Adding these credentials to Jenkins credentials manager was no problem.  I specify them for the Jira plugin configuration too.  But when I click "Validate Settings", I receive the following error:

      Failed to login to JIRA

      I can confirm that the proper credentials are being accessed, because when I visit https://id.atlassian.com/manage/api-tokens it says that the API token was used "A few seconds ago". 

      I see this in my Jenkins logs:

      Failed to login to JIRA at https://MYCOMPANY.atlassian.net/ RestClientException{statusCode=Optional.of(400), errorCollections=[ErrorCollection{status=400, errors={}, errorMessages=[The 'permissions' query parameter is required.]}]}

      I suspect that this is related to this deprecation warning:

      https://community.developer.atlassian.com/t/announcement-changes-to-rest-api-2-mypermissions-get-my-permissions/21245

      Previously, the resource would return all permissions defined on the Jira instance, now the list is limited to the keys provided in the permissions query parameter.

      Not sending the parameter is deprecated, and we are planning to start rejecting such requests starting from 1 February 2019.

      You can find more details here: Change notice - Get my permissions resource now requires the permissions query parameter 

       Is there something obvious that I'm missing or is this a bug in the plugin?

        Attachments

          Issue Links

            Activity

            Hide
            tramort Max Kaskevich added a comment -

            Have the same issue with "The 'permissions' query parameter is required."

            jenkins 2.190.3(docker image)
            Jira plugin 3.0.11

            Show
            tramort Max Kaskevich added a comment - Have the same issue with "The 'permissions' query parameter is required." jenkins 2.190.3(docker image) Jira plugin 3.0.11
            Hide
            korishev Morgan Nelson added a comment -

            Having the same issue.  I agree with the original poster's assessment, Atlassian changed the API in a breaking way.

            jenkins 2.190.3
            Jira plugin 3.0.11

            Thanks!
             

            Show
            korishev Morgan Nelson added a comment - Having the same issue.  I agree with the original poster's assessment, Atlassian changed the API in a breaking way. jenkins 2.190.3 Jira plugin 3.0.11 Thanks!  
            Hide
            jmaglylitagility Joseph Magly added a comment - - edited

            Seeing the same issue, has been broken since October at least. 

             

            Jenkins 2.190.3 (deployed to Windows server 2016)

            Jira Plugin 3.0.11

             

            Thank you

            Show
            jmaglylitagility Joseph Magly added a comment - - edited Seeing the same issue, has been broken since October at least.    Jenkins 2.190.3 (deployed to Windows server 2016) Jira Plugin 3.0.11   Thank you
            Hide
            atrox Calin Caliman added a comment -

            Same issue here.

             

            Jenkins 2.206 (deployed on CentOS)

            Jira Plugin 3.0.11

             

            Thanks.

            Show
            atrox Calin Caliman added a comment - Same issue here.   Jenkins 2.206 (deployed on CentOS) Jira Plugin 3.0.11   Thanks.
            Hide
            falcon benoit guerin added a comment -

            Duplicates of JENKINS-56987 I think

            Show
            falcon benoit guerin added a comment - Duplicates of  JENKINS-56987 I think
            Hide
            jaytbennett Jay Bennett added a comment -

            Just adding my voice that this issue is present in my company's Jenkins integration now, identical error message - awaiting the fix

            Show
            jaytbennett Jay Bennett added a comment - Just adding my voice that this issue is present in my company's Jenkins integration now, identical error message - awaiting the fix
            Hide
            rodrigc Craig Rodrigues added a comment -

            This seems to be fixed in JIRA Plugin 3.0.12

            Show
            rodrigc Craig Rodrigues added a comment - This seems to be fixed in JIRA Plugin 3.0.12

              People

              • Assignee:
                falcon benoit guerin
                Reporter:
                ianfixes Ian Katz
              • Votes:
                7 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: