Use array-map-processor to map DNS answers to ocsf.answers#24550
Draft
jbfeldman-dd wants to merge 1 commit into
Draft
Use array-map-processor to map DNS answers to ocsf.answers#24550jbfeldman-dd wants to merge 1 commit into
jbfeldman-dd wants to merge 1 commit into
Conversation
Convert the DNS Activity [4003] OCSF sub-pipelines to populate ocsf.answers with an array-map-processor for log sources whose raw DNS answers are in array format: - bluecat_integrity: map responseData.answers (array of objects) and add the ocsf.answers self-map in the schema-processor - zeek: replace the string-builder/grok/array-append workaround (which only captured the first answer) with an array-map over the answers array of IP strings Test outputs regenerated with the OCSF validator CLI. Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
Validation ReportAll 21 validations passed. Show details
|
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 PR do?
Converts the DNS Activity [4003] OCSF sub-pipelines to populate
ocsf.answersusing anarray-map-processor, for log sources whose raw DNS answers are in array format:responseData.answers(array of objects:recordType,rData,class,ttl) intoocsf.answers, and adds the requiredocsf.answersself-map in theschema-processor. Previouslyocsf.answerswas not populated.string-builder+grok+array-processorappend workaround (which only captured the first answer) with anarray-map-processorover theanswersarray of IP strings, so all answers are mapped.Motivation
The DNS OCSF class exposes
answersas an array. Usingarray-map-processormaps the raw answers array element-by-element into a proper array of OCSFdns_answerobjects, which is more correct than the prior single-object/first-answer workarounds.Note: the OCSF validator CLI does not yet execute
array-map-processor(it logs a no-op), so the regenerated test outputs do not includeocsf.answers. The mapping is exercised by the real backend; the test outputs here match exactly what the validator CLI produces.