Skip to content
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

Cherry-pick #19132 to 7.x: Disable host.* fields by default for CrowdStrike module #19297

Merged
merged 1 commit into from
Jun 26, 2020

Conversation

andrewkroh
Copy link
Member

@andrewkroh andrewkroh commented Jun 18, 2020

Cherry-pick of PR #19132 to 7.x branch. Original message:

What does this PR do?

For the CrowdStrike module when data is forwarded to Filebeat from another host/device you don't want Filebeat to add host. So by default this modules add a forwarded tag to events. If you configure the module to not include the forwarded tag (e.g. var.tags: [my_tag]) then Filebeat will add the host.* fields.

Why is it important?

We want Filebeat to follow Elastic Common Schema. And setting host with the correct value is part of that. By setting (or not setting host) we can better interpret events. Without this change the Filebeat host is being attributed as the source of Checkpoint firewall events.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • [ ] I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Related issues

For the CrowdStrike module when data is forwarded to Filebeat from another host/device you don't want Filebeat to add `host`. So by default this modules add a `forwarded` tag to events. If you configure the module to not include the `forwarded` tag (e.g. `var.tags: [my_tag]`) then Filebeat will add the `host.*` fields.

Relates: elastic#13920
(cherry picked from commit 59b133e)
@elasticmachine
Copy link
Collaborator

Pinging @elastic/siem (Team:SIEM)

@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Jun 18, 2020
@elasticmachine
Copy link
Collaborator

elasticmachine commented Jun 18, 2020

❕ Build Aborted

Either there was a build timeout or someone aborted the build.'}

Pipeline View Test View Changes Artifacts

Expand to view the summary

Build stats

  • Build Cause: [Branch indexing]

  • Start Time: 2020-06-25T22:37:11.559+0000

  • Duration: 123 min 57 sec

Test stats 🧪

Test Results
Failed 0
Passed 1091
Skipped 254
Total 1345

Log output

Expand to view the last 100 lines of log output

[2020-06-26T00:35:32.874Z]   Output File:     /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19297/src/github.com/elastic/beats/x-pack/filebeat/build/TEST-go-unit.out
[2020-06-26T00:35:32.874Z] >> go test: Unit Test Passed
[2020-06-26T00:37:09.434Z] >> python test: Unit Testing
[2020-06-26T00:37:29.528Z] .......SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
[2020-06-26T00:37:29.528Z] [success] 21.01% test_http_endpoint.Test.test_http_endpoint_get_request: 0.7572s
[2020-06-26T00:37:29.528Z] [success] 15.32% test_http_endpoint.Test.test_http_endpoint_request: 0.5520s
[2020-06-26T00:37:29.528Z] [success] 12.89% test_http_endpoint.Test.test_http_endpoint_empty_body: 0.4646s
[2020-06-26T00:37:29.529Z] [success] 12.73% test_http_endpoint.Test.test_http_endpoint_wrong_content_header: 0.4589s
[2020-06-26T00:37:29.529Z] [success] 12.72% test_http_endpoint.Test.test_http_endpoint_wrong_auth_value: 0.4585s
[2020-06-26T00:37:29.529Z] [success] 12.68% test_http_endpoint.Test.test_http_endpoint_missing_auth_value: 0.4570s
[2020-06-26T00:37:29.529Z] [success] 12.65% test_http_endpoint.Test.test_http_endpoint_malformed_json: 0.4558s
[2020-06-26T00:37:29.529Z] ----------------------------------------------------------------------
[2020-06-26T00:37:29.529Z] Ran 127 tests in 3.618s
[2020-06-26T00:37:29.529Z] 
[2020-06-26T00:37:29.529Z] OK (SKIP=120)
[2020-06-26T00:37:29.529Z] >> python test: Unit Testing Complete
[2020-06-26T00:37:37.659Z] >> Building docker images
[2020-06-26T00:37:37.659Z] elasticsearch uses an image, skipping
[2020-06-26T00:37:37.659Z] proxy_dep uses an image, skipping
[2020-06-26T00:37:37.659Z] Building beat
[2020-06-26T00:38:09.828Z] Creating network "filebeat_7_9_0_47f877f138-snapshot_default" with the default driver
[2020-06-26T00:38:09.828Z] Pulling elasticsearch (docker.elastic.co/elasticsearch/elasticsearch:7.7.0-SNAPSHOT)...
[2020-06-26T00:38:09.828Z] 7.7.0-SNAPSHOT: Pulling from elasticsearch/elasticsearch
[2020-06-26T00:38:18.005Z] Digest: sha256:9e6b5059f4adbe4867ed8a298db8411c2360b6bc986ab4ebc8d84b85dd4d6d11
[2020-06-26T00:38:18.005Z] Status: Downloaded newer image for docker.elastic.co/elasticsearch/elasticsearch:7.7.0-SNAPSHOT
[2020-06-26T00:38:18.005Z] Creating filebeat_7_9_0_47f877f138-snapshot_elasticsearch_1 ... 
[2020-06-26T00:38:43.279Z] 
Creating filebeat_7_9_0_47f877f138-snapshot_elasticsearch_1 ... done
Creating filebeat_7_9_0_47f877f138-snapshot_proxy_dep_1     ... 
[2020-06-26T00:38:43.279Z] 
Creating filebeat_7_9_0_47f877f138-snapshot_proxy_dep_1     ... done
>> go test: Integration Testing
[2020-06-26T00:39:29.267Z] Cancelling nested steps due to timeout
[2020-06-26T00:39:29.276Z] Sending interrupt signal to process
[2020-06-26T00:39:33.372Z] Sending interrupt signal to process
[2020-06-26T00:39:33.517Z] Failed in branch Filebeat x-pack Mac OS X
[2020-06-26T00:39:40.015Z] failed to run compiled magefile: signal: terminated
[2020-06-26T00:39:40.023Z] script returned exit code 255
[2020-06-26T00:39:40.218Z] Recording test results
[2020-06-26T00:39:42.036Z] Stashed 2 file(s)
[2020-06-26T00:39:42.052Z] Archiving artifacts
[2020-06-26T00:39:42.913Z] + curl -sSLo codecov https://codecov.io/bash
[2020-06-26T00:39:43.175Z] + FILE=auditbeat/build/coverage/full.cov
[2020-06-26T00:39:43.175Z] + [ -f auditbeat/build/coverage/full.cov ]
[2020-06-26T00:39:43.175Z] + FILE=filebeat/build/coverage/full.cov
[2020-06-26T00:39:43.175Z] + [ -f filebeat/build/coverage/full.cov ]
[2020-06-26T00:39:43.175Z] + FILE=heartbeat/build/coverage/full.cov
[2020-06-26T00:39:43.175Z] + [ -f heartbeat/build/coverage/full.cov ]
[2020-06-26T00:39:43.175Z] + FILE=libbeat/build/coverage/full.cov
[2020-06-26T00:39:43.175Z] + [ -f libbeat/build/coverage/full.cov ]
[2020-06-26T00:39:43.175Z] + FILE=metricbeat/build/coverage/full.cov
[2020-06-26T00:39:43.175Z] + [ -f metricbeat/build/coverage/full.cov ]
[2020-06-26T00:39:43.175Z] + FILE=packetbeat/build/coverage/full.cov
[2020-06-26T00:39:43.175Z] + [ -f packetbeat/build/coverage/full.cov ]
[2020-06-26T00:39:43.175Z] + FILE=winlogbeat/build/coverage/full.cov
[2020-06-26T00:39:43.175Z] + [ -f winlogbeat/build/coverage/full.cov ]
[2020-06-26T00:39:43.175Z] + FILE=journalbeat/build/coverage/full.cov
[2020-06-26T00:39:43.175Z] + [ -f journalbeat/build/coverage/full.cov ]
[2020-06-26T00:39:44.456Z] Failed in branch Filebeat x-pack
[2020-06-26T00:39:44.681Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19297/src/github.com/elastic/beats
[2020-06-26T00:39:44.999Z] + find . -type f -name TEST*.xml -path */build/* -delete
[2020-06-26T00:39:45.341Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19297/src/github.com/elastic/beats/Lint
[2020-06-26T00:39:45.442Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19297/src/github.com/elastic/beats/Filebeat-x-pack-Windows
[2020-06-26T00:39:45.537Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19297/src/github.com/elastic/beats/Filebeat-x-pack
[2020-06-26T00:39:45.935Z] + cat
[2020-06-26T00:39:45.935Z] + /usr/local/bin/runbld ./runbld-script
[2020-06-26T00:39:45.935Z] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
[2020-06-26T00:39:52.742Z] runbld>>> runbld started
[2020-06-26T00:39:52.742Z] runbld>>> 1.6.12/f45d832f2ba0aa2722ab4ec1fda8ad140f027f8b
[2020-06-26T00:39:55.312Z] runbld>>> The following profiles matched the job 'Beats/beats-beats-mbp/PR-19297' in order of occurrence in the config (last value wins).
[2020-06-26T00:39:56.259Z] runbld>>> Debug logging enabled.
[2020-06-26T00:39:56.259Z] runbld>>> Storing result
[2020-06-26T00:39:56.523Z] runbld>>> Store result: created {:total 2, :successful 2, :failed 0} 1
[2020-06-26T00:39:56.523Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200626003956-BB5F5F36
[2020-06-26T00:39:56.523Z] runbld>>> Adding system facts.
[2020-06-26T00:39:57.476Z] runbld>>> Adding vcs info for the latest commit:  47f877f138d24d2ce8a51349efff39c4b5b0f2f1
[2020-06-26T00:39:57.476Z] runbld>>> >>>>>>>>>>>> SCRIPT EXECUTION BEGIN >>>>>>>>>>>>
[2020-06-26T00:39:57.476Z] runbld>>> Adding /usr/lib/jvm/java-8-openjdk-amd64/bin to the path.
[2020-06-26T00:39:57.476Z] Processing JUnit reports with runbld...
[2020-06-26T00:39:57.476Z] + echo 'Processing JUnit reports with runbld...'
[2020-06-26T00:39:57.740Z] runbld>>> <<<<<<<<<<<< SCRIPT EXECUTION END <<<<<<<<<<<<
[2020-06-26T00:39:57.740Z] runbld>>> DURATION: 21ms
[2020-06-26T00:39:57.740Z] runbld>>> STDOUT: 40 bytes
[2020-06-26T00:39:57.740Z] runbld>>> STDERR: 49 bytes
[2020-06-26T00:39:57.740Z] runbld>>> WRAPPED PROCESS: SUCCESS (0)
[2020-06-26T00:39:57.740Z] runbld>>> Searching for build metadata in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19297/src/github.com/elastic/beats
[2020-06-26T00:39:59.670Z] runbld>>> Storing build metadata: 
[2020-06-26T00:39:59.670Z] runbld>>> Adding test report.
[2020-06-26T00:39:59.670Z] runbld>>> Searching for junit test output files with the pattern: TEST-.*\.xml$ in: /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19297/src/github.com/elastic/beats
[2020-06-26T00:40:01.074Z] runbld>>> Found 4 test output files
[2020-06-26T00:40:01.651Z] runbld>>> Test output logs contained: Errors: 0 Failures: 0 Tests: 1345 Skipped: 240
[2020-06-26T00:40:01.651Z] runbld>>> Storing result
[2020-06-26T00:40:01.651Z] runbld>>> FAILURES: 0
[2020-06-26T00:40:01.912Z] runbld>>> Store result: updated {:total 2, :successful 2, :failed 0} 2
[2020-06-26T00:40:01.912Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200626003956-BB5F5F36
[2020-06-26T00:40:01.912Z] runbld>>> Email notification disabled by environment variable.
[2020-06-26T00:40:01.912Z] runbld>>> Slack notification disabled by environment variable.
[2020-06-26T00:40:07.452Z] Running on Jenkins in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19297
[2020-06-26T00:40:07.547Z] [INFO] getVaultSecret: Getting secrets
[2020-06-26T00:40:07.609Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2020-06-26T00:40:08.466Z] + chmod 755 generate-build-data.sh
[2020-06-26T00:40:08.466Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19297/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19297/runs/2 ABORTED 7376631
[2020-06-26T00:40:08.466Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19297/runs/2/steps/?limit=10000 -o steps-info.json
[2020-06-26T00:40:08.717Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19297/runs/2/tests/?status=FAILED -o tests-errors.json

@andrewkroh andrewkroh merged commit 18ee16d into elastic:7.x Jun 26, 2020
@andrewkroh andrewkroh deleted the backport_19132_7.x branch January 14, 2022 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants