feat(eda): add webhook, polling, and Kafka event source plugins#11
Open
stevefulme1 wants to merge 3 commits into
Open
feat(eda): add webhook, polling, and Kafka event source plugins#11stevefulme1 wants to merge 3 commits into
stevefulme1 wants to merge 3 commits into
Conversation
Add three EDA source plugins for event-driven automation: - webhook: receive Edwin AI alerts via HTTP webhook - alerts: poll Edwin AI API for active alerts - kafka: consume alert events from Kafka topics All sources emit a consistent normalized event schema under the 'edwin_ai' key. Includes example rulebooks for each source.
- Validate portal name against allowlist pattern to prevent SSRF - Add explicit verify=True on requests calls for SSL cert validation - Validate webhook bind host and port inputs - Add payload size limit to webhook endpoint - Validate deserialized payload types before processing - Use logger.exception() instead of logging raw exception strings - Add minimum polling interval guard Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add portal name validation to _rest_methods.py to prevent SSRF - Add explicit timeout and verify=True on all requests calls - Add raise_for_status() to auth token request - Import _validate_portal in query_api.py module Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Adds Event-Driven Ansible (EDA) source plugins to enable bidirectional automation with Edwin AI. Edwin AI can now trigger Ansible playbooks in response to alerts, complementing the existing data collection modules.
Event Source Plugins
webhookalertskafkaAll three sources emit a consistent normalized event schema under the
edwin_aikey:Example Rulebooks
alert_remediation.yml— webhook-based auto-remediation (CPU, disk, memory, service down)alert_polling.yml— polling-based with incident creation/closurealert_kafka.yml— Kafka stream processing with escalationAuth
Uses the same portal/access_id/access_key pattern as the existing
query_apimodule. Webhook source optionally supports HMAC signature verification.Dependencies
webhook:aiohttp(included in EDA controller)alerts:requests(already a collection dependency)kafka:aiokafka(optional, only needed for Kafka source)Test plan