jenkinsci / jenkinsci/java-client-api

sending requests with the csrf crumb

Abierto
#316 3 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Java
Estrellas
913
Forks
466
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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.

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
java
Área
api, backend, security
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.