Skip to content

[Carbon Black Cloud] - Added alerts v7 data stream and CEL input type - #9467

Merged
ShourieG merged 36 commits into
elastic:mainfrom
ShourieG:cbc/refactor
Apr 12, 2024
Merged

[Carbon Black Cloud] - Added alerts v7 data stream and CEL input type#9467
ShourieG merged 36 commits into
elastic:mainfrom
ShourieG:cbc/refactor

Conversation

@ShourieG

@ShourieG ShourieG commented Mar 28, 2024

Copy link
Copy Markdown
Contributor

Type of change

  • Enhancement

Proposed commit message

Added a new alerts_v7 data stream to mirror the v7 api and schema changes from carbon black cloud.
The old data stream has not been removed in order to allow smooth transition to the new v7 data stream once the old api stops working. This avoids a breaking change. In addition to this a new CEL input option has been introduced to bring more flexibility for the future. This new input has been tagged as [Beta] while the existing HTTPJSON input has been tagged as [Legacy]. This was done in order to smoothen the transition overtime and avoid breaking changes.

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.

Author's Checklist

  1. New alert v7 data stream added with tests.
  2. Alert v7 Dashboards & Search added.
  3. Documentation updated.
  4. Added new [Beta] CEL input type for HTTP api dependant data streams. (alert_v7, asset_vulnerability_summary, audit)

Note

  1. The existing HTTPJSON input is being marked as [Legacy] with the introduction of the CEL input.
  2. Please ignore commits before March 26th. Start from (initial commit, new v7 data stream under construction (ignore for review)

How to test this PR locally

Clone integrations repo.
Install the elastic package locally.
Start the elastic stack using the elastic package stack up command.
Move to integrations/packages/carbon_black_cloud directory.
Run the following command to run tests.

  1. elastic-package build && elastic-package format && elastic-package lint && elastic-package check && elastic-package build
  2. elastic-package stack up -v -d --services package-registry
  3. Bind the shell using the command - eval "$(elastic-package stack shellinit)" or eval $(elastic-package stack shellinit --shell bash) on mac m1
  4. Use the command - elastic-package test -v to test

Related issues

Test Results

--- Test results for package: carbon_black_cloud - START ---
╭────────────────────┬─────────────────────────────┬───────────┬───────────┬────────┬───────────────╮
│ PACKAGE            │ DATA STREAM                 │ TEST TYPE │ TEST NAME │ RESULT │  TIME ELAPSED │
├────────────────────┼─────────────────────────────┼───────────┼───────────┼────────┼───────────────┤
│ carbon_black_cloud │ alert                       │ system    │ default   │ PASS   │    32.715904s │
│ carbon_black_cloud │ alert_v7                    │ system    │ httpjson  │ PASS   │ 30.962756791s │
│ carbon_black_cloud │ alert_v7                    │ system    │ cel       │ PASS   │ 32.664833208s │
│ carbon_black_cloud │ asset_vulnerability_summary │ system    │ httpjson  │ PASS   │ 28.750989958s │
│ carbon_black_cloud │ asset_vulnerability_summary │ system    │ cel       │ PASS   │ 31.468396708s │
│ carbon_black_cloud │ audit                       │ system    │ httpjson  │ PASS   │ 32.579871041s │
│ carbon_black_cloud │ audit                       │ system    │ cel       │ PASS   │ 31.452701917s │
╰────────────────────┴─────────────────────────────┴───────────┴───────────┴────────┴───────────────╯
--- Test results for package: carbon_black_cloud - END   ---

Screenshots

Add here screenshots presenting:

  • Kibana UI forms presenting configuration options exposed by the integration:
Screenshot 2024-04-05 at 9 10 58 PM
  • Dashboards with collected metrics or logs:

    Alerts V7 (Samples):

alerts_v7_1 alerts_v7_2 alerts_v7_3 alerts_v7_4

Asset Vulnerability:

asset_vulnerability

Audit Logs:

audit_logs
@ShourieG ShourieG self-assigned this Mar 28, 2024
@ShourieG ShourieG added integration Label used for meta issues tracking each integration 8.14 candidate Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations] Team:Security-External Integrations Label for the Security External Integrations team enhancement New feature or request labels Mar 28, 2024
@ShourieG
ShourieG marked this pull request as ready for review April 5, 2024 15:55
@ShourieG
ShourieG requested a review from a team as a code owner April 5, 2024 15:55
@elasticmachine

Copy link
Copy Markdown

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

@ShourieG
ShourieG requested review from efd6 and kcreddy April 5, 2024 15:55
@ShourieG ShourieG changed the title [Carbon Black Cloud] - Added alerts v7 data stream to mirror v7 api and schema changes Apr 5, 2024
Comment thread packages/carbon_black_cloud/_dev/build/docs/README.md Outdated
Comment thread packages/carbon_black_cloud/_dev/build/docs/README.md Outdated
Comment thread packages/carbon_black_cloud/_dev/build/docs/README.md Outdated
Comment thread packages/carbon_black_cloud/_dev/build/docs/README.md Outdated
Comment thread packages/carbon_black_cloud/data_stream/alert_v7/agent/stream/httpjson.yml.hbs Outdated
Comment thread packages/carbon_black_cloud/data_stream/audit/sample_event.json Outdated
Comment thread packages/carbon_black_cloud/data_stream/audit/manifest.yml Outdated
Comment thread packages/carbon_black_cloud/data_stream/alert_v7/sample_event.json Outdated
@ShourieG

ShourieG commented Apr 9, 2024

Copy link
Copy Markdown
Contributor Author

@efd6 addressed all the PR suggestions

@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.

Sorry for the late review. I saw it late that my name was tagged 😄 .

For the ones moving from httpjson to CEL, how does the upgrade process looks like in the UI, say from 1.21.3 to 2.0.0? Do they end up still using httpjson or migrate to CEL seamlessly or prompted to configure CEL input?

@ShourieG

ShourieG commented Apr 10, 2024

Copy link
Copy Markdown
Contributor Author

Sorry for the late review. I saw it late that my name was tagged 😄 .

For the ones moving from httpjson to CEL, how does the upgrade process looks like in the UI, say from 1.21.3 to 2.0.0? Do they end up still using httpjson or migrate to CEL seamlessly or prompted to configure CEL input?

@kcreddy So atm after upgrading to 2.0, httpjson is still there and if they have httpjson configured it will still stay active, CEL will be an additional input that can they will see and choose to migrate over if they wish to.

@ShourieG

Copy link
Copy Markdown
Contributor Author

@efd6 @kcreddy, addressed all the PR suggestions and updated the docs & tests accordingly.

@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 👍🏼 for my comments.

@efd6 efd6 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.

Nits then LGTM

Comment thread packages/carbon_black_cloud/_dev/build/docs/README.md Outdated
Comment thread packages/carbon_black_cloud/data_stream/alert_v7/agent/stream/cel.yml.hbs Outdated
Comment thread packages/carbon_black_cloud/data_stream/audit/manifest.yml Outdated
@elasticmachine

Copy link
Copy Markdown

💚 Build Succeeded

History

cc @ShourieG

@elastic-sonarqube

Copy link
Copy Markdown
@ShourieG
ShourieG merged commit e76a5e3 into elastic:main Apr 12, 2024
@ShourieG
ShourieG deleted the cbc/refactor branch April 12, 2024 04:07
@elasticmachine

Copy link
Copy Markdown

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

@andrewkroh andrewkroh added the Integration:carbon_black_cloud VMware Carbon Black Cloud label Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.14 candidate enhancement New feature or request Integration:carbon_black_cloud VMware Carbon Black Cloud integration Label used for meta issues tracking each integration Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations]

5 participants