Immutable solution version
Jenkins: 403 No valid crumb was included in the request
Complete solution
Finally, this post helped me to do away with the crumb problem, but still securing Jenkins from a CSRF attack.
Finally, this post helped me to do away with the crumb problem, but still securing Jenkins from a CSRF attack. Solution for no-valid crumb included in the request issue Basically, we need to first request for a crumb with authentication and then issue a POST API calls with a crumb as a header along with authentication again. This is how I did it, curl -v -X GET http://jenkins-url:8080/crumbIssuer/api/json --user [username]:[password] The response was, { "_class":"hudson.security.csrf.DefaultCrumbIssuer", "crumb":"0db38413bd7ec9e98974f5213f7ead8b", "crumbRequestField":"Jenkins-Crumb" } Then the POST API call with the above crumb information in it. curl -X POST http://jenkins-url:8080/job/[job-name]/build --user [username]:[password] -H 'Jenkins-Crumb: 0db38413bd7ec9e98974f5213f7ead8b'
Context: I configured Jenkins in Spinnaker as follows and setup the Spinnaker pipeline. jenkins: # If you are integrating Jenkins, set its location here using the baseUrl # field and provide the username/password credentials. # You must also enable the "igor" service listed separately. # # If you have multiple Jenkins servers, you will need to list # them in an igor-local.yml. See jenkins.masters in config/igor.yml. # # Note that Jenkins is not installed with Spinnaker so you must obt
Evidence
Source: I configured Jenkins in Spinnaker as follows and setup the Spinnaker pipeline. jenkins: # If you are integrating Jenkins, set its location here using the baseUrl # field and provide the username/password credentials. # You must also enable the "igor" service listed separately. # # If you have multiple Jenkins servers, you will need to list # them in an igor-local.yml. See jenkins.masters in config/igor.yml. # # Note that Jenkins is not installed with Spinnaker so you must obt
Verified resolution: Finally, this post helped me to do away with the crumb problem, but still securing Jenkins from a CSRF attack. Solution for no-valid crumb included in the request issue Basically, we need to first request for a crumb with authentication and then issue a POST API calls with a crumb as a header along with authentication again. This is how I did it, curl -v -X GET http://jenkins-url:8080/crumbIssuer/api/json --user [username]:[password] The response was, { "_class":"hudson.security.csrf.DefaultCrumbIssuer", "crumb":"0db38413bd7ec9e98974f5213f7ead8b", "crumbRequestField":"Jenkins-Crumb" } Then the POST API call with the above crumb information in it. curl -X POST http://jenkins-url:8080/job/[job-name]/build --user [username]:[password] -H 'Jenkins-Crumb: 0db38413bd7ec9e98974f5213f7ead8b'
Source URL: https://stackoverflow.com/questions/44711696/jenkins-403-no-valid-crumb-was-included-in-the-request
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_XlQI9a1k-Uwq2T2eSWboFg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Jenkins: 403 No valid crumb was included in the request <span>— Vectle</span></a>