Skip to content

Conversation

PeteGillinElastic
Copy link
Member

@PeteGillinElastic PeteGillinElastic commented Oct 13, 2025

This fixes a bug in the reindex API where it did not correctly validate the request parameters for authenticating with a remote source using basic auth, which requires both username and password.

  1. Prior to this change, a reindex request which set source.remote.username but not source.remote.password would result in a response with HTTP status code 500 (Internal Server Error). This will now result in a response with HTTP status code 400 (Bad Request).

  2. Prior to this change, a reindex request which set source.remote.password but not source.remote.username would normally result in a response with HTTP status code 401 (Unuauthorized). (If the remote cluster does not require authentication, or if an API key or some other form of authentication is provided, the request would succeed, with the password silently ignored.) This will now result in a response with HTTP status code 400 (Bad Request).

Closes #135925

This fixes a bug in the reindex API where it did not correctly
validate the request parameters for authenticating with a remote
source using basic auth, which requires both username and password.

1. Prior to this change, a reindex request which set
`source.remote.username` but not `source.remote.password` would result
in a response with HTTP status code 500 (Internal Server Error). This
will now result in a response with HTTP status code 400 (Bad Request).

2. Prior to this change, a reindex request which set
`source.remote.password` but not `source.remote.username` would
normally result in a response with HTTP status code 401
(Unuauthorized). (If the remote cluster does not require
authentication, or if an API key or some other form of authentication
is provided, the request would succeed, with the password silently
ignored.) This will now result in a response with HTTP status code 400
(Bad Request).
@PeteGillinElastic PeteGillinElastic added >bug :Data Management/Indices APIs APIs to create and manage indices and templates auto-backport Automatically create backport pull requests when merged v8.19.6 v9.1.6 v8.18.9 v9.2.1 v9.3.0 labels Oct 13, 2025
@elasticsearchmachine
Copy link
Collaborator

Hi @PeteGillinElastic, I've created a changelog YAML for you.

@elasticsearchmachine
Copy link
Collaborator

Hi @PeteGillinElastic, I've updated the changelog YAML for you.

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

Labels

auto-backport Automatically create backport pull requests when merged >bug :Data Management/Indices APIs APIs to create and manage indices and templates v8.18.9 v8.19.6 v9.1.6 v9.2.1 v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrong/missing error when supplying username but not password or vice versa for reindex-from-remote

2 participants