Skip to content

Add acceptance test to verify audit behavior for control messages #7343

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 10, 2025

Conversation

andreasohlund
Copy link
Member

This confirms that control messages are audited

@danielmarbach
Copy link
Contributor

@andreasohlund When I said I think they are not, I was thinking about this code

// We need this check to be compatible with v3.3 endpoints, v3.3 control messages also include a body
if (IsControlMessage(physicalMessage))
{
log.Debug("Received a control message. Skipping deserialization as control message data is contained in the header.");
return Array.Empty<LogicalMessage>();
}
if (physicalMessage.Body.Length == 0)
{
log.Debug("Received a message without body. Skipping deserialization.");
return Array.Empty<LogicalMessage>();
}

but I guess I was wrongly assuming the audit context happens later which is incorrect as I now see

var processedMessage = new OutgoingMessage(context.Message.MessageId, new Dictionary<string, string>(context.Message.Headers), context.Message.Body);

@andreasohlund andreasohlund merged commit 16de1f5 into master Jun 10, 2025
4 checks passed
@andreasohlund andreasohlund deleted the audit-control-messages branch June 10, 2025 10:47
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