Skip to content

Commit

Permalink
Java Client - Prevent printing authentication data in INFO logs. (apa…
Browse files Browse the repository at this point in the history
…che#3377)

### Motivation

Currently, we print auth data in info logs - roleToken, private key info etc.

### Modifications

Print ClientConfiguration without authentication field.

### Result

We will no longer print sensitive info.
  • Loading branch information
Jai Asher authored and sijie committed Jan 17, 2019
1 parent 757c3f9 commit d1b8f94
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ private void init(ConsumerConfigurationData<?> conf) {

try {
log.info("Starting Pulsar consumer perf with config: {}", w.writeValueAsString(conf));
log.info("Pulsar client config: {}", w.writeValueAsString(pulsarClient.getConfiguration()));
log.info("Pulsar client config: {}", w.withoutAttribute("authentication").writeValueAsString(pulsarClient.getConfiguration()));
} catch (IOException e) {
log.error("Failed to dump config info: {}", e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ private void init(ProducerConfigurationData conf) {

try {
log.info("Starting Pulsar producer perf with config: {}", w.writeValueAsString(conf));
log.info("Pulsar client config: {}", w.writeValueAsString(pulsarClient.getConfiguration()));
log.info("Pulsar client config: {}", w.withoutAttribute("authentication").writeValueAsString(pulsarClient.getConfiguration()));
} catch (IOException e) {
log.error("Failed to dump config info: {}", e);
}
Expand Down

0 comments on commit d1b8f94

Please sign in to comment.