Skip to content

Commit

Permalink
Merge pull request #417 from NASA-PDS/387-log-cleanup-keys
Browse files Browse the repository at this point in the history
387 log security cleanup
  • Loading branch information
jordanpadams committed Mar 6, 2024
2 parents 6c13793 + 8a6b344 commit 07dadb2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public DefaultKeyValue<String, String> getSecret(String secretName, String regio
region = REGISTRY_DEFAULT_AWS_REGION;
}

log.debug(String.format("Looking up secret %s in region %s", secretName, region));
log.debug(String.format("Looking up secret in non-default region %s", region));

// Create a Secrets Manager client
AWSSecretsManager client = AWSSecretsManagerClientBuilder.standard().withRegion(region).build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ public int getTimeOutSeconds() {
return timeOutSeconds;
}


public boolean getCCSEnabled() {
return CCSEnabled;
}

public boolean isSsl() {
return ssl;
}
Expand Down Expand Up @@ -123,7 +123,6 @@ public void trySetESCredsFromEnv() {

this.username = esCreds.getKey();
this.password = esCreds.getValue();
log.debug(String.format("ES Username from environment : [%s]", this.username));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,13 @@ static DefaultKeyValue<String, String> testGetSecret(String secretName) {
return result;
}

public static final void main(String args[]) {
public static void main(String[] args) {
for (String secretName : args) {
DefaultKeyValue<String, String> secret = testGetSecret(secretName);
if (secret != null) {
log.info(String.format("Secret name : %s, Secret Id : %s / Secret Value : %s", secretName,
secret.getKey(), secret.getValue()));
log.info("Successfully retrieved secret.");
} else {
log.error(String.format("Lookup for secrete %s returned null.", secretName));
log.error("Lookup for secret returned null.");
}
}
}
Expand Down

0 comments on commit 07dadb2

Please sign in to comment.