Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-75676

Client certificate credentials not handled properly

XMLWordPrintable

    • 936.4.2

      Cloudbees-bitbucket-branch-source supports client certificate credentials authentication when connecting to BictBucket Server.

      It seems from the plugin version 933.3.0, this is failing and we are not sending the certificate in the requests, and in case the Bitbucket server is installed behind a Mutual Tls proxy it will fails with:

       

      Mon May 19 11:56:22 CEST 2025] Starting branch indexing... 
      ERROR: [Mon May 19 12:02:09 CEST 2025] 
      Could not update folder level actions from source 42912027-6288-4c45-8b08-7872e7ac3d0c 
      [Mon May 19 12:02:09 CEST 2025] Finished branch indexing. Indexing took 5 min 47 sec 
      FATAL: Failed to recompute children of publicrepo com.cloudbees.jenkins.plugins.bitbucket.api.BitbucketRequestException: HTTP request error. 
      Status: HTTP/1.1 400 Bad Request Response: 
      <html> <head><title>400 No required SSL certificate was sent</title></head> <body> <center><h1>400 Bad Request</h1></center> <center>No required SSL certificate was sent</center> <hr><center>nginx/1.27.4</center> </body> </html>

       

       

      Doing this with any other previous version works properly:

       

      Started by user admin [Mon May 19 12:58:51 CEST 2025] 
      Starting branch indexing... 
      Connecting to https://localhost:1443 using CN=xxx,OU=xxx,O=xxx,ST=xxx,C=XX 
      Looking up SECO/publicrepo for branches 
      Checking branch main from SECO/publicrepo 
      ‘Jenkinsfile’ found 
      Met criteria 
      No changes detected: main (still at 84325cc090e0faae90f4d11d3917ec1fb833794a) 
      1 branches were processed Looking up SECO/publicrepo for pull requests 
      0 pull requests were processed [Mon May 19 12:58:51 CEST 2025] 
      Finished branch indexing. 
      Indexing took 0.53 sec Finished: SUCCESS

       

       

      Reviewing with git bisect, it seems the error was introduced in the commit

      # first bad commit: [e4d32d549b3bf29a896ae0ec31f2d88cbcb32377] [JENKINS-64418] Add exponential backoff to BitBucket rate limit retry loop (#927)

        1. StackTrace.txt
          18 kB
        2. screenshot-3.png
          screenshot-3.png
          34 kB
        3. screenshot-2.png
          screenshot-2.png
          138 kB
        4. screenshot-1.png
          screenshot-1.png
          25 kB
        5. readMe2.txt
          6 kB
        6. nginxDocker.sh
          0.2 kB
        7. JENKINS-75676.zip
          20 kB
        8. image-2025-06-14-10-24-23-671.png
          image-2025-06-14-10-24-23-671.png
          182 kB
        9. image-2025-06-14-10-22-26-919.png
          image-2025-06-14-10-22-26-919.png
          112 kB
        10. image-2025-05-29-09-28-23-759.png
          image-2025-05-29-09-28-23-759.png
          52 kB
        11. image-2025-05-22-09-16-35-018.png
          image-2025-05-22-09-16-35-018.png
          41 kB
        12. default.conf
          0.7 kB
        13. bitBucketDocker.sh
          0.3 kB

            nfalco Nikolas Falco
            jgarciacloudbees Javier García
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: