feat(Node Elasticsearch): update authentication to support API Key and Basic Auth - #207
Open
everettbu wants to merge 10 commits into
Open
feat(Node Elasticsearch): update authentication to support API Key and Basic Auth#207everettbu wants to merge 10 commits into
everettbu wants to merge 10 commits into
Conversation
…h and default to API Key
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.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.
Mirror of n8n-io/n8n#21405
Original author: justincastilla
Summary
Adds API Key authentication support to the Elasticsearch node, enabling modern authentication for Elastic Cloud, Elastic Serverless, as well as self-hosted Elastic instances.
/_xpackto/for Serverless compatibilityTesting
Updated UI
API Key Authentication Option:

Review / Merge checklist
release/backport(if the PR is an urgent fix that needs to be backported)Note
Adds API Key authentication (default) alongside Basic Auth, updates credential test and baseURL handling, and introduces unit tests for auth flows.
credentials/ElasticsearchApi.credentials.ts):authTypewith optionsapiKey(default) andbasicAuth; introduceapiKey,username,password; keep requiredbaseUrl.authenticate(...)to apply Basic Auth orAuthorization: ApiKey ...; preserves existing headers; legacy fallback whenauthTypemissing; input validation with clear errors.GET /and normalizebaseURLby trimming trailing slashes.nodes/Elastic/Elasticsearch/types.ts):ElasticsearchApiCredentialsto includeauthType,apiKey, and optionalusername/password.nodes/Elastic/Elasticsearch/tests/credentials/ElasticsearchApi.test.ts):Written by Cursor Bugbot for commit 808cccf. This will update automatically on new commits. Configure here.