Spinnaker call Jenkins API returns a 403 error

table of Contents

Scenes

Some time ago, k8s production environments choose to use Spinnaker + Jenkins implement CI / CD, but I went to a build error when calling jenkins at Spinnaker, then I went to check the logs Jenkins found the following error:

WARNING hudson.security.csrf.CrumbFilter#doFilter: No valid crumb was included in request for /job/dubbo-demo-slave/buildWithParameters by admin. Returning 403.

the reason

Spinnaker is because Jenkins calls through cross-site manner, then Jenkins CSRF protection is enabled by default, so jenkins will return a 403 error,
Stack Overflow solve the problem of post

solve

The solution is very simple, the CSRF protection hook can be canceled.

Guess you like

Origin www.cnblogs.com/jasonminghao/p/12466739.html