Skip to content

feat: streamline Elastic authentication to use only API key and update docs#3796

Merged
forestileao merged 10 commits intosuperplanehq:mainfrom
WashingtonKK:fix/elastic-api-key-only
Apr 14, 2026
Merged

feat: streamline Elastic authentication to use only API key and update docs#3796
forestileao merged 10 commits intosuperplanehq:mainfrom
WashingtonKK:fix/elastic-api-key-only

Conversation

@WashingtonKK
Copy link
Copy Markdown
Collaborator

@WashingtonKK WashingtonKK commented Mar 30, 2026

Fixes #3785

This fixes the elastic integration by making the following adjustments:

  • Restricts auth to API key and removes basic auth
  • Updates documentation to be concise and straightforward
  • Fixed the validation bug where an Elastic integration could appear ready even if the API key could not create Kibana connectors.
image
Screencast.from.2026-03-30.12-16-41.webm

Note

Medium Risk
Moderate risk because it changes Elastic integration configuration (removing basic auth) and rewires trigger provisioning/cleanup logic for Kibana connectors and case-status polling, which could impact existing installations and alert routing.

Overview
Elastic integration auth is now API-key only. The authType/basic-auth configuration fields and logic are removed, apiKey is required, and docs/instructions are updated accordingly.

Kibana validation is hardened. ValidateKibana now verifies connector create + delete permissions by creating a temporary validation connector and deleting it, preventing integrations from showing as ready when connector management is forbidden.

Trigger provisioning behavior is updated. When Alert Fires now schedules an internal action to locate the shared webhook connector by URL, attach/update it on the selected rule (and detach from any previous rule), and cleans up by detaching on trigger removal; EnsureKibanaRuleHasConnector now updates mismatched action params instead of no-op. When Case Status Changes shifts from provisioning a Kibana query rule to periodic polling of the cases API and emitting elastic.case.status.changed on detected status transitions. On Document Indexed now finds the shared connector by webhook URL (not by connector name) before creating its Kibana rule.

Webhook handler responsibilities are narrowed. The Elastic webhook handler now only manages shared connector creation/reuse and secret sync, no longer attaching/detaching connectors to specific Kibana rules. Tests are updated/added to cover the new flows and legacy tag payload parsing (comma-separated tags).

Reviewed by Cursor Bugbot for commit 8bdaa53. Bugbot is set up for automated code reviews on this repo. Configure here.

…ate documentation

Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
@superplanehq-integration
Copy link
Copy Markdown

👋 Commands for maintainers:

  • /sp start - Start an ephemeral machine (takes ~30s)
  • /sp stop - Stop a running machine (auto-executed on pr close)

Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
@WashingtonKK
Copy link
Copy Markdown
Collaborator Author

image

Comment thread pkg/integrations/elastic/on_alert.go Outdated
Comment thread pkg/integrations/elastic/on_alert.go
…e connector handling

Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
…ocessing in webhook

Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
Comment thread pkg/integrations/elastic/on_case_status_change.go
…atusChange

Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
Comment thread test/support/contexts/contexts.go
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment thread pkg/integrations/elastic/on_alert.go Outdated
@AleksandarCole AleksandarCole added the pr:stage-3/3 Ready for full, in-depth, review label Apr 9, 2026
@WashingtonKK WashingtonKK changed the title feat: streamline authentication to use only API key and update docs feat: streamline Elastic authentication to use only API key and update docs Apr 9, 2026
Comment thread docs/components/Elastic.mdx Outdated
…adability

Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
@forestileao forestileao merged commit 0b2dbc0 into superplanehq:main Apr 14, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:stage-3/3 Ready for full, in-depth, review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Elastic: only API key; triggers broken

3 participants