security.asciidoc 13 KB

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