Skip to content

carbon_black_cloud: fix handling of source.address to be dependent on direction - #11622

Merged
efd6 merged 1 commit into
elastic:mainfrom
efd6:11616-carbon_black_cloud
Nov 5, 2024
Merged

carbon_black_cloud: fix handling of source.address to be dependent on direction#11622
efd6 merged 1 commit into
elastic:mainfrom
efd6:11616-carbon_black_cloud

Conversation

@efd6

@efd6 efd6 commented Nov 3, 2024

Copy link
Copy Markdown
Contributor

Proposed commit message

The netconn_domain is the DNS domain of the remote end of the
connection, which means that it should be assigned to either
source.domain or destination.domain depending on the value of
netconn_inbound. The documentation indicates that it is a domain
so we do not check whether it is an IP for assigning to the
corresponding .ip field. The *.address field is left empty.

ref:https://developer.carbonblack.com/reference/carbon-black-cloud/data-forwarder/schema/deprecated/endpoint.event-1.0.0/

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.
  • I have verified that any added dashboard complies with Kibana's Dashboard good practices

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Screenshots

@efd6 efd6 added Integration:carbon_black_cloud VMware Carbon Black Cloud bugfix Pull request that fixes a bug issue Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations] labels Nov 3, 2024
@efd6 efd6 self-assigned this Nov 3, 2024
@efd6
efd6 force-pushed the 11616-carbon_black_cloud branch from 882e089 to 12be55e Compare November 3, 2024 21:50
@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

@efd6
efd6 marked this pull request as ready for review November 3, 2024 23:13
@efd6
efd6 requested a review from a team as a code owner November 3, 2024 23:13
@elasticmachine

Copy link
Copy Markdown

Pinging @elastic/security-service-integrations (Team:Security-Service Integrations)

… direction

The netconn_domain is the DNS domain of the remote end of the
connection, which means that it should be assigned to either
source.domain or destination.domain depending on the value of
netconn_inbound. The documentation indicates that it is a domain
so we do not check whether it is an IP for assigning to the
corresponding .ip field. The *.address field is left empty.

ref:https://developer.carbonblack.com/reference/carbon-black-cloud/data-forwarder/schema/deprecated/endpoint.event-1.0.0/
@efd6
efd6 force-pushed the 11616-carbon_black_cloud branch from 12be55e to f8c5d53 Compare November 5, 2024 03:07
@elasticmachine

Copy link
Copy Markdown

💚 Build Succeeded

History

  • 💚 Build #17838 succeeded 12be55edb2ba366cb05e4680876a85bbb8980a7a

cc @efd6

@efd6
efd6 enabled auto-merge (squash) November 5, 2024 08:05
@efd6

efd6 commented Nov 5, 2024

Copy link
Copy Markdown
Contributor Author

Note

AUTOMERGE ENABLED: IF YOU NEED CHANGES DO NOT APPROVE

@kcreddy kcreddy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

Comment on lines 183 to +187
ctx.source.ip = ctx.json?.local_ip;
ctx.source.port = ctx.json?.local_port;
ctx.destination.ip = ctx.json?.remote_ip;
ctx.destination.port = ctx.json?.remote_port;
ctx.destination.domain = ctx.json?.netconn_domain;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Irrelevant to this PR, but instead of performing null-checks in every line, ctx.json?., the script processor could have global null-check

@efd6
efd6 merged commit 312c27c into elastic:main Nov 5, 2024
@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

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

harnish-crest-data pushed a commit to chavdaharnish/integrations that referenced this pull request Feb 4, 2025
… direction (elastic#11622)

The netconn_domain is the DNS domain of the remote end of the
connection, which means that it should be assigned to either
source.domain or destination.domain depending on the value of
netconn_inbound. The documentation indicates that it is a domain
so we do not check whether it is an IP for assigning to the
corresponding .ip field. The *.address field is left empty.

ref:https://developer.carbonblack.com/reference/carbon-black-cloud/data-forwarder/schema/deprecated/endpoint.event-1.0.0/
harnish-crest-data pushed a commit to chavdaharnish/integrations that referenced this pull request Feb 5, 2025
… direction (elastic#11622)

The netconn_domain is the DNS domain of the remote end of the
connection, which means that it should be assigned to either
source.domain or destination.domain depending on the value of
netconn_inbound. The documentation indicates that it is a domain
so we do not check whether it is an IP for assigning to the
corresponding .ip field. The *.address field is left empty.

ref:https://developer.carbonblack.com/reference/carbon-black-cloud/data-forwarder/schema/deprecated/endpoint.event-1.0.0/
@efd6
efd6 deleted the 11616-carbon_black_cloud branch February 5, 2025 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Pull request that fixes a bug issue Integration:carbon_black_cloud VMware Carbon Black Cloud Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations]

3 participants