Skip to content

Commit

Permalink
Remove apiKey and ssh key logs
Browse files Browse the repository at this point in the history
  • Loading branch information
hisener committed Aug 22, 2017
1 parent 4db706f commit f158a6d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
13 changes: 0 additions & 13 deletions src/main/java/com/opsgenie/tools/backup/ExportMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ public static void main(String[] args) throws Exception {
logger.info("Export directory path: " + backupPath);
properties.setPath(backupPath);

logger.info("The api key:" + apiKey);
properties.setApiKey(apiKey);

logger.info("Opsgenie host: " + opsGenieHost);
Expand All @@ -52,7 +51,6 @@ public static void main(String[] args) throws Exception {
logger.info("The SSH key path: " + sshKeyPath);
properties.setSshKeyPath(sshKeyPath);

logSecretKey("SSH key passphrase", sshPassphrase);
properties.setPassphrase(sshPassphrase);
}

Expand All @@ -71,16 +69,5 @@ public static void main(String[] args) throws Exception {
exporter.export();

logger.info("Finished");

}

private static void logSecretKey(String propName, String secretKey) {
if (secretKey != null) {
String criptedKey = secretKey.substring(0, secretKey.length() / 2);
for (int i = criptedKey.length(); i < secretKey.length(); i++) {
criptedKey += "*";
}
logger.info("The " + propName + " is = " + criptedKey);
}
}
}
12 changes: 0 additions & 12 deletions src/main/java/com/opsgenie/tools/backup/ImportMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ public static void main(String[] args) throws Exception {
logger.info("Import directory path: " + backupPath);
properties.setPath(backupPath);

logger.info("Api Key: " + apiKey);
properties.setApiKey(apiKey);

logger.info("Opsgenie host: " + opsGenieHost);
Expand All @@ -59,7 +58,6 @@ public static void main(String[] args) throws Exception {
logger.info("Restore from git is enabled.");
logger.info("Git ssh url:" + sshUrl);
logger.info("Ssh key path: " + sshKeyPath);
logSecretKey("Ssh key passphrase: ", sshPassphrase);
}

final ApiClient defaultApiClient = Configuration.getDefaultApiClient();
Expand Down Expand Up @@ -90,16 +88,6 @@ public static void main(String[] args) throws Exception {

}

private static void logSecretKey(String propName, String secretKey) {
if (secretKey != null) {
String criptedKey = secretKey.substring(0, secretKey.length() / 2);
for (int i = criptedKey.length(); i < secretKey.length(); i++) {
criptedKey += "*";
}
logger.info("The " + propName + " is = " + criptedKey);
}
}

public static ImportConfig extractRestoreConfig() throws IOException {
File configFile = new File("restoreConfig.properties");
Properties props = null;
Expand Down

0 comments on commit f158a6d

Please sign in to comment.