[JIRA] (JENKINS-58694) Not able to trigger build via API call

7 views
Skip to first unread message

babishanishere@gmail.com (JIRA)

unread,
Jul 28, 2019, 10:08:03 AM7/28/19
to jenkinsc...@googlegroups.com
Babishan Maheswaran created an issue
 
Jenkins / Bug JENKINS-58694
Not able to trigger build via API call
Issue Type: Bug Bug
Assignee: Janario Oliveira
Components: http-request-plugin
Created: 2019-07-28 14:07
Priority: Minor Minor
Reporter: Babishan Maheswaran

I was trying to access jenkins via api, when api call is made in POSTMAN it is working perfectly fine, but if the same is accessed in an application(written in react), getting the following error

 

// code placeholder
"type": "default",
  "status": 403,
  "ok": false,
  "headers": {
    "map": {
      "content-length": "813",
      "x-permission-implied-by": "hudson.model.Hudson.Administer",
      "x-you-are-in-group-disabled": "JENKINS-39402: use -Dhudson.security.AccessDeniedException2.REPORT_GROUP_HEADERS=true or use /whoAmI to diagnose",
      "content-type": "text/html;charset=utf-8",
      "x-content-type-options": "nosniff",
      "date": "Sun, 28 Jul 2019 10:21:02 GMT",
      "server": "Jetty(9.4.z-SNAPSHOT)",
      "x-required-permission": "hudson.model.Hudson.Read",
      "x-you-are-authenticated-as": "anonymous",
      "x-jenkins-session": "63af948b",
      "x-jenkins": "2.176.2",
      "x-hudson": "1.395"
    }
  },
  "url": "http://admin:admin@localhost:8080/api/json",
  "_bodyInit": {
    "_data": {
      "size": 813,
      "offset": 0,
      "blobId": "dc017047-59b3-4dba-8762-38bc4d701714",
      "__collector": null
    }
  },
  "_bodyBlob": {
    "_data": {
      "size": 813,
      "offset": 0,
      "blobId": "dc017047-59b3-4dba-8762-38bc4d701714",
      "__collector": null
    }
  }
}

From the above code, I tried disabling/enabling "x-you-are-in-group-disabled" but couldn't locate how/where to do it in jenkins

To run jenkins - 'java -jar jenkins.war' is used

url: localhost:8080

I tried disabling CSRF but the issue persists

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

babishanishere@gmail.com (JIRA)

unread,
Jul 28, 2019, 11:51:02 AM7/28/19
to jenkinsc...@googlegroups.com

janario.oliveira@gmail.com (JIRA)

unread,
Sep 8, 2019, 8:25:02 AM9/8/19
to jenkinsc...@googlegroups.com
Janario Oliveira updated an issue
Change By: Janario Oliveira
Component/s: core
Component/s: http-request-plugin
Reply all
Reply to author
Forward
0 new messages