Skip to content

Conversation

@taylor-swanson
Copy link
Contributor

@taylor-swanson taylor-swanson commented Nov 13, 2024

Proposed commit message

  • Add initial implementation of the syslog router integration which will identify and route syslog-based events to security integrations.

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

How to test this PR locally

cd packages/syslog_router elastic-package test 

Warning

Due to limitations in elastic-package, automated tests cannot verify routing behavior to data streams external to this package. Verification will have to be performed manually. To verify, follow the instructions in the integration on installing assets for another integration (Cisco ASA, for example), configure the integration, and send a relevant log to the Agent.

Related issues

  • Relates elastic/security-team#10081
- Add initial implementation of the syslog router integration which will identify and route syslog-based events to security integrations.
@taylor-swanson taylor-swanson added enhancement New feature or request New Integration Issue or pull request for creating a new integration package. Team:Security-Deployment and Devices DEPRECATED Deployment and Devices Security team [elastic/sec-deployment-and-devices] Integration:syslog_router Syslog Router labels Nov 13, 2024
@taylor-swanson taylor-swanson self-assigned this Nov 13, 2024
@elastic-vault-github-plugin-prod

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

@taylor-swanson taylor-swanson requested a review from a team November 13, 2024 21:20
@taylor-swanson taylor-swanson marked this pull request as ready for review November 13, 2024 21:20
@elasticmachine
Copy link

Pinging @elastic/sec-deployment-and-devices (Team:Security-Deployment and Devices)


**Before:**

```yaml
Copy link
Contributor

Choose a reason for hiding this comment

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

As a future improvment idea, the Defend for Containers integration uses UI components (buttons, dropdowns, etc) to create somewhat similar rules, and then generates a yaml file based on the GUI.

It would be easier for users to have something like that here. I didn't work on that part myself, so I'm not too sure how much work it would be to add here, but it's probably worth investigating. I think setting up this yaml could cause difficulties for a lot of users.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Phase 2 of this project does involve UI work, but I'll take a look at that integration to see if I can apply any of that here.

I agree the yaml is convoluted, but this is how beats is designed. I'm not sure what to do here, though. One of my original approaches to this integration was developing a new processor, which allowed me to have a much "nicer" looking yaml configuration. I abandoned that in favor of the existing conditionals and processors in beats. Unfortunately, you can't do anything special with yaml blocks from the agent configuration in handlebars, so I wasn't able to take a nicer looking yaml from the agent config and produce the correct filebeat config from it.

I'll take a look at the Defend for Containers integration and see what I can use from that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah looking at Defend for Containers, that's what we're aiming for in Phase 2.

This was the "nicer" looking yaml config I came up with (one of the reroute definitions). I feel like this would be easier for the UI to work with than the beats config that's currently being used. The beats config would be fairly easy for the UI to emit, but not read back in.

- target: citrix_waf.log patterns: - "CEF:0\\|Citrix\\|NetScaler" processors: - add_fields: target: '' fields: _conf.tz_offset: "UTC" - append: target_field: tags values: - citrix_waf-log
Copy link
Contributor

@dwhyrock dwhyrock left a comment

Choose a reason for hiding this comment

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

A couple comments and questions

Copy link
Contributor

@mjwolf mjwolf left a comment

Choose a reason for hiding this comment

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

I tested this with Arista NG and Check Point logs, and both were routed to the correct datastream.

Copy link
Contributor

@dwhyrock dwhyrock left a comment

Choose a reason for hiding this comment

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

Great work on this!

@elasticmachine
Copy link

💚 Build Succeeded

History

cc @taylor-swanson

@taylor-swanson taylor-swanson merged commit dcacd90 into elastic:main Dec 19, 2024
5 checks passed
@taylor-swanson taylor-swanson deleted the integ/syslog-router branch December 19, 2024 14:16
@elastic-vault-github-plugin-prod

Package syslog_router - 0.1.0 containing this change is available at https://epr.elastic.co/package/syslog_router/0.1.0/

harnish-crest-data pushed a commit to chavdaharnish/integrations that referenced this pull request Feb 4, 2025
- Add initial implementation of the syslog router integration which will identify and route syslog-based events to security integrations.
harnish-crest-data pushed a commit to chavdaharnish/integrations that referenced this pull request Feb 5, 2025
- Add initial implementation of the syslog router integration which will identify and route syslog-based events to security integrations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Integration:syslog_router Syslog Router New Integration Issue or pull request for creating a new integration package. Team:Security-Deployment and Devices DEPRECATED Deployment and Devices Security team [elastic/sec-deployment-and-devices]

6 participants