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

FIPS compliance checks fail when serverUrl isn't defined (not mandatory for kubeconfig)

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major

      Having just upgraded Jenkins to latest LTS and associated plugins, found all kubernetes jobs to fail due to following:

       

      Also: org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: ad33ed53-da13-4d9a-86a3-dbc8df079dc8
      java.lang.NullPointerException: Cannot invoke "String.startsWith(String)" because "stringRequest" is null
      at PluginClassLoader for kubernetes-credentials//org.jenkinsci.plugins.kubernetes.credentials.Utils.ensureFIPSCompliantRequest(Utils.java:85)
      at PluginClassLoader for kubernetes-credentials//org.jenkinsci.plugins.kubernetes.auth.KubernetesAuthConfig.<init>(KubernetesAuthConfig.java:23)
      at PluginClassLoader for kubernetes-cli//org.jenkinsci.plugins.kubernetes.cli.kubeconfig.KubeConfigWriter.getConfigBuilderWithAuth(KubeConfigWriter.java:164)
      at PluginClassLoader for kubernetes-cli//org.jenkinsci.plugins.kubernetes.cli.kubeconfig.KubeConfigWriter.writeKubeConfig(KubeConfigWriter.java:138)
      at PluginClassLoader for kubernetes-cli//org.jenkinsci.plugins.kubernetes.cli.GenericBuildStep.start(GenericBuildStep.java:59)
      at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:323)

       

      We use `withKubeConfig` - example call from the Jenkinsfile:

       

              stage('Print cluster info') {
                  steps {
                      withKubeConfig([credentialsId: env.KUBE_CONFIG_SECRET_NAME]) {
                          sh '''
                          kubectl cluster-info
                          '''
                      }
                  }
              }
      

       

      Per the kubernetes-cli-plugin docs, `serverUrl` isn't mandatory when using kubeconfig

      https://github.com/jenkinsci/kubernetes-cli-plugin?tab=readme-ov-file#parameters-with-kubeconfig-file

       

      This is a bug introduced in https://issues.jenkins.io/browse/JENKINS-73525

       

       

          [JENKINS-73610] FIPS compliance checks fail when serverUrl isn't defined (not mandatory for kubeconfig)

          Lee created issue -
          Lee made changes -
          Description Original: Having just upgraded Jenkins to latest LTS and associated plugins, found all kubernetes jobs to fail due to following:
          Also: org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: ad33ed53-da13-4d9a-86a3-dbc8df079dc8
          java.lang.NullPointerException: Cannot invoke "String.startsWith(String)" because "stringRequest" is null
          at PluginClassLoader for kubernetes-credentials//org.jenkinsci.plugins.kubernetes.credentials.Utils.ensureFIPSCompliantRequest(Utils.java:85)
          at PluginClassLoader for kubernetes-credentials//org.jenkinsci.plugins.kubernetes.auth.KubernetesAuthConfig.<init>(KubernetesAuthConfig.java:23)
          at PluginClassLoader for kubernetes-cli//org.jenkinsci.plugins.kubernetes.cli.kubeconfig.KubeConfigWriter.getConfigBuilderWithAuth(KubeConfigWriter.java:164)
          at PluginClassLoader for kubernetes-cli//org.jenkinsci.plugins.kubernetes.cli.kubeconfig.KubeConfigWriter.writeKubeConfig(KubeConfigWriter.java:138)
          at PluginClassLoader for kubernetes-cli//org.jenkinsci.plugins.kubernetes.cli.GenericBuildStep.start(GenericBuildStep.java:59)
          at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:323)
           

          We use `withKubeConfig` - example call from the Jenkinsfile:

           
          {code:java}
                  stage('Print cluster info') {
                      steps {
                          withKubeConfig([credentialsId: env.KUBE_CONFIG_SECRET_NAME]) {
                              sh '''
                              kubectl cluster-info
                              '''
                          }
                      }
                  }
          {code}
           

          Per the kubernetes-cli-plugin docs, `serverUrl` isn't mandatory when using kubeconfig

          [https://github.com/jenkinsci/kubernetes-cli-plugin?tab=readme-ov-file#parameters-with-kubeconfig-file]

           

          This is a bug introduced in https://issues.jenkins.io/browse/JENKINS-73525

           

           
          New: Having just upgraded Jenkins to latest LTS and associated plugins, found all kubernetes jobs to fail due to following:

           
          {code:java}
          Also: org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: ad33ed53-da13-4d9a-86a3-dbc8df079dc8
          java.lang.NullPointerException: Cannot invoke "String.startsWith(String)" because "stringRequest" is null
          at PluginClassLoader for kubernetes-credentials//org.jenkinsci.plugins.kubernetes.credentials.Utils.ensureFIPSCompliantRequest(Utils.java:85)
          at PluginClassLoader for kubernetes-credentials//org.jenkinsci.plugins.kubernetes.auth.KubernetesAuthConfig.<init>(KubernetesAuthConfig.java:23)
          at PluginClassLoader for kubernetes-cli//org.jenkinsci.plugins.kubernetes.cli.kubeconfig.KubeConfigWriter.getConfigBuilderWithAuth(KubeConfigWriter.java:164)
          at PluginClassLoader for kubernetes-cli//org.jenkinsci.plugins.kubernetes.cli.kubeconfig.KubeConfigWriter.writeKubeConfig(KubeConfigWriter.java:138)
          at PluginClassLoader for kubernetes-cli//org.jenkinsci.plugins.kubernetes.cli.GenericBuildStep.start(GenericBuildStep.java:59)
          at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:323){code}

           

          We use `withKubeConfig` - example call from the Jenkinsfile:

           
          {code:java}
                  stage('Print cluster info') {
                      steps {
                          withKubeConfig([credentialsId: env.KUBE_CONFIG_SECRET_NAME]) {
                              sh '''
                              kubectl cluster-info
                              '''
                          }
                      }
                  }
          {code}
           

          Per the kubernetes-cli-plugin docs, `serverUrl` isn't mandatory when using kubeconfig

          [https://github.com/jenkinsci/kubernetes-cli-plugin?tab=readme-ov-file#parameters-with-kubeconfig-file]

           

          This is a bug introduced in [https://issues.jenkins.io/browse/JENKINS-73525]

           

           
          Lee made changes -
          Link New: This issue is blocked by JENKINS-73611 [ JENKINS-73611 ]
          Lee made changes -
          Link New: This issue is caused by JENKINS-73525 [ JENKINS-73525 ]
          Lee made changes -
          Link New: This issue duplicates JENKINS-73611 [ JENKINS-73611 ]
          Lee made changes -
          Link Original: This issue is blocked by JENKINS-73611 [ JENKINS-73611 ]
          James Nord made changes -
          Assignee Original: Max Laverse [ max_laverse ] New: Jean-Marc Desprez [ jmdesprez ]
          Jean-Marc Desprez made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Jean-Marc Desprez made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]
          James Nord made changes -
          Remote Link New: This issue links to "jenkinsci/kubernetes-credentials-plugin#55 (Web Link)" [ 29916 ]
          Basil Crow made changes -
          Released As New: https://github.com/jenkinsci/kubernetes-credentials-plugin/releases/tag/188.vcf079758e37b_
          Resolution New: Fixed [ 1 ]
          Status Original: In Review [ 10005 ] New: Closed [ 6 ]

            jmdesprez Jean-Marc Desprez
            lees_nw Lee
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: