security-hash-settings.asciidoc 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. [float]
  2. [[hashing-settings]]
  3. ==== User cache and password hash algorithms
  4. Certain realms store user credentials in memory. To limit exposure
  5. to credential theft and mitigate credential compromise, the cache only stores
  6. a hashed version of the user credentials in memory. By default, the user cache
  7. is hashed with a salted `sha-256` hash algorithm. You can use a different
  8. hashing algorithm by setting the `cache.hash_algo` realm settings to any of the
  9. following values:
  10. [[cache-hash-algo]]
  11. .Cache hash algorithms
  12. |=======================
  13. | Algorithm | | | Description
  14. | `ssha256` | | | Uses a salted `sha-256` algorithm (default).
  15. | `md5` | | | Uses `MD5` algorithm.
  16. | `sha1` | | | Uses `SHA1` algorithm.
  17. | `bcrypt` | | | Uses `bcrypt` algorithm with salt generated in 1024 rounds.
  18. | `bcrypt4` | | | Uses `bcrypt` algorithm with salt generated in 16 rounds.
  19. | `bcrypt5` | | | Uses `bcrypt` algorithm with salt generated in 32 rounds.
  20. | `bcrypt6` | | | Uses `bcrypt` algorithm with salt generated in 64 rounds.
  21. | `bcrypt7` | | | Uses `bcrypt` algorithm with salt generated in 128 rounds.
  22. | `bcrypt8` | | | Uses `bcrypt` algorithm with salt generated in 256 rounds.
  23. | `bcrypt9` | | | Uses `bcrypt` algorithm with salt generated in 512 rounds.
  24. | `pbkdf2` | | | Uses `PBKDF2` key derivation function with `HMAC-SHA512` as a
  25. pseudorandom function using 10000 iterations.
  26. | `pbkdf2_1000` | | | Uses `PBKDF2` key derivation function with `HMAC-SHA512` as a
  27. pseudorandom function using 1000 iterations.
  28. | `pbkdf2_10000` | | | Uses `PBKDF2` key derivation function with `HMAC-SHA512` as a
  29. pseudorandom function using 10000 iterations.
  30. | `pbkdf2_50000` | | | Uses `PBKDF2` key derivation function with `HMAC-SHA512` as a
  31. pseudorandom function using 50000 iterations.
  32. | `pbkdf2_100000` | | | Uses `PBKDF2` key derivation function with `HMAC-SHA512` as a
  33. pseudorandom function using 100000 iterations.
  34. | `pbkdf2_500000` | | | Uses `PBKDF2` key derivation function with `HMAC-SHA512` as a
  35. pseudorandom function using 500000 iterations.
  36. | `pbkdf2_1000000` | | | Uses `PBKDF2` key derivation function with `HMAC-SHA512` as a
  37. pseudorandom function using 1000000 iterations.
  38. | `noop`,`clear_text` | | | Doesn't hash the credentials and keeps it in clear text in
  39. memory. CAUTION: keeping clear text is considered insecure
  40. and can be compromised at the OS level (for example through
  41. memory dumps and using `ptrace`).
  42. |=======================
  43. Likewise, realms that store passwords hash them using cryptographically strong
  44. and password-specific salt values. You can configure the algorithm for password
  45. hashing by setting the `xpack.security.authc.password_hashing.algorithm` setting
  46. to one of the following:
  47. [[password-hashing-algorithms]]
  48. .Password hashing algorithms
  49. |=======================
  50. | Algorithm | | | Description
  51. | `bcrypt` | | | Uses `bcrypt` algorithm with salt generated in 1024 rounds. (default)
  52. | `bcrypt4` | | | Uses `bcrypt` algorithm with salt generated in 16 rounds.
  53. | `bcrypt5` | | | Uses `bcrypt` algorithm with salt generated in 32 rounds.
  54. | `bcrypt6` | | | Uses `bcrypt` algorithm with salt generated in 64 rounds.
  55. | `bcrypt7` | | | Uses `bcrypt` algorithm with salt generated in 128 rounds.
  56. | `bcrypt8` | | | Uses `bcrypt` algorithm with salt generated in 256 rounds.
  57. | `bcrypt9` | | | Uses `bcrypt` algorithm with salt generated in 512 rounds.
  58. | `bcrypt10` | | | Uses `bcrypt` algorithm with salt generated in 1024 rounds.
  59. | `bcrypt11` | | | Uses `bcrypt` algorithm with salt generated in 2048 rounds.
  60. | `bcrypt12` | | | Uses `bcrypt` algorithm with salt generated in 4096 rounds.
  61. | `bcrypt13` | | | Uses `bcrypt` algorithm with salt generated in 8192 rounds.
  62. | `bcrypt14` | | | Uses `bcrypt` algorithm with salt generated in 16384 rounds.
  63. | `pbkdf2` | | | Uses `PBKDF2` key derivation function with `HMAC-SHA512` as a
  64. pseudorandom function using 10000 iterations.
  65. | `pbkdf2_1000` | | | Uses `PBKDF2` key derivation function with `HMAC-SHA512` as a
  66. pseudorandom function using 1000 iterations.
  67. | `pbkdf2_10000` | | | Uses `PBKDF2` key derivation function with `HMAC-SHA512` as a
  68. pseudorandom function using 10000 iterations.
  69. | `pbkdf2_50000` | | | Uses `PBKDF2` key derivation function with `HMAC-SHA512` as a
  70. pseudorandom function using 50000 iterations.
  71. | `pbkdf2_100000` | | | Uses `PBKDF2` key derivation function with `HMAC-SHA512` as a
  72. pseudorandom function using 100000 iterations.
  73. | `pbkdf2_500000` | | | Uses `PBKDF2` key derivation function with `HMAC-SHA512` as a
  74. pseudorandom function using 500000 iterations.
  75. | `pbkdf2_1000000` | | | Uses `PBKDF2` key derivation function with `HMAC-SHA512` as a
  76. pseudorandom function using 1000000 iterations.
  77. |=======================