-
Notifications
You must be signed in to change notification settings - Fork 25.4k
Default to SSHA-256
as API key stored credential hasher
#120997
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
Default to SSHA-256
as API key stored credential hasher
#120997
Conversation
Hi @n1v0lg, I've created a changelog YAML for you. |
SSHA-256
for API key credential hashSSHA-256
as API key credential hash
SSHA-256
as API key credential hashSSHA-256
as API key stored credential hash
Pinging @elastic/es-security (Team:Security) |
SSHA-256
as API key stored credential hashSSHA-256
as API key stored credential hash
SSHA-256
as API key stored credential hashSSHA-256
as API key stored credential hasher
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
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 🚀
Looks good, I left just one small comment for your consideration. No need for re-review.
💔 Backport failed
You can use sqren/backport to manually backport by running |
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
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-256
to 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