From ff347352bf1088fc3423fdd20d3c26737a877497 Mon Sep 17 00:00:00 2001 From: Lars Hagen Date: Tue, 26 Sep 2023 13:37:04 +0200 Subject: [PATCH] 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..74f268db 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 be overridden by the system property. + System.clearProperty(Constants.PROPERTY_CREDENTIAL); } if (identity == null || credential == null) {