-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Tag/label data is not being added to DNSTAP output #516
Comments
It shouldn't be difficult to add. |
Good to hear! Eventually I am hoping that we can add tag data to DNSTAP outputs from dnsdist, and have that data recognized by go-dnscollector for performing matching within go-dnscollector. We already do some tagging in dnsdist, but we can re-structure the format to meet whatever method ends up being implemented by go-dnscollector. I suppose it should also be the case that tag data that is not understood should be transmitted un-modified through the processing stack unless there is some specific syntax that says "drop unparseable tag data in extra field" on the ingestion into go-dnscollector. |
This does raise the issue of how to encode this data, especially when there may be existing data already in the "extra" field from the original DNSTAP producer. Is this a process of making a giant text (json?) blob of the various other fields and inserting it into the extra field? Or is it best to have a new protobuf structure that can understand and incorporate all possible additional fields as they are defined by go-dnscollector over time? This method (new protobuf definition) seems fragile, but protobuf should be able to handle unknown fields if there is version mismatch, though it creates a condition where other DNSTAP consumers would not be able to parse the data - this would become a dnscollector-to-dnscollector only method (which may be OK!) I don't have a very strong opinion on it since I haven't thought about it enough I suppose. |
This has become a blocker for us, specifically, the minimal behavior of passing the "extra" field is necessary even if only as an extremely basic relay function. The "dnstap-relay" source identifier doesn't seem to work in the most recent versions, either. (I tried this as a workaround.) In fact, I tried using the example in https://github.com/dmachard/go-dnscollector/blob/main/docs/_examples/use-case-12.yml but that doesn't apparently work any more - it fails with "config error: unknown YAML key I see that the extra field can be minimally ingested by go-dnscollector, but it cannot be transmitted in any dnstap format that I can observe. |
Tested and seems to work, at least in the concept of purely relaying the data using "dnstap-relay" |
Thanks to report the issue for the dnstap-relay, it's fixed. |
I am working on a new dedicated protobuf structure which will be stored in the DNStap extra field. |
The pull request #548 is in progress |
feature request completed via #548 |
Describe the bug
The tagging information added to other outputs such as JSON file are not being added to DNSTAP relayed messages, or are not recognized. I'm not sure if this is a bug or just if it would be described as "a not implemented expected feature".
To Reproduce
Use configuration below to arbitrarily add tags to messages, and then relay them via DNSTAP to another go-dnscollector instance to validate that they are not being included in the messages.
Expected behavior
I would expect go-dnscollector to send and then recognize its own tagging data in DNSTAP streams, and be able to parse that data as a receiver. This would be for both customized tagging ("atags:") as well as any other fields that go-dnscollector adds during processing, such as "geoip:" and all the other fields that are dynamically or statically created by transformations.
Additional context
Running most recent version, with this simplified configuration (below.) The output file shows the tag "foo:DMARC" as being added in the JSON summaries. I ran another go-dnscollector instance on port 59311 to receive the relayed DNSTAP stream with a very simple single output to JSON, and the tags did not appear either as recognized fields or as data in the "extra:" field. I am fairly certain they are not being sent.
The text was updated successfully, but these errors were encountered: