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

Add automated tests for security packages #377

Closed
andrewkroh opened this issue Nov 2, 2020 · 2 comments
Closed

Add automated tests for security packages #377

andrewkroh opened this issue Nov 2, 2020 · 2 comments
Labels

Comments

@andrewkroh
Copy link
Member

andrewkroh commented Nov 2, 2020

Automated tests need to be added to the security packages that we migrated over from Filebeat. This will prevent future regressions and save us from having to manually test. The tests should verify:

  • Data can be collected through each supported input type.
  • Fields contained in the final documents are defined in package.
  • There are no data type conflicts with latest ECS release.

I think it would be ideal if all of this testing could be accomplished through system tests with the elastic-package tool. I'll work through setting up a test and see what additional features will be needed and work that via issues in the elastic-package repo.

Input Types

These are the different input types used in packages.

  • logfile
  • udp
  • tcp
  • tcp with tls
  • aws-s3
  • gcp-pubsub
  • netflow
  • httpjson
  • o365audit
  • windows event log (via .evtx file)

Data Streams to Test

This is every data stream and the inputs that they support.

@elasticmachine
Copy link

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

@andrewkroh
Copy link
Member Author

andrewkroh commented Dec 17, 2020

Issues encountered while implementing testing (I will open issues and link here):

  • Need to be able to execute multiple system tests for a data stream. Some data streams have several input options (syslog, tcp, udp) that need exercised. [System test runner] Support for multiple tests per data stream elastic-package#208
  • Need to be able to select one of several docker-compose services to use during the tests. The service requirements are different when testing logs vs. syslog+tcp vs. syslog+udp.
  • Some input types are not easily testable like s3+sqs. In order to add more test coverage of these data streams it would be nice if we could add an input for testing that's not exposed in the UI (like show_user: false). We could expose it in the UI and have it disabled, but I think that would likely lead to confusion. Allow defining inputs only for testing package-spec#97
  • Golden file testing for system tests. This would be useful for detecting breaking changes in agent/collector/inputs.

andrewkroh added a commit to andrewkroh/beats that referenced this issue Feb 16, 2021
* Sync changes to AWS CloudTrail

elastic/integrations#408

* Sync changes to CheckPoint Firewall

Change type of event.severity.

elastic/integrations#409

* Sync changes from Cisco ASA / FTD

elastic/integrations#414

* Sync changes from Cisco IOS

Make icmp and igmp fields strings because they are keywords.

elastic/integrations#416

* Sync changes to CrowdStrike Falcon

Fix some field types.

elastic/integrations#377

* Sync changes to Fortinet Firewall

Drop assignip if the value is "N/A".

elastic/integrations#437

* Sync changes to Juniper SRX

Convert event.risk values to float
Protect against missing event.timezone
Convert event.severity to long.

elastic/integrations#443

* Sync changes to Suricata EVE

Convert suricata.eve.flow_id to string because the field is a keyword in the mapping.

elastic/integrations#457

* Sync changes to Zeek DNS

Fix usages of ignore_failure with convert processor.
Make DNS transaction ID a string.

elastic/integrations#448

* Add changelog

(cherry picked from commit bf46572)
adriansr pushed a commit to elastic/beats that referenced this issue Feb 17, 2021
#24077)

* Sync fixes from Integration Package Testing (#23424)

* Sync changes to AWS CloudTrail

elastic/integrations#408

* Sync changes to CheckPoint Firewall

Change type of event.severity.

elastic/integrations#409

* Sync changes from Cisco ASA / FTD

elastic/integrations#414

* Sync changes from Cisco IOS

Make icmp and igmp fields strings because they are keywords.

elastic/integrations#416

* Sync changes to CrowdStrike Falcon

Fix some field types.

elastic/integrations#377

* Sync changes to Fortinet Firewall

Drop assignip if the value is "N/A".

elastic/integrations#437

* Sync changes to Juniper SRX

Convert event.risk values to float
Protect against missing event.timezone
Convert event.severity to long.

elastic/integrations#443

* Sync changes to Suricata EVE

Convert suricata.eve.flow_id to string because the field is a keyword in the mapping.

elastic/integrations#457

* Sync changes to Zeek DNS

Fix usages of ignore_failure with convert processor.
Make DNS transaction ID a string.

elastic/integrations#448

* Add changelog

(cherry picked from commit bf46572)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants