security-hash-settings.asciidoc 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. [discrete]
  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 <<static-cluster-setting,static>>
  9. `cache.hash_algo` realm settings to any of the 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. | `pbkdf2_stretch` | | | Uses `PBKDF2` key derivation function with `HMAC-SHA512` as a
  39. pseudorandom function using 10000 iterations, after hashing the
  40. initial input with SHA512 first.
  41. | `pbkdf2_stretch_1000` | | | Uses `PBKDF2` key derivation function with `HMAC-SHA512` as a
  42. pseudorandom function using 1000 iterations, after hashing the
  43. initial input with SHA512 first.
  44. | `pbkdf2_stretch_10000` | | | Uses `PBKDF2` key derivation function with `HMAC-SHA512` as a
  45. pseudorandom function using 10000 iterations, after hashing the
  46. initial input with SHA512 first.
  47. | `pbkdf2_stretch_50000` | | | Uses `PBKDF2` key derivation function with `HMAC-SHA512` as a
  48. pseudorandom function using 50000 iterations, after hashing the
  49. initial input with SHA512 first.
  50. | `pbkdf2_stretch_100000` | | | Uses `PBKDF2` key derivation function with `HMAC-SHA512` as a
  51. pseudorandom function using 100000 iterations, after hashing the
  52. initial input with SHA512 first.
  53. | `pbkdf2_stretch_500000` | | | Uses `PBKDF2` key derivation function with `HMAC-SHA512` as a
  54. pseudorandom function using 500000 iterations, after hashing the
  55. initial input with SHA512 first.
  56. | `pbkdf2_stretch_1000000`| | | Uses `PBKDF2` key derivation function with `HMAC-SHA512` as a
  57. pseudorandom function using 1000000 iterations, after hashing the
  58. initial input with SHA512 first.
  59. | `noop`,`clear_text` | | | Doesn't hash the credentials and keeps it in clear text in
  60. memory. CAUTION: keeping clear text is considered insecure
  61. and can be compromised at the OS level (for example through
  62. memory dumps and using `ptrace`).
  63. |=======================
  64. Likewise, realms that store passwords hash them using cryptographically strong
  65. and password-specific salt values. You can configure the algorithm for password
  66. hashing by setting the <<static-cluster-setting,static>>
  67. `xpack.security.authc.password_hashing.algorithm` setting to one of the
  68. following:
  69. [[password-hashing-algorithms]]
  70. .Password hashing algorithms
  71. |=======================
  72. | Algorithm | | | Description
  73. | `bcrypt` | | | Uses `bcrypt` algorithm with salt generated in 1024 rounds. (default)
  74. | `bcrypt4` | | | Uses `bcrypt` algorithm with salt generated in 16 rounds.
  75. | `bcrypt5` | | | Uses `bcrypt` algorithm with salt generated in 32 rounds.
  76. | `bcrypt6` | | | Uses `bcrypt` algorithm with salt generated in 64 rounds.
  77. | `bcrypt7` | | | Uses `bcrypt` algorithm with salt generated in 128 rounds.
  78. | `bcrypt8` | | | Uses `bcrypt` algorithm with salt generated in 256 rounds.
  79. | `bcrypt9` | | | Uses `bcrypt` algorithm with salt generated in 512 rounds.
  80. | `bcrypt10` | | | Uses `bcrypt` algorithm with salt generated in 1024 rounds.
  81. | `bcrypt11` | | | Uses `bcrypt` algorithm with salt generated in 2048 rounds.
  82. | `bcrypt12` | | | Uses `bcrypt` algorithm with salt generated in 4096 rounds.
  83. | `bcrypt13` | | | Uses `bcrypt` algorithm with salt generated in 8192 rounds.
  84. | `bcrypt14` | | | Uses `bcrypt` algorithm with salt generated in 16384 rounds.
  85. | `pbkdf2` | | | Uses `PBKDF2` key derivation function with `HMAC-SHA512` as a
  86. pseudorandom function using 10000 iterations.
  87. | `pbkdf2_1000` | | | Uses `PBKDF2` key derivation function with `HMAC-SHA512` as a
  88. pseudorandom function using 1000 iterations.
  89. | `pbkdf2_10000` | | | Uses `PBKDF2` key derivation function with `HMAC-SHA512` as a
  90. pseudorandom function using 10000 iterations.
  91. | `pbkdf2_50000` | | | Uses `PBKDF2` key derivation function with `HMAC-SHA512` as a
  92. pseudorandom function using 50000 iterations.
  93. | `pbkdf2_100000` | | | Uses `PBKDF2` key derivation function with `HMAC-SHA512` as a
  94. pseudorandom function using 100000 iterations.
  95. | `pbkdf2_500000` | | | Uses `PBKDF2` key derivation function with `HMAC-SHA512` as a
  96. pseudorandom function using 500000 iterations.
  97. | `pbkdf2_1000000` | | | Uses `PBKDF2` key derivation function with `HMAC-SHA512` as a
  98. pseudorandom function using 1000000 iterations.
  99. | `pbkdf2_stretch` | | | Uses `PBKDF2` key derivation function with `HMAC-SHA512` as a
  100. pseudorandom function using 10000 iterations, after hashing the
  101. initial input with SHA512 first.
  102. | `pbkdf2_stretch_1000` | | | Uses `PBKDF2` key derivation function with `HMAC-SHA512` as a
  103. pseudorandom function using 1000 iterations, after hashing the
  104. initial input with SHA512 first.
  105. | `pbkdf2_stretch_10000` | | | Uses `PBKDF2` key derivation function with `HMAC-SHA512` as a
  106. pseudorandom function using 10000 iterations, after hashing the
  107. initial input with SHA512 first.
  108. | `pbkdf2_stretch_50000` | | | Uses `PBKDF2` key derivation function with `HMAC-SHA512` as a
  109. pseudorandom function using 50000 iterations, after hashing the
  110. initial input with SHA512 first.
  111. | `pbkdf2_stretch_100000` | | | Uses `PBKDF2` key derivation function with `HMAC-SHA512` as a
  112. pseudorandom function using 100000 iterations, after hashing the
  113. initial input with SHA512 first.
  114. | `pbkdf2_stretch_500000` | | | Uses `PBKDF2` key derivation function with `HMAC-SHA512` as a
  115. pseudorandom function using 500000 iterations, after hashing the
  116. initial input with SHA512 first.
  117. | `pbkdf2_stretch_1000000`| | | Uses `PBKDF2` key derivation function with `HMAC-SHA512` as a
  118. pseudorandom function using 1000000 iterations, after hashing the
  119. initial input with SHA512 first.
  120. |=======================