[JIRA] (JENKINS-60305) Jira plugin can't validate credentials due to breaking change in JIRA-- "permissions query parameter" is now required

27 views
Skip to first unread message

ianfixes@gmail.com (JIRA)

unread,
Nov 27, 2019, 10:32:03 AM11/27/19
to jenkinsc...@googlegroups.com
Ian Katz created an issue
 
Jenkins / Bug JENKINS-60305
Jira plugin can't validate credentials due to breaking change in JIRA-- "permissions query parameter" is now required
Issue Type: Bug Bug
Assignee: Unassigned
Components: jira-plugin
Created: 2019-11-27 15:31
Environment: Jenkins ver. 2.190.2 (official Docker image)
Jira Plugin 3.0.11
Labels: jira 400 login atlassian
Priority: Major Major
Reporter: Ian Katz

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 "m...@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||https://developer.atlassian.com/cloud/jira/platform/change-notice-get-my-permissions-requires-permissions-query-parameter/] https://developer.atlassian.com/cloud/jira/platform/change-notice-get-my-permissions-requires-permissions-query-parameter/ []|https://developer.atlassian.com/cloud/jira/platform/change-notice-get-my-permissions-requires-permissions-query-parameter/]

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

ianfixes@gmail.com (JIRA)

unread,
Nov 27, 2019, 10:35:03 AM11/27/19
to jenkinsc...@googlegroups.com
Ian Katz updated an issue
Change By: Ian Katz
I'm trying to connect Jenkins to my company's cloud-hosted Jira (e.g. [https://MYCOMPANY.atlassian.net/).|https://mycompany.atlassian.net/).]  My account there is set up with google, so based on [JIRA Rest API authentication always returns 401 unauthorized| [https://community.atlassian.com/t5/Jira-questions/JIRA-Rest-API-authentication-always-returns-401-unauthorized/qaq-p/187181 #M317050] ]  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:
{quote}$ curl -D- -u "m...@MYCOMPANY.com:aUthT0K3n" -X GET -H "Content-Type: application/json" [https://MYCOMPANY.atlassian.net/rest/api/2/issue/TST-123|https://mycompany.atlassian.net/rest/api/2/issue/TST-123]

HTTP/2 200

[...snip...]{color:#172b4d} {color}
{quote}

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:
{quote}Failed to login to JIRA
{quote}

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:
{quote}{{Failed to login to JIRA at [ https://MYCOMPANY.atlassian.net/ |https://mycompany.atlassian.net/] RestClientException\{statusCode=Optional.of(400), errorCollections=[ErrorCollection{status=400, errors={}, errorMessages=[The 'permissions' query parameter is required.]}]}}}
{quote}

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]
{quote}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: [

ianfixes@gmail.com (JIRA)

unread,
Nov 27, 2019, 10:36:02 AM11/27/19
to jenkinsc...@googlegroups.com
Ian Katz updated an issue
I'm trying to connect Jenkins to my company's cloud-hosted Jira (e.g. [https://MYCOMPANY.atlassian.net/).|https://mycompany.atlassian.net/).]  My account there is set up with google, so based on [JIRA Rest API authentication always returns 401 unauthorized|#M317050] 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:
{quote}
{{ $ curl -D- -u "m...@MYCOMPANY.com:aUthT0K3n" -X GET -H "Content-Type: application/json" [https://MYCOMPANY.atlassian.net/rest/api/2/issue/TST-123|https://mycompany.atlassian.net/rest/api/2/issue/TST-123] }}

HTTP/2 200

[...snip...]{color:#172b4d} {color}
{quote}
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:
{quote}Failed to login to JIRA
{quote}
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:
{quote}
{{ Failed to login to JIRA at [https://MYCOMPANY.atlassian.net/|https://mycompany.atlassian.net/] RestClientException {{ \{statusCode=Optional.of(400), errorCollections=[ErrorCollection{status=400, errors={}, errorMessages=[The 'permissions' query parameter is required.]}]}}}

{quote}
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]
{quote}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|https://developer.atlassian.com/cloud/jira/platform/change-notice-get-my-permissions-requires-permissions-query-parameter/
{quote}
 

ianfixes@gmail.com (JIRA)

unread,
Nov 27, 2019, 10:39:02 AM11/27/19
to jenkinsc...@googlegroups.com
Ian Katz updated an issue
I'm trying to connect Jenkins to my company's cloud-hosted Jira (e.g. [https://MYCOMPANY.atlassian.net/).|https://mycompany.atlassian.net/).]  My account there is set up with google, so based on [JIRA Rest API authentication always returns 401 unauthorized|#M317050] 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:
{quote}

{ { code}
$ curl -D- -u "m...@MYCOMPANY.com:aUthT0K3n" -X GET -H "Content-Type: application/json" [ https://MYCOMPANY.atlassian.net/rest/api/2/issue/TST-123 |https://mycompany.atlassian.net/rest/api/2/issue/TST-123] {code } }

HTTP/2 200

[...snip...]{color:#172b4d} {color}
{quote}
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:
{quote}Failed to login to JIRA
{quote}
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:
{quote}Failed to login to JIRA at [https://MYCOMPANY.atlassian.net/|https://mycompany.atlassian.net/] RestClientException{{
\ {statusCode=Optional.of(400), errorCollections=[ErrorCollection \
{status=400, errors={}, errorMessages=[The 'permissions' query parameter is required.]}]}}}

{quote}
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]
{quote}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|https://developer.atlassian.com/cloud/jira/platform/change-notice-get-my-permissions-requires-permissions-query-parameter/
{quote}
  Is there something obvious that I'm missing or is this a bug in the plugin?

maxim.kaskevich@gmail.com (JIRA)

unread,
Nov 28, 2019, 8:30:11 AM11/28/19
to jenkinsc...@googlegroups.com
Max Kaskevich commented on Bug JENKINS-60305
 
Re: Jira plugin can't validate credentials due to breaking change in JIRA-- "permissions query parameter" is now required

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

jenkins 2.190.3(docker image)
Jira plugin 3.0.11

morgan.nelson@gmail.com (JIRA)

unread,
Dec 8, 2019, 11:52:02 PM12/8/19
to jenkinsc...@googlegroups.com

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!
 

jmagly@litagility.com (JIRA)

unread,
Dec 12, 2019, 11:35:04 AM12/12/19
to jenkinsc...@googlegroups.com

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

 

Jenkins 2.190.3 (deployed to Windows server 2016)

Jira Plugin 3.0.11

 

Thank you

jmagly@litagility.com (JIRA)

unread,
Dec 12, 2019, 12:43:03 PM12/12/19
to jenkinsc...@googlegroups.com
Joseph Magly edited a comment on Bug JENKINS-60305

calin.caliman@unifiedpost.com (JIRA)

unread,
Dec 16, 2019, 8:09:03 AM12/16/19
to jenkinsc...@googlegroups.com

Same issue here.

 

Jenkins 2.206 (deployed on CentOS)

Jira Plugin 3.0.11

 

Thanks.

benoit.guerin@gmail.com (JIRA)

unread,
Dec 29, 2019, 7:59:03 AM12/29/19
to jenkinsc...@googlegroups.com

benoit.guerin@gmail.com (JIRA)

unread,
Dec 29, 2019, 9:33:05 AM12/29/19
to jenkinsc...@googlegroups.com

benoit.guerin@gmail.com (JIRA)

unread,
Dec 29, 2019, 9:33:05 AM12/29/19
to jenkinsc...@googlegroups.com
benoit guerin started work on Bug JENKINS-60305
 
Change By: benoit guerin
Status: Open In Progress

benoit.guerin@gmail.com (JIRA)

unread,
Dec 29, 2019, 9:33:06 AM12/29/19
to jenkinsc...@googlegroups.com

jaytbennett@live.co.uk (JIRA)

unread,
Jan 2, 2020, 7:06:03 AM1/2/20
to jenkinsc...@googlegroups.com
Jay Bennett commented on Bug JENKINS-60305
 
Re: Jira plugin can't validate credentials due to breaking change in JIRA-- "permissions query parameter" is now required

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

olamy@apache.org (JIRA)

unread,
Jan 28, 2020, 4:18:03 PM1/28/20
to jenkinsc...@googlegroups.com

rodrigc@FreeBSD.org (JIRA)

unread,
Feb 18, 2020, 3:12:03 PM2/18/20
to jenkinsc...@googlegroups.com

ashok.ravi92@gmail.com (JIRA)

unread,
Feb 26, 2020, 5:27:07 AM2/26/20
to jenkinsc...@googlegroups.com

Hi everyone, i am getting "org.codehaus.jettison.json.JSONException: JSONObject["name"] not found" error when updating the Jira(Cloud) issue status from jenkins(version 2.204.2). I am using Jira plugin (version 3.0.12). Kindly help me to resolve this issue.

ashok.ravi92@gmail.com (JIRA)

unread,
Feb 28, 2020, 2:21:02 AM2/28/20
to jenkinsc...@googlegroups.com

Hi, is this issue fixed in 3.0.12 version? , we are waiting for this fix , automation process is pending due to this issue.

This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

ashok.ravi92@gmail.com (JIRA)

unread,
Feb 28, 2020, 2:38:05 AM2/28/20
to jenkinsc...@googlegroups.com
Ashok T R edited a comment on Bug JENKINS-60305
Hi, is this issue fixed in 3.0.12 version? , we are waiting for this fix , automation process is pending stopped due to this issue.

rodrigc@FreeBSD.org (JIRA)

unread,
Feb 28, 2020, 12:12:04 PM2/28/20
to jenkinsc...@googlegroups.com

Ashok T R You need fixes from https://github.com/jenkinsci/jira-plugin/pull/213 .
Can you build the jira plugin from this branch by doing:

git clone -b jira-rest-client.version_5.2.0 https://github.com/rodrigc/jira-plugin
cd jira-plugin
mvn clean package -DskipTests

Then install the jira.hpi on your Jenkins server.

Reply all
Reply to author
Forward
0 new messages