-
Notifications
You must be signed in to change notification settings - Fork 24.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate and store password hash for elastic user #76276
Conversation
For package installations (DEB,RPM), we will be generating a random strong password for the elastic user on installation time so that we can show it to the user. We will subsequently hash and store this password to the elasticsearch.keystore so that the node can pick it up on the first run and use it to populate the relevant document for the elastic user in the security index. This change implements a class that can be called from the package installation scripts and - Generates a strong password - Hashes it with the configured(default) password hashing algo - Stores it in the elasticsearch.keystore - prints it in the stdout
Pinging @elastic/es-security (Team:Security) |
x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/tool/CommandUtils.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only had a couple of minor things.
I don't think another round is warranted, LGTM.
...ecurity/src/main/java/org/elasticsearch/xpack/security/tool/GenerateElasticPasswordHash.java
Outdated
Show resolved
Hide resolved
...ecurity/src/main/java/org/elasticsearch/xpack/security/tool/GenerateElasticPasswordHash.java
Outdated
Show resolved
Hide resolved
...ecurity/src/main/java/org/elasticsearch/xpack/security/tool/GenerateElasticPasswordHash.java
Outdated
Show resolved
Hide resolved
...ecurity/src/main/java/org/elasticsearch/xpack/security/tool/GenerateElasticPasswordHash.java
Outdated
Show resolved
Hide resolved
...ecurity/src/main/java/org/elasticsearch/xpack/security/tool/GenerateElasticPasswordHash.java
Outdated
Show resolved
Hide resolved
...ecurity/src/main/java/org/elasticsearch/xpack/security/tool/GenerateElasticPasswordHash.java
Outdated
Show resolved
Hide resolved
...ecurity/src/main/java/org/elasticsearch/xpack/security/tool/GenerateElasticPasswordHash.java
Outdated
Show resolved
Hide resolved
...ecurity/src/main/java/org/elasticsearch/xpack/security/tool/GenerateElasticPasswordHash.java
Outdated
Show resolved
Hide resolved
...h/xpack/security/enrollment/tool/BootstrapPasswordAndEnrollmentTokenForInitialNodeTests.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@elasticmachine update branch |
For package installations (DEB,RPM), we will be generating a
random strong password for the elastic user on installation time
so that we can show it to the user.
We will subsequently hash and store this password to the
elasticsearch.keystore so that the node can pick it up on the first
run and use it to populate the relevant document for the elastic
user in the security index.
This change implements a class that can be called from the package
installation scripts and
relates: #75310