-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Labels
:Security/AuthenticationLogging in, Usernames/passwords, Realms (Native/LDAP/AD/SAML/PKI/etc)Logging in, Usernames/passwords, Realms (Native/LDAP/AD/SAML/PKI/etc)>enhancementTeam:SecurityMeta label for security teamMeta label for security team
Description
It would be beneficial for our users to offer a simple solution for resetting the password of the elastic built-in user.
Requirements
- Easy to use
- Should be generally available
- Allow to set the password to a specific value of automatically generate one
- Need not cover other built-in users, as access to elastic credentials would allow to set the password of any other built-in (or otherwise) user, via the change password API
- Should not change our existing threat model
- Should not depend on external services or personal information ( email based flows etc )
Suggested Solution
We can offer a CLI tool for this purpose. The tool can depend on the file realm and codify the suggested approach we have even now for these kinds of situations where users have lost the password for the elastic user. The flow can be similar to:
- User runs
bin/elasticsearch-tool-name, optionally specifying the requested password value - The CLI tool verifies that the file realm is enabled, generates an entry for a file realm temp user with a role of
superuserand adds that to the file realm. - CLI tool uses the newly created user credentials to query the ES cluster and verify that it's health ( and possibly some more nuanced tests around the security index availability/state )
- CLI tool calls the change password API and sets the password of the
elasticuser to the requested value - CLI tool deletes the temp user from the file realm and verifies its deletion
- CLI tool exits.
Requirements satisfied
- Easy to use ✔️
- Should be generally available: 👍 👎 Currently file realm is enabled by default but disabled implicitly when other realms are explicitly defined. We are deprecating and changing this behavior for 8.0.0 though, which means that we can expect the file realm to be generally available in the most cases this tool is used.
- Allow to set the password to a specific value of automatically generate one: ✔️
- Need not cover other built-in users, as access to elastic credentials would allow to set the password of any other built-in (or otherwise) user, via the change password API: ✔️
- Should not change our existing threat model : ✔️ ( Users with write access to the elasticsearch config directory can already use the same process to reset the password, albeit manually )
- Should not depend on external services or personal information ( email based flows etc ) : ✔️
ywangd, bytebilly, BigPandaToo and kissifrot
Metadata
Metadata
Assignees
Labels
:Security/AuthenticationLogging in, Usernames/passwords, Realms (Native/LDAP/AD/SAML/PKI/etc)Logging in, Usernames/passwords, Realms (Native/LDAP/AD/SAML/PKI/etc)>enhancementTeam:SecurityMeta label for security teamMeta label for security team