Skip to content

Conversation

@suresh-prakash
Copy link
Contributor

No description provided.

@suresh-prakash suresh-prakash requested a review from a team as a code owner August 3, 2023 12:29
@suresh-prakash suresh-prakash changed the title Redact values of some key substrings Redact values of some key substrings while logging the config Aug 3, 2023
@github-actions
Copy link

github-actions bot commented Aug 3, 2023

Test Results

31 tests  ±0   31 ✔️ ±0   8s ⏱️ -1s
  9 suites ±0     0 💤 ±0 
  9 files   ±0     0 ±0 

Results for commit ebc59dd. ± Comparison against base commit 2da3ce8.

♻️ This comment has been updated with latest results.

@codecov
Copy link

codecov bot commented Aug 3, 2023

Codecov Report

Merging #74 (ebc59dd) into main (2da3ce8) will decrease coverage by 0.06%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##               main      #74      +/-   ##
============================================
- Coverage     70.27%   70.21%   -0.06%     
  Complexity      106      106              
============================================
  Files            15       15              
  Lines           592      591       -1     
  Branches         32       32              
============================================
- Hits            416      415       -1     
  Misses          157      157              
  Partials         19       19              
Flag Coverage Δ
unit 70.21% <100.00%> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
...ceframework/config/DirectoryBasedConfigClient.java 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more


private static Logger LOGGER = LoggerFactory.getLogger(ConfigUtils.class);
private static final Logger LOGGER = LoggerFactory.getLogger(ConfigUtils.class);
private static final Set<String> SECRET_KEYS = Set.of("password", "secret");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I certainly don't want to log passwords and secrets, but I'd question why we're putting them in config files and logging them in the first place? Feel free to ping me if sensitive.

On the actual impl, rather than hardcoding these can we overload logConfFile with a method that takes keys to redact - you can route the single arg version that exists to use these two as the defaults, but that leaves consumers in control without having to modify the framework.

@suresh-prakash suresh-prakash changed the title Redact values of some key substrings while logging the config Log unresolved config instead of resolved config Aug 4, 2023
@suresh-prakash suresh-prakash merged commit 9a48be3 into main Aug 4, 2023
@suresh-prakash suresh-prakash deleted the mask_the_config_values_for_hardcoded_keys branch August 4, 2023 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants