Skip to content

Commit

Permalink
Clear system property for credentials for file paths
Browse files Browse the repository at this point in the history
jclouds will override the passed in credentials if the system property is present
  • Loading branch information
larshagencognite authored Sep 26, 2023
1 parent 1b33aca commit ff34735
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/org/gaul/s3proxy/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit ff34735

Please sign in to comment.