jenkinsci / jenkinsci/java-client-api

sending requests with the csrf crumb

オープン
#316 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Java
スター
913
フォーク
466
PR マージ指標
30日以内にマージされた PR はありません

説明

I am quite new to jenkins, I started using this java api to send commandds to my local jenkins server. However, i have received the following error in my request
` Exception in thread "main" org.apache.http.client.HttpResponseException: No valid crumb was included in the request at com.offbytwo.jenkins.client.validator.HttpResponseValidator.validateResponse(HttpResponseValidator.java:11)
at com.offbytwo.jenkins.client.JenkinsHttpClient.post(JenkinsHttpClient.java:239)
at com.offbytwo.jenkins.client.JenkinsHttpClient.post(JenkinsHttpClient.java:405)
at com.offbytwo.jenkins.JenkinsServer.deleteJob(JenkinsServer.java:689)
at de.security.util.JenkinsConnector.main(JenkinsConnector.java:29) `
How can I attack the csrf token to my requests, I can direclty get the token form the server.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Start with JenkinsHttpClient.post and HttpResponseValidator.validateResponse, using the stack trace to trace the deleteJob request that produces the missing-crumb error. Check how requests are assembled and how the client could be verified against a local Jenkins server; done means the reported request succeeds when CSRF protection is enabled.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java
領域
api, backend, security
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。