From 9002e8f1ea57124ad9a6b85d7593f73f9c9723ca Mon Sep 17 00:00:00 2001 From: Lars Hagen Date: Fri, 18 Aug 2023 08:16:21 +0200 Subject: [PATCH 1/2] clear system property for credentials for file paths jclouds will override the passed in credentials if the system property is present --- src/main/java/org/gaul/s3proxy/Main.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/org/gaul/s3proxy/Main.java b/src/main/java/org/gaul/s3proxy/Main.java index 59eb357f..2f2fa520 100644 --- a/src/main/java/org/gaul/s3proxy/Main.java +++ b/src/main/java/org/gaul/s3proxy/Main.java @@ -325,6 +325,9 @@ private static BlobStore createBlobStore(Properties properties, StandardCharsets.UTF_8).read(); } properties.remove(Constants.PROPERTY_CREDENTIAL); + // We also need to clear the system property, otherwise the + // credential will overridden by the system property. + System.clearProperty(Constants.PROPERTY_CREDENTIAL); } if (identity == null || credential == null) { From 992a33584a49b3694d7f1d857fe4b761b09f0d00 Mon Sep 17 00:00:00 2001 From: Lars Hagen Date: Fri, 18 Aug 2023 08:20:34 +0200 Subject: [PATCH 2/2] fix typo --- src/main/java/org/gaul/s3proxy/Main.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/gaul/s3proxy/Main.java b/src/main/java/org/gaul/s3proxy/Main.java index 2f2fa520..74f268db 100644 --- a/src/main/java/org/gaul/s3proxy/Main.java +++ b/src/main/java/org/gaul/s3proxy/Main.java @@ -326,7 +326,7 @@ private static BlobStore createBlobStore(Properties properties, } properties.remove(Constants.PROPERTY_CREDENTIAL); // We also need to clear the system property, otherwise the - // credential will overridden by the system property. + // credential will be overridden by the system property. System.clearProperty(Constants.PROPERTY_CREDENTIAL); }