Default to SSHA-256 as API key stored credential hasher#120997
Merged
elasticsearchmachine merged 31 commits intoelastic:mainfrom Jan 29, 2025
Merged
Default to SSHA-256 as API key stored credential hasher#120997elasticsearchmachine merged 31 commits intoelastic:mainfrom
SSHA-256 as API key stored credential hasher#120997elasticsearchmachine merged 31 commits intoelastic:mainfrom
Conversation
Collaborator
|
Hi @n1v0lg, I've created a changelog YAML for you. |
Collaborator
|
Pinging @elastic/es-security (Team:Security) |
x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/Security.java
Outdated
Show resolved
Hide resolved
x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/SecurityTests.java
Show resolved
Hide resolved
slobodanadamovic
approved these changes
Jan 29, 2025
Contributor
slobodanadamovic
left a comment
There was a problem hiding this comment.
LGTM 🚀
Looks good, I left just one small comment for your consideration. No need for re-review.
Collaborator
💔 Backport failed
You can use sqren/backport to manually backport by running |
Contributor
Author
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
n1v0lg
added a commit
that referenced
this pull request
Jan 30, 2025
This was referenced Jan 27, 2026
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.
API keys are high-entropy secure random strings. This means that the additional work factor of functions like PBKDF or bcrypt are not necessary, and a faster hash function like salted SHA-256 provides adequate security against offline attacks (hash collision, brute force, etc.).
This PR adds
SSHA-256to the list of supported stored hash algorithms for API key secrets, and makes it the default algorithm. Additionally, this PR changes the format of API key secrets, moving from an encoded UUID to a random string which increase the entropy of API keys from 122 bits to 128 bits, without changing overall secret length.Relates: ES-9504