Enrich audit events with server information #48475
Open
+881
−826
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.
Subsystem events did not include ServerMetadata, which results in any events generated for agentless hosts to contain limited information. For example, any sftp subsystem requests made in response to tsh scp for agentless nodes provided information about the proxy forwarding the requests, but no information about the target host.
Additionally, the way ServerMetadata information was being populated by using the ServerContext overrode only a subset of the information that was available. This lead to SessionData events emitted when an sftp operation was completed not populating any relevant information about agentless nodes either. To avoid this going forward, the GetServerMetadata receiver has been removed from ServerContext and instead the TargetMetadata must be used from the appropriate SSH server, which already populates the relevant information without omitting any.
Events prior to this change
Events with this change
Changelog: Ensure that agentless server information is provided in all audit events