Skip to content

OpenCanary update, resolves multiple issues - #13026

Closed
colin-stubbs wants to merge 9 commits into
elastic:mainfrom
routedlogic:opencanary
Closed

OpenCanary update, resolves multiple issues#13026
colin-stubbs wants to merge 9 commits into
elastic:mainfrom
routedlogic:opencanary

Conversation

@colin-stubbs

Copy link
Copy Markdown
Contributor
  • Bug
  • Enhancement

Proposed commit message

Resolves issues #12911, #13024, #13025. Relevant to resolution of #2518.

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

Author's Checklist

Resolves multiple issues:

  • Only set event.kind == alert if event is clearly not a generic application log message
  • Migrate logfile to filestream based filebeat configuration
  • Add http_endpoint for webhook based ingest
  • Add system tests for both filestream and http_endpoint as none currently exist.
  • Add pipeline test for webhook'ed events
  • Retain password fields if desired, e.g. only remove password field if redaction requested. The current behaviour always removes passwords.
  • Provide option to remove or retain ECS mapped fields, currently this option does not exist and ECS mapped fields are always removed.
  • Add dashboard and dashboard screenshot. Currently not included in integration.
  • Fix confused tftp/vnc field names. This is a typeo/bug due to lack of sufficient sample logs for pipeline or system testing.
  • Add more complete/wider variety of sample logs for testing, e.g. TFTP & VNC events, NTP events, SNMP events etc
  • Define appropriate fields based on more complete/wider variety of sample logs
  • Fix as yet unknown logtype handling, e.g. current ingest pipeline script allows the logtype integer value to be left in a field defined as keyword leading to type conflicts and incomplete search results.
  • Update known logtype map based on latest opencanary repo code. Current list is not up to date with opencanary code.

Testing:

  • elastic-package lint && check && build
  • elastic-package test system --generate
  • elastic-package test pipeline --generate
  • elastic-package test
  • Manual deploy on local elastic-package managed stack and ingest of logfile
  • Manual deploy on remote Elastic Cloud stack and ingest of webhooks from real opencanary honeypots

How to test this PR locally

Install and operate OpenCanary, ideally via docker.
Use Elastic Agent to ingest OpenCanary log file OR webhooks.
Scan OpenCanary with nmap with scripting to trigger events, e.g. nmap -sC 127.0.0.1
Review

Related issues

Screenshots

New basic summary dashboard added,

opencanary-dashboard

@colin-stubbs
colin-stubbs requested a review from a team as a code owner March 8, 2025 06:35
rebuild package and retest completed OK
Comment thread packages/opencanary/changelog.yml Outdated
Comment thread packages/opencanary/data_stream/events/elasticsearch/ingest_pipeline/default.yml Outdated
Comment thread packages/opencanary/data_stream/events/elasticsearch/ingest_pipeline/default.yml Outdated
Comment thread packages/opencanary/data_stream/events/elasticsearch/ingest_pipeline/default.yml Outdated
colin-stubbs and others added 2 commits March 11, 2025 10:48
Co-authored-by: Dan Kortschak <dan.kortschak@elastic.co>
Co-authored-by: Dan Kortschak <dan.kortschak@elastic.co>
@efd6

efd6 commented Mar 11, 2025

Copy link
Copy Markdown
Contributor

/test

@elasticmachine

elasticmachine commented Mar 11, 2025

Copy link
Copy Markdown

💔 Build Failed

Failed CI Steps

History

@andrewkroh andrewkroh added Integration:opencanary OpenCanary (Community supported) dashboard Relates to a Kibana dashboard bug, enhancement, or modification. Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations] labels Mar 13, 2025
@elasticmachine

Copy link
Copy Markdown

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

@botelastic

botelastic Bot commented Apr 19, 2025

Copy link
Copy Markdown

Hi! We just realized that we haven't looked into this PR in a while. We're sorry! We're labeling this issue as Stale to make it hit our filters and make sure we get back to it as soon as possible. In the meantime, it'd be extremely helpful if you could take a look at it as well and confirm its relevance. A simple comment with a nice emoji will be enough :+1. Thank you for your contribution!

@botelastic botelastic Bot added the Stalled label Apr 19, 2025
@botelastic

botelastic Bot commented May 19, 2025

Copy link
Copy Markdown

Hi! This PR has been stale for a while and we're going to close it as part of our cleanup procedure. We appreciate your contribution and would like to apologize if we have not been able to review it, due to the current heavy load of the team. Feel free to re-open this PR if you think it should stay open and is worth rebasing. Thank you for your contribution!

@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dashboard Relates to a Kibana dashboard bug, enhancement, or modification. Integration:opencanary OpenCanary (Community supported) Stalled Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations]

4 participants