-
Couldn't load subscription status.
- Fork 128
Check transforms in packages that have them #1409
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
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
03d091b
Check transforms in packages that have them
jsoriano 7fb5ce8
Preview docs
jsoriano 84e1dd6
Add fields validation
jsoriano 722aa08
Add test package
jsoriano 6133b8d
Move to function
jsoriano b586850
Fix error pattern
jsoriano 1ae75b4
Remove unneeded changes
jsoriano dff12f4
Fix error message
jsoriano 55519dd
Fix format in test package
jsoriano 19d7f12
Add missing error
jsoriano File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| dependencies: | ||
| ecs: | ||
| reference: git@8.7 |
33 changes: 33 additions & 0 deletions
33
test/packages/parallel/ti_anomali/_dev/build/docs/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| # Anomali Integration | ||
|
|
||
| The Anomali integration supports the following datasets. | ||
|
|
||
| - `threatstream` dataset: Support for [Anomali ThreatStream](https://www.anomali.com/products/threatstream), a commercial Threat Intelligence service. | ||
|
|
||
| ## Logs | ||
|
|
||
| ### Anomali Threatstream | ||
|
|
||
| This integration requires additional software, the _Elastic_ _Extension,_ | ||
| to connect the Anomali ThreatStream with this integration. It's available | ||
| at the [ThreatStream download page.](https://ui.threatstream.com/downloads) | ||
|
|
||
| Please refer to the documentation included with the Extension for a detailed | ||
| explanation on how to configure the Anomali ThreatStream to send indicator | ||
| to this integration. | ||
|
|
||
| ### Expiration of Indicators of Compromise (IOCs) | ||
| The ingested IOCs expire after certain duration. An [Elastic Transform](https://www.elastic.co/guide/en/elasticsearch/reference/current/transforms.html) is created to faciliate only active IOCs be available to the end users. This transform creates a destination index named `logs-ti_anomali_latest.threatstream` which only contains active and unexpired IOCs. When setting up indicator match rules, use this latest destination index to avoid false positives from expired IOCs. Please read [ILM Policy](#ilm-policy) below which is added to avoid unbounded growth on source `.ds-logs-ti_anomali.threatstream-*` indices. | ||
|
|
||
| #### Handling Orphaned IOCs | ||
| When an IOC expires, Anomali feed contains information about all IOCs that got `deleted`. However, some Anomali IOCs may never expire and will continue to stay in the latest destination index `logs-ti_anomali_latest.threatstream`. To avoid any false positives from such orphaned IOCs, users are allowed to configure `IOC Expiration Duration` parameter while setting up the integration. This parameter deletes all data inside the destination index `logs-ti_anomali_latest.threatstream` after this specified duration is reached. Users must pull entire feed instead of incremental feed when this expiration happens so that the IOCs get reset. | ||
|
|
||
| **NOTE:** `IOC Expiration Duration` parameter does not override the expiration provided by the Anomali for their IOCs. So, if Anomali IOC is expired and subsequently such `deleted` IOCs are sent into the feed, they are deleted immediately. `IOC Expiration Duration` parameter only exists to add a fail-safe default expiration in case Anomali IOCs never expire. | ||
|
|
||
| ### ILM Policy | ||
| To facilitate IOC expiration, source datastream-backed indices `.ds-logs-ti_anomali.threat-*` are allowed to contain duplicates from each polling interval. ILM policy is added to these source indices so it doesn't lead to unbounded growth. This means data in these source indices will be deleted after `5 days` from ingested date. | ||
|
|
||
|
|
||
| {{event "threatstream"}} | ||
|
|
||
| {{fields "threatstream"}} |
37 changes: 37 additions & 0 deletions
37
test/packages/parallel/ti_anomali/_dev/deploy/docker/docker-compose.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| version: '2.3' | ||
| services: | ||
| limo-http: | ||
| image: docker.elastic.co/observability/stream:v0.6.1 | ||
| ports: | ||
| - 8080 | ||
| volumes: | ||
| - ./files:/files:ro | ||
| environment: | ||
| PORT: 8080 | ||
| command: | ||
| - http-server | ||
| - --addr=:8080 | ||
| - --config=/files/config.yml | ||
| threatstream-webhook-http: | ||
| image: docker.elastic.co/observability/stream:v0.6.1 | ||
| volumes: | ||
| - ./sample_logs:/sample_logs:ro | ||
| environment: | ||
| - STREAM_PROTOCOL=webhook | ||
| - STREAM_ADDR=http://elastic-agent:9080/ | ||
| command: log --webhook-content-type application/x-ndjson --start-signal=SIGHUP --delay=5s /sample_logs/test-threatstream-ndjson.log | ||
| threatstream-webhook-https: | ||
| image: docker.elastic.co/observability/stream:v0.6.1 | ||
| volumes: | ||
| - ./sample_logs:/sample_logs:ro | ||
| environment: | ||
| - STREAM_PROTOCOL=webhook | ||
| - STREAM_INSECURE=true | ||
| - STREAM_ADDR=https://elastic-agent:7443/ | ||
| command: log --webhook-content-type application/x-ndjson --start-signal=SIGHUP --delay=5s /sample_logs/test-threatstream-ndjson.log | ||
| threatstream-integrator-test: | ||
| image: docker.io/adrisr/filebeat-anomali-integrator-test:latest | ||
| volumes: | ||
| - ./files:/files:ro | ||
| command: | ||
| - /files/test-intel.ndjson |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably it's not needed. I was wondering if at the end of the system test execution we should delete the indices created by the transforms.
Something similar to what it's done here for the main data stream
elastic-package/internal/testrunner/runners/system/runner.go
Lines 552 to 558 in 3295997
Or maybe it's better to leave that management to Fleet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think it wouldn't be needed because the source data is already deleted. The transform should be deleted by Fleet, but I think it is not doing it.