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

Temporary files should not be created in the bundles root directory under JENKINS_HOME

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      This plugin includes an automatic bundle generation on the Jenkins instance FS every hour.

      com.cloudbees.jenkins.support.configfiles.SecretHandler#findSecrets generates temporary files in SupportPlugin.getRootDirectory():

      File patchedFile = File.createTempFile("patched", ".xml", SupportPlugin.getRootDirectory());
      

      If JENKINS_HOME is using a network shared FS (NFS, EBS, GlusterFS, whatever), the creation of those temporary files gets unnecessarily synced over the network.
      And if something on "the other side" starts reading this file (imagine a backup service, or whatever), then for instance this will end up creating dozens of .nfs132435434543 files for deleted files on one node (but being read somewhere else).

      We should find a way to put those files elsewhere than under JENKINS_HOME, maybe under java.io.tmpdir but this had been judged problematic for security reasons (as those Components are processing config.xml and the likes that may contain secrets)

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Baptiste Mathus
            Path:
            src/main/java/com/cloudbees/jenkins/support/api/FileContent.java
            src/main/java/com/cloudbees/jenkins/support/configfiles/AgentsConfigFile.java
            src/main/java/com/cloudbees/jenkins/support/configfiles/ConfigFileComponent.java
            src/main/java/com/cloudbees/jenkins/support/configfiles/OtherConfigFilesComponent.java
            src/main/java/com/cloudbees/jenkins/support/configfiles/SecretHandler.java
            src/main/java/com/cloudbees/jenkins/support/configfiles/XmlRedactedSecretFileContent.java
            src/test/java/com/cloudbees/jenkins/support/configfiles/OtherConfigFilesComponentTest.java
            http://jenkins-ci.org/commit/support-core-plugin/8850b77432ac654620ed5dcc1b345ec97711d068
            Log:
            JENKINS-42393 Temporary files should not be created in the bundles root directory under JENKINS_HOME (#106)

            JENKINS-42393 Temporary files should not be created in the bundles root directory under JENKINS_HOME

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Baptiste Mathus Path: src/main/java/com/cloudbees/jenkins/support/api/FileContent.java src/main/java/com/cloudbees/jenkins/support/configfiles/AgentsConfigFile.java src/main/java/com/cloudbees/jenkins/support/configfiles/ConfigFileComponent.java src/main/java/com/cloudbees/jenkins/support/configfiles/OtherConfigFilesComponent.java src/main/java/com/cloudbees/jenkins/support/configfiles/SecretHandler.java src/main/java/com/cloudbees/jenkins/support/configfiles/XmlRedactedSecretFileContent.java src/test/java/com/cloudbees/jenkins/support/configfiles/OtherConfigFilesComponentTest.java http://jenkins-ci.org/commit/support-core-plugin/8850b77432ac654620ed5dcc1b345ec97711d068 Log: JENKINS-42393 Temporary files should not be created in the bundles root directory under JENKINS_HOME (#106) JENKINS-42393 Temporary files should not be created in the bundles root directory under JENKINS_HOME
            Hide
            batmat Baptiste Mathus added a comment -

            Released as support-core-2.39, will be visible in a few hours.

            Show
            batmat Baptiste Mathus added a comment - Released as support-core-2.39, will be visible in a few hours.

              People

              • Assignee:
                batmat Baptiste Mathus
                Reporter:
                batmat Baptiste Mathus
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: