Skip to content

Misleading error message when trying to change password for non-native user #113535

@abseht

Description

@abseht

Elasticsearch Version

8.15.2

Installed Plugins

No response

Java Version

bundled

OS Version

managed elastic.co deployment

Problem Description

Cannot change password for elastic user using these instructions

It returns

{
  "error": {
    "root_cause": [
      {
        "type": "validation_exception",
        "reason": "Validation Failed: 1: user must exist in order to change password;"
      }
    ],
    "type": "validation_exception",
    "reason": "Validation Failed: 1: user must exist in order to change password;"
  },
  "status": 400
}

Moreover, trying to do so with Terraform provider and this resource also returns below error.

│ Error: System user "elastic" not found
│ 
│   with module.password.elasticstack_elasticsearch_security_system_user.this["elastic"],
│   on ../module_elasticsearch_user/built_in_user.tf line 1, in resource "elasticstack_elasticsearch_security_system_user" "this":
│    1: resource "elasticstack_elasticsearch_security_system_user" "this" {

Steps to Reproduce

  1. Go to your elastic.co console.
  2. Select a deployment
  3. Go to API console
  4. Send request to POST /_security/user/_password with body { "password": "new-Password-12345"}
    Image
    OR
  5. Send request to POST /_security/user/elastic/_password with the same body
    Image

Logs (if relevant)

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions