PYR1-1569 Redact private log keys whatever the body or the spelling - #158
Merged
Conversation
lambdatronic
approved these changes
Aug 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
wrap-response-loggingdissocs configured keys from the logged body. If thebody isn't a map, dissoc throws and wrap-exceptions turns that into a 500,
and
:private-response-keysis#{}everywhere.Keys also had to match the shape of what was logged, and often didn't: a
keyword misses a JSON body's string keys, a string misses keywordized
params, and the spec lets a set of strings through silently.
One helper now covers both loggers - either key type, non-map bodies
skipped. No behavior change for current configs. Redaction still only
reaches the top level of a map, left alone here rather than widened.
API.md is regenerated
bb docsoutput, not hand-written. Most of its diffis catch-up for docs already stale on main, so there is nothing to review
in it.
Related Issues
Refs PYR1-1569
Testing
clj -M:test is green: 22 tests, 79 assertions.
Two new tests cover the two fixes. Take out the map? guard and the non-map body test fails. Match only one key type and the either-spelling tests fail.
Submission Checklist