From cdbc37ce09747dc1273b7f080065fd7cf2a64f1d Mon Sep 17 00:00:00 2001 From: David O'Sullivan Date: Wed, 5 Apr 2023 11:52:11 +0100 Subject: [PATCH 1/2] Disables watching the private key file for updates --- .../security/FileWatchingX509ExtendedKeyManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/cloudfoundry/security/FileWatchingX509ExtendedKeyManager.java b/src/main/java/org/cloudfoundry/security/FileWatchingX509ExtendedKeyManager.java index b931975..9fba576 100644 --- a/src/main/java/org/cloudfoundry/security/FileWatchingX509ExtendedKeyManager.java +++ b/src/main/java/org/cloudfoundry/security/FileWatchingX509ExtendedKeyManager.java @@ -55,7 +55,8 @@ final class FileWatchingX509ExtendedKeyManager extends X509ExtendedKeyManager { this.keyManagerFactory = keyManagerFactory; new FileWatcher(this.certificates, new FileWatcherCallback()).watch(); - new FileWatcher(this.privateKey, new FileWatcherCallback()).watch(); + // disable watching the key file to prevent race condition bug - a certificate file change covers the key change + // new FileWatcher(this.privateKey, new FileWatcherCallback()).watch(); if (this.keyManager.compareAndSet(null, getKeyManager(getKeyStore()))) { this.logger.info(String.format("Initialized KeyManager for %s and %s", this.privateKey, this.certificates)); From 8117fa264727de9688db6539158d445918f3a472 Mon Sep 17 00:00:00 2001 From: David O'Sullivan Date: Thu, 6 Apr 2023 11:20:51 +0100 Subject: [PATCH 2/2] v1.21.0.BUILD-SNAPSHOT Development --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2b3a122..52be72b 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ java-buildpack-container-security-provider Cloud Foundry Container Security Provider Utility that watches for changes to container identity and trust stores - 1.20.0.BUILD-SNAPSHOT + 1.21.0.BUILD-SNAPSHOT jar https://github.com/cloudfoundry/java-buildpack-container-security-provider