Comment 2 for bug 1732464

Revision history for this message
Michael (wattersm) wrote :

I am also having this issue with Jenkins 2.249.2. Submitting a build using the python-jenkins module results in a 403 error from Jenkins which is behind an nginx proxy. The same request submitted using the HTTP GET method *will* work as shown below.

# 997 curl -v -X POST 'https://jenkins.example.com/job/openssh/buildWithParameters?cause=Test+Build&REPO=git%3A%2F%2Fpagure.example.com%2Fpuppet%2Fopenssh.git&BRANCH=master&BRANCH_TO=ssh_template_test&token=0KNNDFLIGOBW5WYOP7GBG5TZ4ZZO0WPB'

# 998 curl -v -X GET 'https://jenkins.example.com/job/openssh/buildWithParameters?cause=Test+Build&REPO=git%3A%2F%2Fpagure.example.com%2Fpuppet%2Fopenssh.git&BRANCH=master&BRANCH_TO=ssh_template_test&token=0KNNDFLIGOBW5WYOP7GBG5TZ4ZZO0WPB'

#10.201.64.43 - - [13/Oct/2020:08:53:28 -0400] "GET /job/openssh/buildWithParameters?cause=Test+Build&REPO=git%3A%2F%2Fpagure.example.com%2Fpuppet%2Fopenssh.git&BRANCH=master&BRANCH_TO=ssh_template_test&token=0KNNDFLIGOBW5WYOP7GBG5TZ4ZZO0WPB HTTP/1.1" 201 5 "-" "curl/7.29.0" "-"

#10.201.64.43 - - [13/Oct/2020:08:53:11 -0400] "POST /job/openssh/buildWithParameters?cause=Test+Build&REPO=git%3A%2F%2Fpagure.example.com%2Fpuppet%2Fopenssh.git&BRANCH=master&BRANCH_TO=ssh_template_test&token=0KNNDFLIGOBW5WYOP7GBG5TZ4ZZO0WPB HTTP/1.1" 403 578 "-" "curl/7.29.0" "-"

I also created a simple test script based on the lib_ci.py module from pagure which also receives a 403 error when submitting a build. The script is attached for reference.