Skip to content

PYR1-1569 Redact private log keys whatever the body or the spelling - #158

Merged
lambdatronic merged 1 commit into
mainfrom
sif/pyr1-1569-response-log-guard
Aug 20, 2026
Merged

PYR1-1569 Redact private log keys whatever the body or the spelling#158
lambdatronic merged 1 commit into
mainfrom
sif/pyr1-1569-response-log-guard

Conversation

@sifbiri

@sifbiri sifbiri commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Purpose

wrap-response-logging dissocs configured keys from the logged body. If the
body isn't a map, dissoc throws and wrap-exceptions turns that into a 500,
and :private-response-keys is #{} 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 docs output, not hand-written. Most of its diff
is 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

  • Code passes linter rules (clj-kondo --lint src)

@lambdatronic
lambdatronic merged commit bcc3d2c into main Aug 20, 2026
2 checks passed
@lambdatronic
lambdatronic deleted the sif/pyr1-1569-response-log-guard branch August 20, 2026 08:52
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.

2 participants