security.asciidoc 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340
  1. [discrete]
  2. [[breaking_80_security_changes]]
  3. ==== Security changes
  4. //NOTE: The notable-breaking-changes tagged regions are re-used in the
  5. //Installation and Upgrade Guide
  6. //tag::notable-breaking-changes[]
  7. .The realm `order` setting is now required.
  8. [%collapsible]
  9. ====
  10. *Details* +
  11. The `xpack.security.authc.realms.{type}.{name}.order` setting is now required and must be
  12. specified for each explicitly configured realm. Each value must be unique.
  13. *Impact* +
  14. The cluster will fail to start if the requirements are not met.
  15. For example, the following configuration is invalid:
  16. [source,yaml]
  17. --------------------------------------------------
  18. xpack.security.authc.realms.kerberos.kerb1:
  19. keytab.path: es.keytab
  20. remove_realm_name: false
  21. --------------------------------------------------
  22. And must be configured as:
  23. [source,yaml]
  24. --------------------------------------------------
  25. xpack.security.authc.realms.kerberos.kerb1:
  26. order: 0
  27. keytab.path: es.keytab
  28. remove_realm_name: false
  29. --------------------------------------------------
  30. ====
  31. [[audit-logs-are-rolled-over-and-archived-by-size]]
  32. .Audit logs are rolled-over and archived by size.
  33. [%collapsible]
  34. ====
  35. *Details* +
  36. In addition to the existing daily rollover, the security audit logs are
  37. now rolled-over by disk size limit as well. Moreover, the rolled-over logs
  38. are also gzip compressed.
  39. *Impact* +
  40. The names of rolled over audit logfiles (but not the name of the current log)
  41. have changed.
  42. If you've setup automated tools to consume these files, you must configure them
  43. to use the new names and to possibly account for gzip archives instead of plaintext.
  44. The Docker build of Elasticsearch is not affected since it logs on stdout where
  45. rollover is not performed.
  46. ====
  47. [[accept-default-password-removed]]
  48. .The `accept_default_password` setting has been removed.
  49. [%collapsible]
  50. ====
  51. *Details* +
  52. The `xpack.security.authc.accept_default_password` setting has not had any affect
  53. since the 6.0 release of {es}. It has been removed and cannot be used.
  54. *Impact* +
  55. Discontinue use of the `xpack.security.authc.accept_default_password` setting.
  56. Specifying this setting in `elasticsearch.yml` will result in an error on
  57. startup.
  58. ====
  59. [[roles-index-cache-removed]]
  60. .The `roles.index.cache.*` settings have been removed.
  61. [%collapsible]
  62. ====
  63. *Details* +
  64. The `xpack.security.authz.store.roles.index.cache.max_size` and
  65. `xpack.security.authz.store.roles.index.cache.ttl` settings have
  66. been removed. These settings have been redundant and deprecated
  67. since the 5.2 release of {es}.
  68. *Impact* +
  69. Discontinue use of the `xpack.security.authz.store.roles.index.cache.max_size`
  70. and `xpack.security.authz.store.roles.index.cache.ttl` settings. Specifying
  71. these settings in `elasticsearch.yml` will result in an error on startup.
  72. ====
  73. [[migrate-tool-removed]]
  74. .The `elasticsearch-migrate` tool has been removed.
  75. [%collapsible]
  76. ====
  77. *Details* +
  78. The `elasticsearch-migrate` tool provided a way to convert file
  79. realm users and roles into the native realm. It has been deprecated
  80. since 7.2.0. Users and roles should now be created in the native
  81. realm directly.
  82. *Impact* +
  83. Discontinue use of the `elasticsearch-migrate` tool. Attempts to use the
  84. `elasticsearch-migrate` tool will result in an error.
  85. ====
  86. [[separating-node-and-client-traffic]]
  87. .The `transport.profiles.*.xpack.security.type` setting has been removed.
  88. [%collapsible]
  89. ====
  90. *Details* +
  91. The `transport.profiles.*.xpack.security.type` setting has been removed since
  92. the Transport Client has been removed and therefore all client traffic now uses
  93. the HTTP transport. Transport profiles using this setting should be removed.
  94. *Impact* +
  95. Discontinue use of the `transport.profiles.*.xpack.security.type` setting.
  96. Specifying this setting in a transport profile in `elasticsearch.yml` will
  97. result in an error on startup.
  98. ====
  99. [discrete]
  100. [[ssl-validation-changes]]
  101. ===== SSL/TLS configuration validation
  102. .The `xpack.security.transport.ssl.enabled` setting is now required to configure `xpack.security.transport.ssl` settings.
  103. [%collapsible]
  104. ====
  105. *Details* +
  106. It is now an error to configure any SSL settings for
  107. `xpack.security.transport.ssl` without also configuring
  108. `xpack.security.transport.ssl.enabled`.
  109. *Impact* +
  110. If using other `xpack.security.transport.ssl` settings, you must explicitly
  111. specify the `xpack.security.transport.ssl.enabled` setting.
  112. If you do not want to enable SSL and are currently using other
  113. `xpack.security.transport.ssl` settings, do one of the following:
  114. * Explicitly specify `xpack.security.transport.ssl.enabled` as `false`
  115. * Discontinue use of other `xpack.security.transport.ssl` settings
  116. If you want to enable SSL, follow the instructions in
  117. {ref}/configuring-tls.html#tls-transport[Encrypting communications between nodes
  118. in a cluster]. As part of this configuration, explicitly specify
  119. `xpack.security.transport.ssl.enabled` as `true`.
  120. For example, the following configuration is invalid:
  121. [source,yaml]
  122. --------------------------------------------------
  123. xpack.security.transport.ssl.keystore.path: elastic-certificates.p12
  124. xpack.security.transport.ssl.truststore.path: elastic-certificates.p12
  125. --------------------------------------------------
  126. And must be configured as:
  127. [source,yaml]
  128. --------------------------------------------------
  129. xpack.security.transport.ssl.enabled: true <1>
  130. xpack.security.transport.ssl.keystore.path: elastic-certificates.p12
  131. xpack.security.transport.ssl.truststore.path: elastic-certificates.p12
  132. --------------------------------------------------
  133. <1> or `false`.
  134. ====
  135. .The `xpack.security.http.ssl.enabled` setting is now required to configure `xpack.security.http.ssl` settings.
  136. [%collapsible]
  137. ====
  138. *Details* +
  139. It is now an error to configure any SSL settings for
  140. `xpack.security.http.ssl` without also configuring
  141. `xpack.security.http.ssl.enabled`.
  142. *Impact* +
  143. If using other `xpack.security.http.ssl` settings, you must explicitly
  144. specify the `xpack.security.http.ssl.enabled` setting.
  145. If you do not want to enable SSL and are currently using other
  146. `xpack.security.http.ssl` settings, do one of the following:
  147. * Explicitly specify `xpack.security.http.ssl.enabled` as `false`
  148. * Discontinue use of other `xpack.security.http.ssl` settings
  149. If you want to enable SSL, follow the instructions in
  150. {ref}/configuring-tls.html#tls-http[Encrypting HTTP client communications]. As part
  151. of this configuration, explicitly specify `xpack.security.http.ssl.enabled`
  152. as `true`.
  153. For example, the following configuration is invalid:
  154. [source,yaml]
  155. --------------------------------------------------
  156. xpack.security.http.ssl.certificate: elasticsearch.crt
  157. xpack.security.http.ssl.key: elasticsearch.key
  158. xpack.security.http.ssl.certificate_authorities: [ "corporate-ca.crt" ]
  159. --------------------------------------------------
  160. And must be configured as either:
  161. [source,yaml]
  162. --------------------------------------------------
  163. xpack.security.http.ssl.enabled: true <1>
  164. xpack.security.http.ssl.certificate: elasticsearch.crt
  165. xpack.security.http.ssl.key: elasticsearch.key
  166. xpack.security.http.ssl.certificate_authorities: [ "corporate-ca.crt" ]
  167. --------------------------------------------------
  168. <1> or `false`.
  169. ====
  170. .A `xpack.security.transport.ssl` certificate and key are now required to enable SSL for the transport interface.
  171. [%collapsible]
  172. ====
  173. *Details* +
  174. It is now an error to enable SSL for the transport interface without also configuring
  175. a certificate and key through use of the `xpack.security.transport.ssl.keystore.path`
  176. setting or the `xpack.security.transport.ssl.certificate` and
  177. `xpack.security.transport.ssl.key` settings.
  178. *Impact* +
  179. If `xpack.security.transport.ssl.enabled` is set to `true`, provide a
  180. certificate and key using the `xpack.security.transport.ssl.keystore.path`
  181. setting or the `xpack.security.transport.ssl.certificate` and
  182. `xpack.security.transport.ssl.key` settings. If a certificate and key is not
  183. provided, {es} will return in an error on startup.
  184. ====
  185. .A `xpack.security.http.ssl` certificate and key are now required to enable SSL for the HTTP server.
  186. [%collapsible]
  187. ====
  188. *Details* +
  189. It is now an error to enable SSL for the HTTP (Rest) server without also configuring
  190. a certificate and key through use of the `xpack.security.http.ssl.keystore.path`
  191. setting or the `xpack.security.http.ssl.certificate` and
  192. `xpack.security.http.ssl.key` settings.
  193. *Impact* +
  194. If `xpack.security.http.ssl.enabled` is set to `true`, provide a certificate and
  195. key using the `xpack.security.http.ssl.keystore.path` setting or the
  196. `xpack.security.http.ssl.certificate` and `xpack.security.http.ssl.key`
  197. settings. If certificate and key is not provided, {es} will return in an error
  198. on startup.
  199. ====
  200. [discrete]
  201. [[ssl-misc-changes]]
  202. ===== Other SSL/TLS changes
  203. .PKCS#11 keystores and trustores cannot be configured in `elasticsearch.yml`
  204. [%collapsible]
  205. ====
  206. *Details* +
  207. The settings `*.ssl.keystore.type` and `*.ssl.truststore.type` no longer accept "PKCS11" as a valid type.
  208. This applies to all SSL settings in Elasticsearch, including
  209. - `xpack.security.http.keystore.type`
  210. - `xpack.security.transport.keystore.type`
  211. - `xpack.security.http.truststore.type`
  212. - `xpack.security.transport.truststore.type`
  213. As well as SSL settings for security realms, watcher and monitoring.
  214. Use of a PKCS#11 keystore or truststore as the JRE's default store is not affected.
  215. *Impact* +
  216. If you have a PKCS#11 keystore configured within your `elasticsearch.yml` file, you must remove that
  217. configuration and switch to a supported keystore type, or configure your PKCS#11 keystore as the
  218. JRE default store.
  219. ====
  220. [discrete]
  221. [[builtin-users-changes]]
  222. ===== Changes to built-in users
  223. .The `kibana` user has been replaced by `kibana_system`.
  224. [%collapsible]
  225. ====
  226. *Details* +
  227. The `kibana` user was historically used to authenticate {kib} to {es}.
  228. The name of this user was confusing, and was often mistakenly used to login to {kib}.
  229. This has been renamed to `kibana_system` in order to reduce confusion, and to better
  230. align with other built-in system accounts.
  231. *Impact* +
  232. Replace any use of the `kibana` user with the `kibana_system` user. Specifying
  233. the `kibana` user in `kibana.yml` will result in an error on startup.
  234. If your `kibana.yml` used to contain:
  235. [source,yaml]
  236. --------------------------------------------------
  237. elasticsearch.username: kibana
  238. --------------------------------------------------
  239. then you should update to use the new `kibana_system` user instead:
  240. [source,yaml]
  241. --------------------------------------------------
  242. elasticsearch.username: kibana_system
  243. --------------------------------------------------
  244. IMPORTANT: The new `kibana_system` user does not preserve the previous `kibana`
  245. user password. You must explicitly set a password for the `kibana_system` user.
  246. ====
  247. [discrete]
  248. [[builtin-roles-changes]]
  249. ===== Changes to built-in roles
  250. .The `kibana_user` role has been renamed `kibana_admin`.
  251. [%collapsible]
  252. ====
  253. *Details* +
  254. Users who were previously assigned the `kibana_user` role should instead be assigned
  255. the `kibana_admin` role. This role grants the same set of privileges as `kibana_user`, but has been
  256. renamed to better reflect its intended use.
  257. *Impact* +
  258. Assign users with the `kibana_user` role to the `kibana_admin` role.
  259. Discontinue use of the `kibana_user` role.
  260. ====
  261. // end::notable-breaking-changes[]
  262. // These are non-notable changes
  263. [discrete]
  264. // This change is not notable because it should not have any impact on upgrades
  265. // However we document it here out of an abundance of caution
  266. [[fips-default-hash-changed]]
  267. ===== Changes to FIPS 140 mode
  268. .When FIPS mode is enabled the default password hash is now PBKDF2_STRETCH
  269. [%collapsible]
  270. ====
  271. *Details* +
  272. If `xpack.security.fips_mode.enabled` is true (see <<fips-140-compliance>>),
  273. the value of `xpack.security.authc.password_hashing.algorithm` now defaults to
  274. `pbkdf2_stretch`.
  275. In earlier versions this setting would always default to `bcrypt` and a runtime
  276. check would prevent a node from starting unless the value was explicitly set to
  277. a "pbkdf2" variant.
  278. There is no change for clusters that do not enable FIPS 140 mode.
  279. *Impact* +
  280. This change should not have any impact on upgraded nodes.
  281. Any node with an explicitly configured value for the password hashing algorithm
  282. will continue to use that configured value.
  283. Any node that did not have an explicitly configured password hashing algorithm in
  284. {es} 6.x or {es} 7.x would have failed to start.
  285. ====