Audit log in successful connection cases - #1280
Merged
Merged
Conversation
ryanwixon-emerson
marked this pull request as ready for review
July 29, 2026 20:08
ryanwixon-emerson
requested review from
astarche,
maxxboehme and
reckenro
as code owners
July 29, 2026 20:08
ckoellin
self-requested a review
July 29, 2026 20:15
ckoellin
reviewed
Jul 30, 2026
ckoellin
left a comment
Contributor
There was a problem hiding this comment.
A few things to fix but overall looks good.
bkeryan
reviewed
Jul 30, 2026
bkeryan
reviewed
Jul 30, 2026
astarche
approved these changes
Aug 3, 2026
reckenro
approved these changes
Aug 4, 2026
maxxboehme
approved these changes
Aug 5, 2026
ckoellin
reviewed
Aug 7, 2026
ckoellin
approved these changes
Aug 10, 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.
What does this Pull Request accomplish?
This PR adds simple audit logging capabilities to
grpc-device. We're usingspdlogto log to the Windows Event Log and Syslog.gRPC includes
GlobalCallbacksfunctionality which allows us to define functions invoked at every RPC call. This allows us to easily log the existence of successfully connected clients.The current logging functionality in
grpc-deviceprovides an API to log to the terminal and a corresponding API to override this function with your own custom option. This applies for all logging. Since overriding with aspdlogAPI would affect all callers, I've instead opted to add a newlog_to_audit_sourcefunction which will always use thespdlogsync.Why should this Pull Request be merged?
Our goal is to add audit logging for the CRA. The server should log a message when clients succeed/fail when authenticating. This PR adds the required framework to make this possible and implements the success scenario.
A future PR to add functionality to log when a client fails to authenticate will follow.
What testing has been done?
I tested this in a Windows -> Windows workflow and confirmed that the audit events appear in Windows Event Log as expected. Due to the difficulty of testing other workflows, I'll wait until this is merged to check Linux workflows.