DaanHoogland commented on code in PR #10811: URL: https://github.com/apache/cloudstack/pull/10811#discussion_r2073018193
########## services/secondary-storage/server/src/main/java/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java: ########## @@ -283,7 +283,17 @@ public static String retrieveNfsVersionFromParams(Map<String, Object> params) { @Override public Answer executeRequest(Command cmd) { - logger.debug(LogUtils.logGsonWithoutException("Executing command %s [%s].", cmd.getClass().getSimpleName(), cmd)); + if (cmd instanceof DownloadCommand) { + DownloadCommand safeCmd = new DownloadCommand((DownloadCommand) cmd); + DataStoreTO store = safeCmd.getDataStore(); + if (store instanceof S3TO) { + ((S3TO) store).setAccessKey("***REDACTED***"); + ((S3TO) store).setSecretKey("***REDACTED***"); + } + logger.debug(LogUtils.logGsonWithoutException("Executing command %s [%s].", safeCmd.getClass().getSimpleName(), safeCmd)); Review Comment: code looks good, but it seems this should be in LogUtils. There is other obfuscation code also scattered across the code base, so definately not a 👎 but a mere suggestion. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org