Skip to content

Improve Secret redaction for config File Logging#7560

Merged
tkalvas merged 1 commit intoopentripplanner:dev-2.xfrom
HBTGmbH:improve-secret-redaction
May 5, 2026
Merged

Improve Secret redaction for config File Logging#7560
tkalvas merged 1 commit intoopentripplanner:dev-2.xfrom
HBTGmbH:improve-secret-redaction

Conversation

@MaxGosau
Copy link
Copy Markdown
Contributor

Summary

Some Secrets in config files were not redacted during logging, this PR aims to fix this.

Issue

Some Secrets in config files were not redacted during logging, this had 2 causes:

  1. password was not included in the REDACT_KEYS List but used in the updaterconfig for SIRI-ET via MQTT
  2. JsonArrays were completely ignored during the recursive search for redactable keys, but JsonArrays are used for configuring the updaters.

I have fixed both issues.

Unit tests

  • extracted the redaction Logic to its own class ConfigFileRedactor for better Testability
  • wrote some unit tests for this new Class in ConfigFileRedactorTest

Documentation

Not needed for bugfix

@MaxGosau MaxGosau requested a review from a team as a code owner April 24, 2026 13:22
@MaxGosau MaxGosau added the !Bug Apply to issues describing a bug and PRs witch fixes it. label Apr 24, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.41%. Comparing base (e4b3259) to head (4f43431).
⚠️ Report is 2 commits behind head on dev-2.x.

Additional details and impacted files
@@            Coverage Diff             @@
##             dev-2.x    #7560   +/-   ##
==========================================
  Coverage      72.41%   72.41%           
- Complexity     21183    21187    +4     
==========================================
  Files           2366     2367    +1     
  Lines          86237    86241    +4     
  Branches        8490     8492    +2     
==========================================
+ Hits           62446    62451    +5     
+ Misses         20795    20794    -1     
  Partials        2996     2996           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…ass and handle `JsonArrays` during redaction
@optionsome optionsome requested a review from tkalvas April 30, 2026 13:30
@tkalvas tkalvas added this pull request to the merge queue May 5, 2026
Merged via the queue into opentripplanner:dev-2.x with commit 4041a06 May 5, 2026
8 checks passed
t2gran pushed a commit that referenced this pull request May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

!Bug Apply to issues describing a bug and PRs witch fixes it.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants