• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • http-request-plugin
    • None
    • Jenkins ver. 2.32.2 LTS (i.e., docker 2.32.2:latest)
      HTTP Request Plugin 1.8.13
      All plugins are current

      I am using http-request-plugin to call an API end point using HTTPS. The cert associated with the domain has expired so I would expect the API call to fail, but low and behold the call succeeds and even claims a HTTP 200 header response. I don't know whats happening under the covers so not sure if this is a bug or an improvement/feature, but I am 100% certain it's not using HTTPS or some flag is being used internally to circumvent TLS.

      URL: https://internal.rpm.datapipe.senderscore.net/publishfile/${RPM_FILE}
      HTTP mode: GET

      Here is curl example showing the cert in question has expired:

      $ curl -i "https://internal.rpm.datapipe.senderscore.net/health"
      curl: (60) SSL certificate problem: certificate has expired
      More details here: http://curl.haxx.se/docs/sslcerts.html
      
      curl performs SSL certificate verification by default, using a "bundle"
       of Certificate Authority (CA) public keys (CA certs). If the default
       bundle file isn't adequate, you can specify an alternate file
       using the --cacert option.
      If this HTTPS server uses a certificate signed by a CA represented in
       the bundle, the certificate verification probably failed due to a
       problem with the certificate (it might be expired, or the name might
       not match the domain name in the URL).
      If you'd like to turn off curl's verification of the certificate, use
       the -k (or --insecure) option.
      

      Jenkins console output snippet follows from project build that uses the HTTP Request setup I illustrated above:

      ...
      HttpMode: GET
      URL: https://internal.rpm.datapipe.senderscore.net/publishfile/tusko_message_stream-3.0.0-SNAPSHOT20170210153816.noarch.rpm
      Sending request to url: https://internal.rpm.datapipe.senderscore.net/publishfile/tusko_message_stream-3.0.0-SNAPSHOT20170210153816.noarch.rpm
      Response Code: HTTP/1.1 200 OK
      Success code from [100‥399]
      ...
      

      If you need a URL to test/debug against that currently has an expired Cert you can use this one but be warned it'll probably stop resolving in the next couple of months:

      curl -i "https://metrics.datapipe.senderscore.net/"

          [JENKINS-41934] HTTPS/TLS Cert check bypassed

          Code changed in jenkins
          User: Janario Oliveira
          Path:
          src/main/java/jenkins/plugins/http_request/HttpRequest.java
          src/main/java/jenkins/plugins/http_request/HttpRequestStep.java
          src/main/resources/jenkins/plugins/http_request/HttpRequest/config.jelly
          src/main/webapp/help-ignoreSslErrors.html
          http://jenkins-ci.org/commit/http-request-plugin/5d631d58f6ca0435880a26a8ef57b860719578d3
          Log:
          JENKINS-41934 Added conf to ignore certificate

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Janario Oliveira Path: src/main/java/jenkins/plugins/http_request/HttpRequest.java src/main/java/jenkins/plugins/http_request/HttpRequestStep.java src/main/resources/jenkins/plugins/http_request/HttpRequest/config.jelly src/main/webapp/help-ignoreSslErrors.html http://jenkins-ci.org/commit/http-request-plugin/5d631d58f6ca0435880a26a8ef57b860719578d3 Log: JENKINS-41934 Added conf to ignore certificate

          Code changed in jenkins
          User: Janario Oliveira
          Path:
          src/main/java/jenkins/plugins/http_request/HttpRequest.java
          http://jenkins-ci.org/commit/http-request-plugin/ce565aa74b4d72779ab16306fb5f5ea63058b89b
          Log:
          JENKINS-41934 Added conf to ignore certificate

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Janario Oliveira Path: src/main/java/jenkins/plugins/http_request/HttpRequest.java http://jenkins-ci.org/commit/http-request-plugin/ce565aa74b4d72779ab16306fb5f5ea63058b89b Log: JENKINS-41934 Added conf to ignore certificate

          The certificate was ignored.

          I added a configuration ignoreSslErrors that when true will ignore invalid certificates.

          The default is false but in old jobs to keep compatibility it will be deserialized as true.

          Janario Oliveira added a comment - The certificate was ignored. I added a configuration ignoreSslErrors that when true will ignore invalid certificates. The default is false but in old jobs to keep compatibility it will be deserialized as true.

            janario Janario Oliveira
            holybit Joseph Crotty
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: