Skip to content

Infoblox_nios: add client geoip and registered_domain processors to dns data #8107

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 11 commits into from
Oct 15, 2023

Conversation

philippkahr
Copy link
Contributor

@philippkahr philippkahr commented Oct 5, 2023

When looking at the differences between the infoblox NIOS DNS dataset and our network_packet_capture dataset I discovered that we are not using dns.flags to print out the DNS flags such as:

- = recursion not available
+ = recursion available (from DNS message header)
A = authoritative answer (from DNS message header)
t = truncated response (from DNS message header)
E = EDNS OPT record present (from DNS message header)
D = DNSSEC OK (from EDNS OPT RR)
V = responding server has validated DNSSEC records
L = response contains DTC synthetic record

Taken from: Infoblox DNS

This is an example taken from our network packet capture dns dataset:

"dns": {
      "response_code": "NOERROR",
      "resolved_ip": [
        "34.107.117.83"
      ],
      "question": {
        "registered_domain": "es.io",
        "top_level_domain": "io",
        "etld_plus_one": "es.io",
        "name": "00d0ca5813b840dca7cee7ecebd65591.europe-west3.gcp.cloud.es.io",
        "subdomain": "00d0ca5813b840dca7cee7ecebd65591.europe-west3.gcp.cloud",
        "type": "A",
        "class": "IN"
      },
      "flags": {
        "authoritative": false,
        "truncated_response": false,
        "recursion_desired": true,
        "recursion_available": true,
        "checking_disabled": false,
        "authentic_data": false
      },

I added the following:

  • couple of set processors to add the flags
  • registered domain processor to parse out the subdomain, top_level and so on.
  • Added geoIP processing for client.ip.

I am not sure about the version bump, if this should become 1.17.0 or 2.0.0.

Proposed commit message

This adds a geoip processor for the client.ip field and a registered_domain processor for the dns.question.name field.

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.

@philippkahr philippkahr added the enhancement New feature or request label Oct 5, 2023
@philippkahr philippkahr requested a review from a team as a code owner October 5, 2023 15:29
@elasticmachine
Copy link

elasticmachine commented Oct 5, 2023

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-10-11T08:16:53.335+0000

  • Duration: 18 min 30 sec

Test stats 🧪

Test Results
Failed 0
Passed 21
Skipped 0
Total 21

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@elasticmachine
Copy link

elasticmachine commented Oct 5, 2023

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (1/1) 💚
Files 100.0% (4/4) 💚 3.346
Classes 100.0% (4/4) 💚 3.346
Methods 100.0% (39/39) 💚 7.443
Lines 93.842% (640/682) 👍 5.434
Conditionals 100.0% (0/0) 💚

philippkahr and others added 3 commits October 6, 2023 09:54
…peline/default.yml

Co-authored-by: Dan Kortschak <90160302+efd6@users.noreply.github.com>
…peline/default.yml

Co-authored-by: Dan Kortschak <90160302+efd6@users.noreply.github.com>
…peline/pipeline_dns.yml

Co-authored-by: Dan Kortschak <90160302+efd6@users.noreply.github.com>
@philippkahr
Copy link
Contributor Author

@efd6 did remove the non ecs conforming fields. Does the rest look good?

@efd6
Copy link
Contributor

efd6 commented Oct 12, 2023

Is there a reason not to include the flags as the ECS-compliant field?

@philippkahr
Copy link
Contributor Author

The dns.header_flags are already set here:

@efd6
Copy link
Contributor

efd6 commented Oct 12, 2023

🤦
Thanks. I will take a look in the morning.

@efd6 efd6 changed the title Infoblox NIOS DNS dataset Infoblox NIOS: add geoip and registered domain processors to DNS ingestion Oct 12, 2023
Copy link
Contributor

@efd6 efd6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the proposed commit message to match the current state of the change. Otherwise LGTM.

@philippkahr
Copy link
Contributor Author

Can you take care of it please? I am out on PTO for another full week :)

@elasticmachine
Copy link

Pinging @elastic/security-external-integrations (Team:Security-External Integrations)

@efd6 efd6 changed the title Infoblox NIOS: add geoip and registered domain processors to DNS ingestion Infoblox_nios: add client geoip and registered_domain processors to dns data Oct 15, 2023
@efd6 efd6 merged commit 093cf15 into elastic:main Oct 15, 2023
@elasticmachine
Copy link

Package infoblox_nios - 1.17.0 containing this change is available at https://epr.elastic.co/search?package=infoblox_nios

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Integration:infoblox_nios Infoblox NIOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants