[JIRA] (JENKINS-61916) [JEP-200] http-request-plugin java.lang.SecurityException: Rejected: org.apache.http.HttpHost

13 views
Skip to first unread message

ribram@luxoft.com (JIRA)

unread,
Apr 15, 2020, 11:42:03 AM4/15/20
to jenkinsc...@googlegroups.com
Robert Ibram created an issue
 
Jenkins / Bug JENKINS-61916
[JEP-200] http-request-plugin java.lang.SecurityException: Rejected: org.apache.http.HttpHost
Issue Type: Bug Bug
Assignee: Janario Oliveira
Components: http-request-plugin
Created: 2020-04-15 15:41
Environment: Jenkins ver. 2.213
HTTP Request Plugin 1.8.24
Priority: Major Major
Reporter: Robert Ibram

Hello,

First of all, I already read the https://wiki.jenkins.io/display/JENKINS/Plugins+affected+by+fix+for+JEP-200 but I don't have any proxy configured.

Also checked the https://issues.jenkins-ci.org/browse/JENKINS-51741.

I try to create a http request as follows:

private String getResponse(def apiUrl, def requestBody){ 
    def response = httpRequest httpMode: "POST",
                url: apiUrl, 
                authentication: '', 
                customHeaders: [[name: 'Content-type', value: 'application/xml']], 
                requestBody: requestBody, 
                ignoreSslErrors: true 
    return response.getContent() 
}  

When trying to execute this inside my Jenkins Pipeline I get the following error:

18:15:16  java.lang.SecurityException: Rejected: org.apache.http.HttpHost; see https://jenkins.io/redirect/class-filter/
18:15:16  	at hudson.remoting.ClassFilter.check(ClassFilter.java:77)
18:15:16  	at hudson.remoting.MultiClassLoaderSerializer$Input.resolveClass(MultiClassLoaderSerializer.java:133)
18:15:16  	at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1620)
18:15:16  	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1521)
18:15:16  	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1781)
18:15:16  	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353)
18:15:16  	at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2018)
18:15:16  	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1942)
18:15:16  	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1808)
18:15:16  	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353)
18:15:16  	at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2018)
18:15:16  	at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:503)
18:15:16  	at java.lang.Throwable.readObject(Throwable.java:914)
18:15:16  	at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source)
18:15:16  	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
18:15:16  	at java.lang.reflect.Method.invoke(Method.java:498)
18:15:16  	at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1058)
18:15:16  	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1909)
18:15:16  	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1808)
18:15:16  	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353)
18:15:16  	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:373)
18:15:16  	at hudson.remoting.UserRequest.deserialize(UserRequest.java:290)
18:15:16  	at hudson.remoting.UserResponse.retrieve(UserRequest.java:385)
18:15:16  	at hudson.remoting.Channel.call(Channel.java:955)
18:15:16  Caused: java.io.IOException: Failed to deserialize response to UserRequest:jenkins.plugins.http_request.HttpRequestExecution@4bbe800a
18:15:16  	at hudson.remoting.Channel.call(Channel.java:963)
18:15:16  	at jenkins.plugins.http_request.HttpRequestStep$Execution.run(HttpRequestStep.java:337)
18:15:16  	at jenkins.plugins.http_request.HttpRequestStep$Execution.run(HttpRequestStep.java:319)
18:15:16  	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
18:15:16  	at hudson.security.ACL.impersonate(ACL.java:290)
18:15:16  	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
18:15:16  	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
18:15:16  	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
18:15:16  	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
18:15:16  	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
18:15:16  	at java.lang.Thread.run(Thread.java:745)
18:15:16  Finished: FAILURE 

 

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

ribram@luxoft.com (JIRA)

unread,
Apr 15, 2020, 11:44:02 AM4/15/20
to jenkinsc...@googlegroups.com
Robert Ibram updated an issue
Change By: Robert Ibram
Hello,

First of all, I already read the [https://wiki.jenkins.io/display/JENKINS/Plugins+affected+by+fix+for+JEP-200] but I don't have any proxy configured.

Also checked the https://issues.jenkins-ci.org/browse/JENKINS-51741.

I try to create a http request as follows:
{code:java}

private String getResponse(def apiUrl, def requestBody){
    def response = httpRequest httpMode: "POST",
                url: apiUrl,
                authentication: '',
                customHeaders: [[name: 'Content-type', value: 'application/xml']],
                requestBody: requestBody,
                ignoreSslErrors: true
    return response.getContent()
}  {code}

When trying to execute this inside my Jenkins Pipeline I get the following error:
{code:java}
18:15:16  Finished: FAILURE {code}
 

I have no idea why it's trying to call   HttpHost as I saw in the code for HTTP REQUEST plugin on GitHub that seems to be only used for proxy, otherwise it's null.

 

ribram@luxoft.com (JIRA)

unread,
Apr 16, 2020, 4:21:03 AM4/16/20
to jenkinsc...@googlegroups.com
Robert Ibram updated an issue
Hello,

First of all, I already read the [https://wiki.jenkins.io/display/JENKINS/Plugins+affected+by+fix+for+JEP-200] but I don't have any proxy configured.

Also checked the https://issues.jenkins-ci.org/browse/JENKINS-51741.

I try to create a http request as follows:
{code:java}
private String getResponse(def apiUrl, def requestBody){
    def response = httpRequest httpMode: "POST",
                url: apiUrl,
                authentication: ' someApiKey ',

ribram@luxoft.com (JIRA)

unread,
Apr 21, 2020, 3:06:03 AM4/21/20
to jenkinsc...@googlegroups.com

ribram@luxoft.com (JIRA)

unread,
Apr 21, 2020, 3:06:03 AM4/21/20
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages