Skip to content

Redact SASL response from Connection Start-Ok trace logging - #94

Merged
flamble merged 1 commit into
bloomberg:mainfrom
flamble:redact-response
Aug 28, 2026
Merged

Redact SASL response from Connection Start-Ok trace logging#94
flamble merged 1 commit into
bloomberg:mainfrom
flamble:redact-response

Conversation

@flamble

@flamble flamble commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

ConnectionStartOk::operator<< serialized the SASL response field. This can contain credentials which should never be logged. Redact it.

The response is opaque, mechanism-defined data, so it is redacted unconditionally. properties, mechanism and locale are unchanged, and the response() accessor is untouched.

Add coverage:

  • rmqamqpt: operator<< emits response:<REDACTED>, not the response
  • rmqamqp: a mocked handshake captures logs and asserts no credentials

`ConnectionStartOk::operator<<` serialized the SASL `response` field. This
can contain credentials which should never be logged. Redact it.

The `response` is opaque, mechanism-defined data, so it is redacted
unconditionally. `properties`, `mechanism` and `locale` are unchanged, and
the `response()` accessor is untouched.

Add coverage:
- `rmqamqpt`: `operator<<` emits `response:<REDACTED>`, not the response
- `rmqamqp`: a mocked handshake captures logs and asserts no credentials
@flamble
flamble requested a review from a team August 28, 2026 09:14
@flamble
flamble merged commit a6c9432 into bloomberg:main Aug 28, 2026
4 checks passed
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