Skip to content

GH-653: Fix sensitive data logging, etc#497

Merged
Klaas-Ritense merged 2 commits into
next-minorfrom
fix/653-inbox-sse-logging-null-safety
Mar 26, 2026
Merged

GH-653: Fix sensitive data logging, etc#497
Klaas-Ritense merged 2 commits into
next-minorfrom
fix/653-inbox-sse-logging-null-safety

Conversation

@Klaas-Ritense

Copy link
Copy Markdown
Member

generiekzaakafhandelcomponent/gzac-issues#653

  • Downgrade inbox message logging from INFO to DEBUG and remove payload from log output
  • Add WARN-level error logging to ValtimoCloudEventMapper catch blocks (without sensitive data)
  • Replace resultId!! with null-safe check in DocumentSseEventMapper to prevent NPE
  • Return null instead of empty string for missing caseDefinitionVersionTag in ConfigurationIssueSseEventMapper

Klaas-Ritense and others added 2 commits March 26, 2026 09:09
…y in inbox & SSE mappers

- Downgrade inbox message logging from INFO to DEBUG without payload
- Add WARN-level logging to ValtimoCloudEventMapper catch blocks
- Replace non-null assertion with null-safe check in DocumentSseEventMapper
- Return null instead of empty string for missing caseDefinitionVersionTag

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… in RabbitMessagePublisher

- Fix debug log that printed exchange instead of routingKey
- Replace non-null assertion with proper null handling for confirmation result
- Use idiomatic ?.let for returned message check
- Remove stray escaped quotes from exception messages

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Klaas-Ritense Klaas-Ritense requested review from a team as code owners March 26, 2026 09:05
@coderabbitai

coderabbitai Bot commented Mar 26, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes

    • Improved null-safety handling in event mapping to prevent silent failures and ensure required fields are properly validated.
    • Enhanced error logging and diagnostics for message publishing and event deserialization failures.
    • Reduced sensitive data exposure by adjusting logging levels for inbox message handling.
  • Tests

    • Expanded test coverage for null-value scenarios in event mapping.

Walkthrough

This pull request improves null-safety and error handling across multiple components. Event mappers now treat previously defaulted fields (like caseDefinitionVersionTag and resultId) as required, returning null when they are missing instead of applying fallback values. Exception handling paths in cloud event mapping and message publishing have been enhanced with explicit logging. A logging level adjustment reduces verbosity in inbox message handling. These changes address null-safety issues in SSE event mappers, prevent silent exception swallowing during cloud event mapping, and eliminate sensitive data logging. Release notes were updated to document these fixes.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/653-inbox-sse-logging-null-safety

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
backend/outbox/outbox-rabbitmq/src/main/kotlin/com/ritense/outbox/rabbitmq/RabbitMessagePublisher.kt (1)

65-66: Disambiguate duplicate routingKey fields in the exception message.

Line 66 includes two routingKey= entries (returned.routingKey and configured routingKey), which can confuse troubleshooting. Consider distinct labels (returnedRoutingKey / configuredRoutingKey).


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b091b349-d206-4a42-b7d1-754e737666a4

📥 Commits

Reviewing files that changed from the base of the PR and between 6c0d9bc and d4b2259.

📒 Files selected for processing (8)
  • backend/case/src/main/kotlin/com/ritense/case/mapper/ConfigurationIssueSseEventMapper.kt
  • backend/case/src/main/kotlin/com/ritense/document/mapper/DocumentSseEventMapper.kt
  • backend/case/src/test/kotlin/com/ritense/case/mapper/ConfigurationIssueSseEventMapperTest.kt
  • backend/case/src/test/kotlin/com/ritense/document/mapper/DocumentSseEventMapperTest.kt
  • backend/inbox/src/main/kotlin/com/ritense/inbox/InboxHandlingService.kt
  • backend/inbox/src/main/kotlin/com/ritense/inbox/ValtimoCloudEventMapper.kt
  • backend/outbox/outbox-rabbitmq/src/main/kotlin/com/ritense/outbox/rabbitmq/RabbitMessagePublisher.kt
  • documentation/release-notes/13.x.x/13.22.0/README.md

@marijnritense marijnritense added the NTN No testing needed label Mar 26, 2026
@Klaas-Ritense Klaas-Ritense merged commit f16a194 into next-minor Mar 26, 2026
160 of 162 checks passed
@Klaas-Ritense Klaas-Ritense deleted the fix/653-inbox-sse-logging-null-safety branch March 26, 2026 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

NTN No testing needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants