security-settings.asciidoc 53 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342
  1. [role="xpack"]
  2. [[security-settings]]
  3. === Security settings in {es}
  4. ++++
  5. <titleabbrev>Security settings</titleabbrev>
  6. ++++
  7. By default, {security} is disabled when you have a basic or trial license. To
  8. enable {security}, use the `xpack.security.enabled` setting.
  9. You configure `xpack.security` settings to
  10. <<anonymous-access-settings, enable anonymous access>>
  11. and perform message authentication,
  12. <<field-document-security-settings, set up document and field level security>>,
  13. <<realm-settings, configure realms>>,
  14. <<ssl-tls-settings, encrypt communications with SSL>>, and
  15. <<auditing-settings, audit security events>>.
  16. All of these settings can be added to the `elasticsearch.yml` configuration file,
  17. with the exception of the secure settings, which you add to the {es} keystore.
  18. For more information about creating and updating the {es} keystore, see
  19. <<secure-settings>>.
  20. [float]
  21. [[general-security-settings]]
  22. ==== General security settings
  23. `xpack.security.enabled`::
  24. Set to `true` to enable {security} on the node. +
  25. +
  26. --
  27. If set to `false`, which is the default value for basic and trial licenses,
  28. {security} is disabled. It also affects all {kib} instances that connect to this
  29. {es} instance; you do not need to disable {security} in those `kibana.yml` files.
  30. For more information about disabling {security} in specific {kib} instances, see {kibana-ref}/security-settings-kb.html[{kib} security settings].
  31. TIP: If you have gold or higher licenses, the default value is `true`; we
  32. recommend that you explicitly add this setting to avoid confusion.
  33. --
  34. `xpack.security.hide_settings`::
  35. A comma-separated list of settings that are omitted from the results of the
  36. <<cluster-nodes-info,cluster nodes info API>>. You can use wildcards to include
  37. multiple settings in the list. For example, the following value hides all the
  38. settings for the ad1 realm: `xpack.security.authc.realms.ad1.*`. The API already
  39. omits all `ssl` settings, `bind_dn`, and `bind_password` due to the
  40. sensitive nature of the information.
  41. [float]
  42. [[password-security-settings]]
  43. ==== Default password security settings
  44. `xpack.security.authc.accept_default_password`::
  45. In `elasticsearch.yml`, set this to `false` to disable support for the default "changeme" password.
  46. [[password-hashing-settings]]
  47. ==== Password hashing settings
  48. `xpack.security.authc.password_hashing.algorithm`::
  49. Specifies the hashing algorithm that is used for secure user credential storage.
  50. See <<password-hashing-algorithms>>. Defaults to `bcrypt`.
  51. [float]
  52. [[anonymous-access-settings]]
  53. ==== Anonymous access settings
  54. You can configure the following anonymous access settings in
  55. `elasticsearch.yml`. For more information, see {xpack-ref}/anonymous-access.html[
  56. Enabling anonymous access].
  57. `xpack.security.authc.anonymous.username`::
  58. The username (principal) of the anonymous user. Defaults to `_es_anonymous_user`.
  59. `xpack.security.authc.anonymous.roles`::
  60. The roles to associate with the anonymous user. Required.
  61. `xpack.security.authc.anonymous.authz_exception`::
  62. When `true`, an HTTP 403 response is returned if the anonymous user
  63. does not have the appropriate permissions for the requested action. The
  64. user is not prompted to provide credentials to access the requested
  65. resource. When set to `false`, a HTTP 401 is returned and the user
  66. can provide credentials with the appropriate permissions to gain
  67. access. Defaults to `true`.
  68. [float]
  69. [[field-document-security-settings]]
  70. ==== Document and field level security settings
  71. You can set the following document and field level security
  72. settings in `elasticsearch.yml`. For more information, see
  73. {xpack-ref}/field-and-document-access-control.html[Setting up document and field
  74. level security].
  75. `xpack.security.dls_fls.enabled`::
  76. Set to `false` to prevent document and field level security
  77. from being configured. Defaults to `true`.
  78. [float]
  79. [[token-service-settings]]
  80. ==== Token service settings
  81. You can set the following token service settings in
  82. `elasticsearch.yml`.
  83. `xpack.security.authc.token.enabled`::
  84. Set to `false` to disable the built-in token service. Defaults to `true` unless
  85. `xpack.security.http.ssl.enabled` is `false`. This prevents sniffing the token
  86. from a connection over plain http.
  87. `xpack.security.authc.token.timeout`::
  88. The length of time that a token is valid for. By default this value is `20m` or
  89. 20 minutes. The maximum value is 1 hour.
  90. [float]
  91. [[realm-settings]]
  92. ==== Realm settings
  93. You configure realm settings in the `xpack.security.authc.realms`
  94. namespace in `elasticsearch.yml`. For example:
  95. [source,yaml]
  96. ----------------------------------------
  97. xpack.security.authc.realms:
  98. realm1:
  99. type: native
  100. order: 0
  101. ...
  102. realm2:
  103. type: ldap
  104. order: 1
  105. ...
  106. realm3:
  107. type: active_directory
  108. order: 2
  109. ...
  110. ...
  111. ----------------------------------------
  112. The valid settings vary depending on the realm type. For more
  113. information, see {xpack-ref}/setting-up-authentication.html[Setting up authentication].
  114. [float]
  115. [[ref-realm-settings]]
  116. ===== Settings valid for all realms
  117. `type`::
  118. The type of the realm: `native, `ldap`, `active_directory`, `pki`, or `file`. Required.
  119. `order`::
  120. The priority of the realm within the realm chain. Realms with a lower order are
  121. consulted first. Although not required, use of this setting is strongly
  122. recommended when you configure multiple realms. Defaults to `Integer.MAX_VALUE`.
  123. `enabled`::
  124. Indicates whether a realm is enabled. You can use this setting to disable a
  125. realm without removing its configuration information. Defaults to `true`.
  126. [[ref-native-settings]]
  127. [float]
  128. ===== Native realm settings
  129. For a native realm, the `type` must be set to `native`. In addition to the
  130. <<ref-realm-settings,settings that are valid for all realms>>, you can specify
  131. the following optional settings:
  132. `cache.ttl`:: The time-to-live for cached user entries. A user and a hash of its
  133. credentials are cached for this period of time. Specify the time period using
  134. the standard {es} <<time-units,time units>>. Defaults to `20m`.
  135. `cache.max_users`:: The maximum number of user entries that can live in the
  136. cache at any given time. Defaults to 100,000.
  137. `cache.hash_algo`:: (Expert Setting) The hashing algorithm that is used for the
  138. in-memory cached user credentials. For possible values, see <<cache-hash-algo>>.
  139. Defaults to `ssha256`.
  140. [[ref-users-settings]]
  141. [float]
  142. ===== File realm settings
  143. The `type` setting must be set to `file`. In addition to the
  144. <<ref-realm-settings,settings that are valid for all realms>>, you can specify
  145. the following settings:
  146. `cache.ttl`::
  147. The time-to-live for cached user entries. A user and a hash of its credentials
  148. are cached for this configured period of time. Defaults to `20m`. Specify values
  149. using the standard {es} {ref}/common-options.html#time-units[time units].
  150. Defaults to `20m`.
  151. `cache.max_users`::
  152. The maximum number of user entries that can live in the cache at a given time.
  153. Defaults to 100,000.
  154. `cache.hash_algo`::
  155. (Expert Setting) The hashing algorithm that is used for the in-memory cached
  156. user credentials. See <<cache-hash-algo>>. Defaults to `ssha256`.
  157. [[ref-ldap-settings]]
  158. [float]
  159. ===== LDAP realm settings
  160. The `type` setting must be set to `ldap`. In addition to the
  161. <<ref-realm-settings>>, you can specify the following settings:
  162. `url`:: Specifies one or more LDAP URLs in the format
  163. `ldap[s]://<server>:<port>`. Multiple URLs can be defined using a comma
  164. separated value or array syntax: `[ "ldaps://server1:636", "ldaps://server2:636" ]`.
  165. `ldaps` and `ldap` URL protocols cannot be mixed in the same realm. Required.
  166. `load_balance.type`::
  167. The behavior to use when there are multiple LDAP URLs defined. For supported
  168. values see <<load-balancing,load balancing and failover types>>.
  169. Defaults to `failover`.
  170. `load_balance.cache_ttl`::
  171. When using `dns_failover` or `dns_round_robin` as the load balancing type,
  172. this setting controls the amount of time to cache DNS lookups. Defaults
  173. to `1h`.
  174. `bind_dn`::
  175. The DN of the user that is used to bind to the LDAP and perform searches.
  176. Only applicable in user search mode.
  177. If not specified, an anonymous bind is attempted.
  178. Defaults to Empty. Due to its potential security impact, `bind_dn` is not
  179. exposed via the <<cluster-nodes-info,nodes info API>>.
  180. `bind_password`::
  181. deprecated[6.3] Use `secure_bind_password` instead. The password for the user
  182. that is used to bind to the LDAP directory.
  183. Defaults to Empty. Due to its potential security impact, `bind_password` is not
  184. exposed via the <<cluster-nodes-info,nodes info API>>.
  185. `secure_bind_password` (<<secure-settings,Secure>>)::
  186. The password for the user that is used to bind to the LDAP directory.
  187. Defaults to Empty.
  188. `user_dn_templates`::
  189. The DN template that replaces the user name with the string `{0}`.
  190. This setting is multivalued; you can specify multiple user contexts.
  191. Required to operate in user template mode. If `user_search.base_dn` is specified,
  192. this setting is not valid. For more information on
  193. the different modes, see {xpack-ref}/ldap-realm.html[LDAP realms].
  194. +
  195. --
  196. NOTE: If any settings starting with `user_search` are specified, the
  197. `user_dn_templates` settings are ignored.
  198. --
  199. `user_group_attribute`::
  200. Specifies the attribute to examine on the user for group membership.
  201. If any `group_search` settings are specified, this setting is ignored. Defaults
  202. to `memberOf`.
  203. `user_search.base_dn`::
  204. Specifies a container DN to search for users. Required
  205. to operated in user search mode. If `user_dn_templates` is specified, this
  206. setting is not valid. For more information on
  207. the different modes, see {xpack-ref}/ldap-realm.html[LDAP realms].
  208. `user_search.scope`::
  209. The scope of the user search. Valid values are `sub_tree`, `one_level` or
  210. `base`. `one_level` only searches objects directly contained within the
  211. `base_dn`. `sub_tree` searches all objects contained under `base_dn`.
  212. `base` specifies that the `base_dn` is the user object, and that it is
  213. the only user considered. Defaults to `sub_tree`.
  214. `user_search.filter`::
  215. Specifies the filter used to search the directory in attempts to match
  216. an entry with the username provided by the user. Defaults to `(uid={0})`.
  217. `{0}` is substituted with the username provided when searching.
  218. `user_search.attribute`::
  219. deprecated[5.6] Use `user_search.filter` instead.
  220. The attribute to match with the username sent with the request. Defaults to `uid`.
  221. `user_search.pool.enabled`::
  222. Enables or disables connection pooling for user search. If set to `false`, a new
  223. connection is created for every search. The
  224. default is `true` when `bind_dn` is set.
  225. `user_search.pool.size`::
  226. The maximum number of connections to the LDAP server to allow in the
  227. connection pool. Defaults to `20`.
  228. `user_search.pool.initial_size`::
  229. The initial number of connections to create to the LDAP server on startup.
  230. Defaults to `0`. If the LDAP server is down, values greater than `0` could cause
  231. startup failures.
  232. `user_search.pool.health_check.enabled`::
  233. Enables or disables a health check on LDAP connections in the connection
  234. pool. Connections are checked in the background at the specified interval.
  235. Defaults to `true`.
  236. `user_search.pool.health_check.dn`::
  237. The distinguished name that is retrieved as part of the health check.
  238. Defaults to the value of `bind_dn` if present; if
  239. not, falls back to `user_search.base_dn`.
  240. `user_search.pool.health_check.interval`::
  241. The interval to perform background checks of connections in the pool.
  242. Defaults to `60s`.
  243. `group_search.base_dn`::
  244. The container DN to search for groups in which the user has membership. When
  245. this element is absent, {security} searches for the attribute specified by
  246. `user_group_attribute` set on the user in order to determine group membership.
  247. `group_search.scope`::
  248. Specifies whether the group search should be `sub_tree`, `one_level` or
  249. `base`. `one_level` only searches objects directly contained within the
  250. `base_dn`. `sub_tree` searches all objects contained under `base_dn`.
  251. `base` specifies that the `base_dn` is a group object, and that it is the
  252. only group considered. Defaults to `sub_tree`.
  253. `group_search.filter`::
  254. Specifies a filter to use to look up a group.
  255. When not set, the realm searches for `group`, `groupOfNames`, `groupOfUniqueNames`,
  256. or `posixGroup` with the attributes `member`, `memberOf`, or `memberUid`. Any
  257. instance of `{0}` in the filter is replaced by the user attribute defined in
  258. `group_search.user_attribute`.
  259. `group_search.user_attribute`::
  260. Specifies the user attribute that is fetched and provided as a parameter to
  261. the filter. If not set, the user DN is passed into the filter. Defaults to Empty.
  262. `unmapped_groups_as_roles`::
  263. If set to `true`, the names of any unmapped LDAP groups are used as role names
  264. and assigned to the user. A group is considered to be _unmapped_ if it is not
  265. not referenced in a
  266. {xpack-ref}/mapping-roles.html#mapping-roles-file[role-mapping file]. API-based
  267. role mappings are not considered. Defaults to `false`.
  268. `files.role_mapping`::
  269. The {xpack-ref}/security-files.html[location] for the {xpack-ref}/mapping-roles.html#mapping-roles[
  270. YAML role mapping configuration file]. Defaults to
  271. `ES_PATH_CONF/role_mapping.yml`.
  272. `follow_referrals`::
  273. Specifies whether {security} should follow referrals returned
  274. by the LDAP server. Referrals are URLs returned by the server that are to be
  275. used to continue the LDAP operation (for example, search). Defaults to `true`.
  276. `metadata`::
  277. A list of additional LDAP attributes that should be loaded from the
  278. LDAP server and stored in the authenticated user's metadata field.
  279. `timeout.tcp_connect`::
  280. The TCP connect timeout period for establishing an LDAP connection.
  281. An `s` at the end indicates seconds, or `ms` indicates milliseconds.
  282. Defaults to `5s` (5 seconds ).
  283. `timeout.tcp_read`::
  284. The TCP read timeout period after establishing an LDAP connection.
  285. An `s` at the end indicates seconds, or `ms` indicates milliseconds.
  286. Defaults to `5s` (5 seconds ).
  287. `timeout.ldap_search`::
  288. The LDAP Server enforced timeout period for an LDAP search.
  289. An `s` at the end indicates seconds, or `ms` indicates milliseconds.
  290. Defaults to `5s` (5 seconds ).
  291. `ssl.key`::
  292. Path to a PEM encoded file containing the private key, which is used if the
  293. LDAP server requires client authentication. `ssl.key` and `ssl.keystore.path`
  294. cannot be used at the same time.
  295. `ssl.key_passphrase`::
  296. The passphrase that is used to decrypt the private key. This value is
  297. optional as the key may not be encrypted.
  298. `ssl.secure_key_passphrase` (<<secure-settings,Secure>>)::
  299. The passphrase that is used to decrypt the private key.
  300. `ssl.certificate`::
  301. Path to a PEM encoded file containing the certificate (or certificate chain)
  302. that will be presented to clients when they connect.
  303. `ssl.certificate_authorities`::
  304. List of paths to PEM encoded certificate files that should be trusted.
  305. `ssl.certificate_authorities` and `ssl.truststore.path` cannot be used at the
  306. same time.
  307. `ssl.keystore.path`::
  308. The path to the Java Keystore file that contains a private key and certificate.
  309. `ssl.key` and `ssl.keystore.path` may not be used at the same time.
  310. `ssl.keystore.type`::
  311. The format of the keystore file. Should be either `jks` to use the Java
  312. Keystore format, or `PKCS12` to use PKCS#12 files. The default is `jks`.
  313. `ssl.keystore.password`::
  314. The password to the keystore.
  315. `ssl.keystore.secure_password` (<<secure-settings,Secure>>)::
  316. The password to the keystore.
  317. `ssl.keystore.key_password`::
  318. The password for the key in the keystore. Defaults to the keystore password.
  319. `ssl.keystore.secure_key_password`::
  320. The password for the key in the keystore. Defaults to the keystore password.
  321. `ssl.truststore.path`::
  322. The path to the Java Keystore file that contains the certificates to trust.
  323. `ssl.certificate_authorities` and `ssl.truststore.path` cannot be used at the same time.
  324. `ssl.truststore.password`::
  325. The password to the truststore.
  326. `ssl.truststore.secure_password` (<<secure-settings,Secure>>)::
  327. The password to the truststore.
  328. `ssl.truststore.type`::
  329. The format of the keystore file. Should be either `jks` to use the Java
  330. Keystore format, or `PKCS12` to use PKCS#12 files. The default is `jks`.
  331. `ssl.verification_mode`::
  332. Indicates the type of verification when using `ldaps` to protect against man
  333. in the middle attacks and certificate forgery. Values are `none`, `certificate`,
  334. and `full`. Defaults to the value of `xpack.ssl.verification_mode`.
  335. +
  336. See <<ssl-tls-settings,`xpack.ssl.verification_mode`>> for an explanation of
  337. these values.
  338. `ssl.supported_protocols`::
  339. Supported protocols for TLS/SSL (with versions). Defaults to the value of
  340. `xpack.ssl.supported_protocols`.
  341. `ssl.cipher_suites`:: Specifies the cipher suites that should be supported when
  342. communicating with the LDAP server.
  343. Supported cipher suites can be found in Oracle's http://docs.oracle.com/javase/8/docs/technotes/guides/security/SunProviders.html[
  344. Java Cryptography Architecture documentation]. Defaults to the value of
  345. `xpack.ssl.cipher_suites`.
  346. `cache.ttl`::
  347. Specifies the time-to-live for cached user entries. A user and a hash of its
  348. credentials are cached for this period of time. Use the standard {es}
  349. <<time-units,time units>>. Defaults to `20m`.
  350. `cache.max_users`::
  351. Specifies the maximum number of user entries that the cache can contain.
  352. Defaults to `100000`.
  353. `cache.hash_algo`::
  354. (Expert Setting) Specifies the hashing algorithm that is used for the
  355. in-memory cached user credentials. See <<cache-hash-algo>>. Defaults to `ssha256`.
  356. [[ref-ad-settings]]
  357. [float]
  358. ===== Active Directory realm settings
  359. The `type` setting must be set to `active_directory`. In addition to the
  360. <<ref-realm-settings,settings that are valid for all realms>>, you can specify
  361. the following settings:
  362. `url`::
  363. An LDAP URL of the form `ldap[s]://<server>:<port>`. {security} attempts to
  364. authenticate against this URL. If the URL is not specified, it is derived from
  365. the `domain_name` setting and assumes an unencrypted connection to port 389.
  366. Defaults to `ldap://<domain_name>:389`. This setting is required when connecting
  367. using SSL/TLS or when using a custom port.
  368. `load_balance.type`::
  369. The behavior to use when there are multiple LDAP URLs defined. For supported
  370. values see <<load-balancing,load balancing and failover types>>.
  371. Defaults to `failover`.
  372. `load_balance.cache_ttl`::
  373. When using `dns_failover` or `dns_round_robin` as the load balancing type,
  374. this setting controls the amount of time to cache DNS lookups. Defaults
  375. to `1h`.
  376. `domain_name`::
  377. The domain name of Active Directory. If the the `url` and `user_search_dn`
  378. settings are not specified, the cluster can derive those values from this
  379. setting. Required.
  380. `bind_dn`::
  381. The DN of the user that is used to bind to Active Directory and perform searches.
  382. Defaults to Empty. Due to its potential security impact, `bind_dn` is not
  383. exposed via the <<cluster-nodes-info,nodes info API>>.
  384. `bind_password`::
  385. deprecated[6.3] Use `secure_bind_password` instead. The password for the user
  386. that is used to bind to Active Directory. Defaults to Empty. Due to its
  387. potential security impact, `bind_password` is not exposed via the
  388. <<cluster-nodes-info,nodes info API>>.
  389. `secure_bind_password` (<<secure-settings,Secure>>)::
  390. The password for the user that is used to bind to Active Directory.
  391. Defaults to Empty.
  392. `unmapped_groups_as_roles`::
  393. If set to `true`, the names of any unmapped Active Directory groups are used as
  394. role names and assigned to the user. A group is considered _unmapped_ when it
  395. is not referenced in any role-mapping files. API-based role mappings are not
  396. considered. Defaults to `false`.
  397. `files.role_mapping`::
  398. The {xpack-ref}/security-files.html[location] for the YAML
  399. role mapping configuration file. Defaults to `ES_PATH_CONF/role_mapping.yml`.
  400. `user_search.base_dn`::
  401. The context to search for a user. Defaults to the root
  402. of the Active Directory domain.
  403. `user_search.scope`::
  404. Specifies whether the user search should be `sub_tree`, `one_level` or `base`.
  405. `one_level` only searches users directly contained within the `base_dn`.
  406. `sub_tree` searches all objects contained under `base_dn`. `base`
  407. specifies that the `base_dn` is a user object, and that it is the
  408. only user considered. Defaults to `sub_tree`.
  409. `user_search.filter`::
  410. Specifies a filter to use to lookup a user given a username. The default
  411. filter looks up `user` objects with either `sAMAccountName` or
  412. `userPrincipalName`. If specified, this must be a valid LDAP user search filter.
  413. For example `(&(objectClass=user)(sAMAccountName={0}))`. For more information,
  414. see
  415. https://msdn.microsoft.com/en-us/library/aa746475(v=vs.85).aspx[Search Filter Syntax].
  416. `user_search.upn_filter`::
  417. Specifies a filter to use to lookup a user given a user principal name.
  418. The default filter looks up `user` objects with
  419. a matching `userPrincipalName`. If specified, this
  420. must be a valid LDAP user search filter. For example,
  421. `(&(objectClass=user)(userPrincipalName={1}))`. `{1}` is the full user principal name
  422. provided by the user. For more information, see
  423. https://msdn.microsoft.com/en-us/library/aa746475(v=vs.85).aspx[Search Filter Syntax].
  424. `user_search.down_level_filter`::
  425. Specifies a filter to use to lookup a user given a down level logon name
  426. (DOMAIN\user). The default filter looks up `user` objects with a matching
  427. `sAMAccountName` in the domain provided. If specified, this
  428. must be a valid LDAP user search filter. For example,
  429. `(&(objectClass=user)(sAMAccountName={0}))`. For more information, see
  430. https://msdn.microsoft.com/en-us/library/aa746475(v=vs.85).aspx[Search Filter Syntax].
  431. `user_search.pool.enabled`::
  432. Enables or disables connection pooling for user search. When
  433. disabled a new connection is created for every search. The
  434. default is `true` when `bind_dn` is provided.
  435. `user_search.pool.size`::
  436. The maximum number of connections to the Active Directory server to allow in the
  437. connection pool. Defaults to `20`.
  438. `user_search.pool.initial_size`::
  439. The initial number of connections to create to the Active Directory server on startup.
  440. Defaults to `0`. If the LDAP server is down, values greater than 0
  441. could cause startup failures.
  442. `user_search.pool.health_check.enabled`::
  443. Enables or disables a health check on Active Directory connections in the connection
  444. pool. Connections are checked in the background at the specified interval.
  445. Defaults to `true`.
  446. `user_search.pool.health_check.dn`::
  447. The distinguished name to be retrieved as part of the health check.
  448. Defaults to the value of `bind_dn` if that setting is present. Otherwise, it
  449. defaults to the value of the `user_search.base_dn` setting.
  450. `user_search.pool.health_check.interval`::
  451. The interval to perform background checks of connections in the pool.
  452. Defaults to `60s`.
  453. `group_search.base_dn`::
  454. The context to search for groups in which the user has membership. Defaults
  455. to the root of the Active Directory domain.
  456. `group_search.scope`::
  457. Specifies whether the group search should be `sub_tree`, `one_level` or
  458. `base`. `one_level` searches for groups directly contained within the
  459. `base_dn`. `sub_tree` searches all objects contained under `base_dn`.
  460. `base` specifies that the `base_dn` is a group object, and that it is
  461. the only group considered. Defaults to `sub_tree`.
  462. `metadata`::
  463. A list of additional LDAP attributes that should be loaded from the
  464. LDAP server and stored in the authenticated user's metadata field.
  465. `timeout.tcp_connect`::
  466. The TCP connect timeout period for establishing an LDAP connection.
  467. An `s` at the end indicates seconds, or `ms` indicates milliseconds.
  468. Defaults to `5s` (5 seconds ).
  469. `timeout.tcp_read`::
  470. The TCP read timeout period after establishing an LDAP connection.
  471. An `s` at the end indicates seconds, or `ms` indicates milliseconds.
  472. Defaults to `5s` (5 seconds ).
  473. `timeout.ldap_search`::
  474. The LDAP Server enforced timeout period for an LDAP search.
  475. An `s` at the end indicates seconds, or `ms` indicates milliseconds.
  476. Defaults to `5s` (5 seconds ).
  477. `ssl.certificate`::
  478. Path to a PEM encoded file containing the certificate (or certificate chain)
  479. that will be presented to clients when they connect.
  480. `ssl.certificate_authorities`::
  481. List of paths to PEM encoded certificate files that should be trusted.
  482. `ssl.certificate_authorities` and `ssl.truststore.path` cannot be used at the
  483. same time.
  484. `ssl.key`::
  485. Path to the PEM encoded file containing the private key, which is used when the
  486. Active Directory server requires client authentication. `ssl.key` and
  487. `ssl.keystore.path` cannot be used at the same time.
  488. `ssl.key_passphrase`::
  489. The passphrase that is used to decrypt the private key. This value is
  490. optional as the key might not be encrypted.
  491. `ssl.secure_key_passphrase` (<<secure-settings,Secure>>)::
  492. The passphrase that is used to decrypt the private key. This value is
  493. optional as the key might not be encrypted.
  494. `ssl.keystore.key_password`::
  495. The password for the key in the keystore. Defaults to the keystore password.
  496. `ssl.keystore.secure_key_password` (<<secure-settings,Secure>>)::
  497. The password for the key in the keystore. Defaults to the keystore password.
  498. `ssl.keystore.password`::
  499. The password to the keystore.
  500. `ssl.secure_keystore.password` (<<secure-settings,Secure>>)::
  501. The password to the keystore.
  502. `ssl.keystore.path`::
  503. The path to the Java Keystore file that contains a private key and certificate.
  504. `ssl.key` and `ssl.keystore.path` cannot be used at the same time.
  505. `ssl.keystore.type`::
  506. The format of the keystore file. Should be either `jks` to use the Java
  507. Keystore format, or `PKCS12` to use PKCS#12 files. The default is `jks`.
  508. `ssl.truststore.password`::
  509. The password to the truststore.
  510. `ssl.truststore.secure_password` (<<secure-settings,Secure>>)::
  511. The password to the truststore.
  512. `ssl.truststore.path`::
  513. The path to the Java Keystore file that contains the certificates to trust.
  514. `ssl.certificate_authorities` and `ssl.truststore.path` cannot be used at the
  515. same time.
  516. `ssl.truststore.type`::
  517. The format of the truststore file. Should be either `jks` to use the Java
  518. Keystore format, or `PKCS12` to use PKCS#12 files. The default is `jks`.
  519. `ssl.verification_mode`::
  520. Indicates the type of verification when using `ldaps` to protect against man
  521. in the middle attacks and certificate forgery. Values are `none`, `certificate`,
  522. and `full`. Defaults to the value of `xpack.ssl.verification_mode`.
  523. +
  524. See <<ssl-tls-settings,`xpack.ssl.verification_mode`>> for an explanation of
  525. these values.
  526. `ssl.supported_protocols`::
  527. Supported protocols for TLS/SSL (with versions). Defaults to the value of
  528. `xpack.ssl.supported_protocols`.
  529. `ssl.cipher_suites`:: Specifies the cipher suites that should be supported when
  530. communicating with the Active Directory server.
  531. Supported cipher suites can be found in Oracle's http://docs.oracle.com/javase/8/docs/technotes/guides/security/SunProviders.html[
  532. Java Cryptography Architecture documentation]. Defaults to the value of
  533. `xpack.ssl.cipher_suites`.
  534. `cache.ttl`::
  535. Specifies the time-to-live for cached user entries. A user and a hash of its
  536. credentials are cached for this configured period of time. Use the
  537. standard Elasticsearch {ref}/common-options.html#time-units[time units]).
  538. Defaults to `20m`.
  539. `cache.max_users`::
  540. Specifies the maximum number of user entries that the cache can contain.
  541. Defaults to `100000`.
  542. `cache.hash_algo`::
  543. (Expert Setting) Specifies the hashing algorithm that is used for
  544. the in-memory cached user credentials. See <<cache-hash-algo>>. Defaults to `ssha256`.
  545. `follow_referrals`::
  546. If set to `true` {security} follows referrals returned by the LDAP server.
  547. Referrals are URLs returned by the server that are to be used to continue the
  548. LDAP operation (such as `search`). Defaults to `true`.
  549. [[ref-pki-settings]]
  550. [float]
  551. ===== PKI realm settings
  552. The `type` setting must be set to `pki`. In addition to the
  553. <<ref-realm-settings,settings that are valid for all realms>>, you can specify
  554. the following settings:
  555. `username_pattern`::
  556. The regular expression pattern used to extract the username from the
  557. certificate DN. The first match group is the used as the username.
  558. Defaults to `CN=(.*?)(?:,\|$)`.
  559. `certificate_authorities`::
  560. List of paths to the PEM certificate files that should be used to authenticate a
  561. user's certificate as trusted. Defaults to the trusted certificates configured
  562. for SSL. This setting cannot be used with `truststore.path`.
  563. `truststore.algorithm`::
  564. Algorithm for the truststore. Defaults to `SunX509`.
  565. `truststore.password`::
  566. The password for the truststore. Must be provided if `truststore.path` is set.
  567. `truststore.secure_password` (<<secure-settings,Secure>>)::
  568. The password for the truststore.
  569. `truststore.path`::
  570. The path of a truststore to use. Defaults to the trusted certificates configured
  571. for SSL. This setting cannot be used with `certificate_authorities`.
  572. `files.role_mapping`::
  573. Specifies the {xpack-ref}/security-files.html[location] of the
  574. {xpack-ref}/mapping-roles.html[YAML role mapping configuration file].
  575. Defaults to `ES_PATH_CONF/role_mapping.yml`.
  576. `cache.ttl`::
  577. Specifies the time-to-live for cached user entries. A user and a hash of its
  578. credentials are cached for this period of time. Use the
  579. standard {es} {ref}/common-options.html#time-units[time units]).
  580. Defaults to `20m`.
  581. `cache.max_users`::
  582. Specifies the maximum number of user entries that the cache can contain.
  583. Defaults to `100000`.
  584. [[ref-saml-settings]]
  585. [float]
  586. ===== SAML realm settings
  587. The `type` setting must be set to `saml`. In addition to the
  588. <<ref-realm-settings,settings that are valid for all realms>>, you can specify
  589. the following settings:
  590. `idp.entity_id`::
  591. The Entity ID of the SAML Identity Provider. An Entity ID is a URI with a
  592. maximum length of 1024 characters. It can be a URL (https://idp.example.com/) or
  593. a URN (`urn:example.com:idp`) and can be found in the configuration or the SAML
  594. metadata of the Identity Provider.
  595. `idp.metadata.path`::
  596. The path _(recommended)_ or URL to a SAML 2.0 metadata file describing the
  597. capabilities and configuration of the Identity Provider.
  598. If a path is provided, then it is resolved relative to the {es} config
  599. directory.
  600. If a URL is provided, then it must be either a `file` URL or a `https` URL.
  601. {security} automatically polls this metadata resource and reloads
  602. the IdP configuration when changes are detected.
  603. File based resources are polled at a frequency determined by the global {es}
  604. `resource.reload.interval.high` setting, which defaults to 5 seconds.
  605. HTTPS resources are polled at a frequency determined by the realm's
  606. `idp.metadata.http.refresh` setting.
  607. `idp.metadata.http.refresh`::
  608. Controls the frequency with which `https` metadata is checked for changes.
  609. Defaults to `1h` (1 hour).
  610. `idp.use_single_logout`::
  611. Indicates whether to utilise the Identity Provider's Single Logout service
  612. (if one exists in the IdP metadata file).
  613. Defaults to `true`.
  614. `sp.entity_id`::
  615. The Entity ID to use for this SAML Service Provider. This should be entered as a
  616. URI. We recommend that you use the base URL of your Kibana instance. For example,
  617. `https://kibana.example.com/`.
  618. `sp.acs`::
  619. The URL of the Assertion Consumer Service within {kib}. Typically this is the
  620. "api/security/v1/saml" endpoint of your Kibana server. For example,
  621. `https://kibana.example.com/api/security/v1/saml`.
  622. `sp.logout`::
  623. The URL of the Single Logout service within {kib}. Typically this is the
  624. "logout" endpoint of your Kibana server. For example,
  625. `https://kibana.example.com/logout`.
  626. `attributes.principal`::
  627. The Name of the SAML attribute that should be used as the {security} user's
  628. principal (username).
  629. `attributes.groups`::
  630. The Name of the SAML attribute that should be used to populate {security}
  631. user's groups.
  632. `attributes.name`::
  633. The Name of the SAML attribute that should be used to populate {security}
  634. user's full name.
  635. `attributes.mail`::
  636. The Name of the SAML attribute that should be used to populate {security}
  637. user's email address.
  638. `attributes.dn`::
  639. The Name of the SAML attribute that should be used to populate {security}
  640. user's X.500 _Distinguished Name_.
  641. `attribute_patterns.principal`::
  642. A Java regular expression that is matched against the SAML attribute specified
  643. by `attributes.pattern` before it is applied to the user's _principal_ property.
  644. The attribute value must match the pattern and the value of the first
  645. _capturing group_ is used as the principal. For example, `^([^@]+)@example\\.com$`
  646. matches email addresses from the "example.com" domain and uses the local-part as
  647. the principal.
  648. `attribute_patterns.groups`::
  649. As per `attribute_patterns.principal`, but for the _group_ property.
  650. `attribute_patterns.name`::
  651. As per `attribute_patterns.principal`, but for the _name_ property.
  652. `attribute_patterns.mail`::
  653. As per `attribute_patterns.principal`, but for the _mail_ property.
  654. `attribute_patterns.dn`::
  655. As per `attribute_patterns.principal`, but for the _dn_ property.
  656. `nameid_format`::
  657. The NameID format that should be requested when asking the IdP to authenticate
  658. the current user. Defaults to requesting _transient_ names
  659. (`urn:oasis:names:tc:SAML:2.0:nameid-format:transient`).
  660. `nameid.allow_create`:: The value of the `AllowCreate` attribute of the
  661. `NameIdPolicy` element in an authentication request. Defaults to `false`.
  662. `nameid.sp_qualifier`:: The value of the `SPNameQualifier` attribute of the
  663. `NameIdPolicy` element in an authentication request. The default is to not
  664. include the `SPNameQualifier` attribute.
  665. `force_authn`::
  666. Specifies whether to set the `ForceAuthn` attribute when requesting that the IdP
  667. authenticate the current user. If set to `true`, the IdP is required to verify
  668. the user’s identity, irrespective of any existing sessions they might have.
  669. Defaults to `false`.
  670. `populate_user_metadata`::
  671. Specifies whether to populate the {es} user's metadata with the values that are
  672. provided by the SAML attributes. Defaults to `true`.
  673. `allowed_clock_skew`::
  674. The maximum amount of skew that can be tolerated between the IdP's clock and the
  675. {es} node's clock.
  676. Defaults to `3m` (3 minutes).
  677. [float]
  678. [[ref-saml-signing-settings]]
  679. ===== SAML realm signing settings
  680. If a signing key is configured (that is, either `signing.key` or
  681. `signing.keystore.path` is set), then {security} signs outgoing SAML messages.
  682. Signing can be configured using the following settings:
  683. `signing.saml_messages`::
  684. A list of SAML message types that should be signed or `*` to sign all messages.
  685. Each element in the list should be the local name of a SAML XML Element.
  686. Supported element types are `AuthnRequest`, `LogoutRequest` and `LogoutResponse`.
  687. Only valid if `signing.key` or `signing.keystore.path` is also specified.
  688. Defaults to `*`.
  689. `signing.key`::
  690. Specifies the path to the PEM encoded private key to use for SAML message signing.
  691. `signing.key` and `signing.keystore.path` cannot be used at the same time.
  692. `signing.secure_key_passphrase` (<<secure-settings,Secure>>)::
  693. Specifies the passphrase to decrypt the PEM encoded private key (`signing.key`)
  694. if it is encrypted.
  695. `signing.certificate`::
  696. Specifies the path to the PEM encoded certificate (or certificate chain) that
  697. corresponds to the `signing.key`. This certificate must also be included in the
  698. Service Provider metadata or manually configured within the IdP to allow for
  699. signature validation. This setting can only be used if `signing.key` is set.
  700. `signing.keystore.path`::
  701. The path to the keystore that contains a private key and certificate.
  702. Must be either a Java Keystore (jks) or a PKCS#12 file.
  703. `signing.key` and `signing.keystore.path` cannot be used at the same time.
  704. `signing.keystore.type`::
  705. The type of the keystore in `signing.keystore.path`.
  706. Must be either `jks` or `PKCS12`. If the keystore path ends in ".p12", ".pfx",
  707. or "pkcs12", this setting defaults to `PKCS12`. Otherwise, it defaults to `jks`.
  708. `signing.keystore.alias`::
  709. Specifies the alias of the key within the keystore that should be
  710. used for SAML message signing. If the keystore contains more than one private
  711. key, this setting must be specified.
  712. `signing.keystore.secure_password` (<<secure-settings,Secure>>)::
  713. The password to the keystore in `signing.keystore.path`.
  714. `signing.keystore.secure_key_password` (<<secure-settings,Secure>>)::
  715. The password for the key in the keystore (`signing.keystore.path`).
  716. Defaults to the keystore password.
  717. [float]
  718. [[ref-saml-encryption-settings]]
  719. ===== SAML realm encryption settings
  720. If an encryption key is configured (that is, either `encryption.key` or
  721. `encryption.keystore.path` is set), then {security} publishes an encryption
  722. certificate when generating metadata and attempts to decrypt incoming SAML
  723. content. Encryption can be configured using the following settings:
  724. `encryption.key`::
  725. Specifies the path to the PEM encoded private key to use for SAML message
  726. decryption.
  727. `encryption.key` and `encryption.keystore.path` cannot be used at the same time.
  728. `encryption.secure_key_passphrase` (<<secure-settings,Secure>>)::
  729. Specifies the passphrase to decrypt the PEM encoded private key
  730. (`encryption.key`) if it is encrypted.
  731. `encryption.certificate`::
  732. Specifies the path to the PEM encoded certificate (or certificate chain) that is
  733. associated with the `encryption.key`. This certificate must also be included in
  734. the Service Provider metadata or manually configured within the IdP to enable
  735. message encryption. This setting can be used only if `encryption.key` is set.
  736. `encryption.keystore.path`::
  737. The path to the keystore that contains a private key and certificate.
  738. Must be either a Java Keystore (jks) or a PKCS#12 file.
  739. `encryption.key` and `encryption.keystore.path` cannot be used at the same time.
  740. `encryption.keystore.type`::
  741. The type of the keystore (`encryption.keystore.path`).
  742. Must be either `jks` or `PKCS12`. If the keystore path ends in ".p12", ".pfx",
  743. or "pkcs12", this setting defaults to `PKCS12`. Otherwise, it defaults to `jks`.
  744. `encryption.keystore.alias`::
  745. Specifies the alias of the key within the keystore (`encryption.keystore.path`)
  746. that should be used for SAML message decryption. If not specified, all compatible
  747. key pairs from the keystore are considered as candidate keys for decryption.
  748. `encryption.keystore.secure_password` (<<secure-settings,Secure>>)::
  749. The password to the keystore (`encryption.keystore.path`).
  750. `encryption.keystore.secure_key_password` (<<secure-settings,Secure>>)::
  751. The password for the key in the keystore (`encryption.keystore.path`). Only a
  752. single password is supported. If you are using multiple decryption keys,
  753. they cannot have individual passwords.
  754. [float]
  755. [[ref-saml-ssl-settings]]
  756. ===== SAML realm SSL settings
  757. If you are loading the IdP metadata over SSL/TLS (that is, `idp.metadata.path`
  758. is a URL using the `https` protocol), the following settings can be used to
  759. configure SSL. If these are not specified, then the
  760. <<ssl-tls-settings,default SSL settings>> are used.
  761. NOTE: These settings are not used for any purpose other than loading metadata
  762. over https.
  763. `ssl.key`::
  764. Specifies the path to the PEM encoded private key to use for http client
  765. authentication (if required). `ssl.key` and `ssl.keystore.path` cannot be used
  766. at the same time.
  767. `ssl.key_passphrase`::
  768. Specifies the
  769. passphrase to decrypt the PEM encoded private key (`ssl.key`) if it is
  770. encrypted. Cannot be used with `ssl.secure_key_passphrase`.
  771. `ssl.secure_key_passphrase` (<<secure-settings,Secure>>)::
  772. Specifies the
  773. passphrase to decrypt the PEM encoded private key (`ssl.key`) if it is
  774. encrypted. Cannot be used with `ssl.key_passphrase`.
  775. `ssl.certificate`::
  776. Specifies the
  777. path to the PEM encoded certificate (or certificate chain) that is associated
  778. with the key (`ssl.key`). This setting can be used only if `ssl.key` is set.
  779. `ssl.certificate_authorities`::
  780. Specifies the
  781. paths to the PEM encoded certificate authority certificates that should be
  782. trusted. `ssl.certificate_authorities` and `ssl.truststore.path` cannot be
  783. used at the same time.
  784. `ssl.keystore.path`::
  785. Specifies the path to
  786. the keystore that contains a private key and certificate.
  787. Must be either a Java Keystore (jks) or a PKCS#12 file.
  788. `ssl.key` and `ssl.keystore.path` cannot be used at the same time.
  789. `ssl.keystore.type`::
  790. The type of the keystore (`ssl.keystore.path`). Must be either `jks` or `PKCS12`.
  791. If the keystore path ends in ".p12", ".pfx" or "pkcs12", this setting defaults
  792. to `PKCS12`. Otherwise, it defaults to `jks`.
  793. `ssl.keystore.password`::
  794. The password to the keystore (`ssl.keystore.path`). This setting cannot be used
  795. with `ssl.keystore.secure_password`.
  796. `ssl.keystore.secure_password` (<<secure-settings,Secure>>)::
  797. The password to the keystore (`ssl.keystore.path`).
  798. This setting cannot be used with `ssl.keystore.password`.
  799. `ssl.keystore.key_password`::
  800. The password for the key in the keystore (`ssl.keystore.path`).
  801. Defaults to the keystore password. This setting cannot be used with
  802. `ssl.keystore.secure_key_password`.
  803. `ssl.keystore.secure_key_password` (<<secure-settings,Secure>>)::
  804. The password for the key in the keystore (`ssl.keystore.path`).
  805. Defaults to the keystore password. This setting cannot be used with
  806. `ssl.keystore.key_password`.
  807. `ssl.truststore.path`::
  808. The path to the
  809. keystore that contains the certificates to trust.
  810. Must be either a Java Keystore (jks) or a PKCS#12 file.
  811. `ssl.certificate_authorities` and `ssl.truststore.path` cannot be used at the
  812. same time.
  813. `ssl.truststore.type`::
  814. The type of the truststore (`ssl.truststore.path`). Must be either `jks` or
  815. `PKCS12`. If the keystore path ends in ".p12", ".pfx" or "pkcs12", this setting
  816. defaults to `PKCS12`. Otherwise, it defaults to `jks`.
  817. `ssl.truststore.password`::
  818. The password to the truststore (`ssl.truststore.path`). This setting cannot be
  819. used with `ssl.truststore.secure_password`.
  820. `ssl.truststore.secure_password` (<<secure-settings,Secure>>)::
  821. The password to the truststore (`ssl.truststore.path`). This setting cannot be
  822. used with `ssl.truststore.password`.
  823. `ssl.verification_mode`::
  824. One of `full`
  825. (verify the hostname and the certificate path), `certificate` (verify the
  826. certificate path, but not the hostname) or `none` (perform no verification).
  827. Defaults to `full`.
  828. +
  829. See <<ssl-tls-settings,`xpack.ssl.verification_mode`>> for a more detailed
  830. explanation of these values.
  831. `ssl.supported_protocols`::
  832. Specifies the supported protocols for TLS/SSL.
  833. `ssl.cipher_suites`::
  834. Specifies the
  835. cipher suites that should be supported.
  836. [float]
  837. [[ref-kerberos-settings]]
  838. ===== Kerberos realm settings
  839. For a Kerberos realm, the `type` must be set to `kerberos`. In addition to the
  840. <<ref-realm-settings,settings that are valid for all realms>>, you can specify
  841. the following settings:
  842. `keytab.path`:: Specifies the path to the Kerberos keytab file that contains the
  843. service principal used by this {es} node. This must be a location within the
  844. {es} configuration directory and the file must have read permissions. Required.
  845. `remove_realm_name`:: Set to `true` to remove the realm part of principal names.
  846. Principal names in Kerberos have the form `user/instance@REALM`. If this option
  847. is `true`, the realm part (`@REALM`) will not be included in the username.
  848. Defaults to `false`.
  849. `krb.debug`:: Set to `true` to enable debug logs for the Java login module that
  850. provides support for Kerberos authentication. Defaults to `false`.
  851. `cache.ttl`:: The time-to-live for cached user entries. A user is cached for
  852. this period of time. Specify the time period using the standard {es}
  853. <<time-units,time units>>. Defaults to `20m`.
  854. `cache.max_users`:: The maximum number of user entries that can live in the
  855. cache at any given time. Defaults to 100,000.
  856. [float]
  857. [[load-balancing]]
  858. ===== Load balancing and failover
  859. The `load_balance.type` setting can have the following values:
  860. * `failover`: The URLs specified are used in the order that they are specified.
  861. The first server that can be connected to will be used for all subsequent
  862. connections. If a connection to that server fails then the next server that a
  863. connection can be established to will be used for subsequent connections.
  864. * `dns_failover`: In this mode of operation, only a single URL may be specified.
  865. This URL must contain a DNS name. The system will be queried for all IP
  866. addresses that correspond to this DNS name. Connections to the Active Directory
  867. or LDAP server will always be tried in the order in which they were retrieved.
  868. This differs from `failover` in that there is no reordering of the list and if a
  869. server has failed at the beginning of the list, it will still be tried for each
  870. subsequent connection.
  871. * `round_robin`: Connections will continuously iterate through the list of
  872. provided URLs. If a server is unavailable, iterating through the list of URLs
  873. will continue until a successful connection is made.
  874. * `dns_round_robin`: In this mode of operation, only a single URL may be
  875. specified. This URL must contain a DNS name. The system will be queried for all
  876. IP addresses that correspond to this DNS name. Connections will continuously
  877. iterate through the list of addresses. If a server is unavailable, iterating
  878. through the list of URLs will continue until a successful connection is made.
  879. [float]
  880. [[ssl-tls-settings]]
  881. ==== Default TLS/SSL settings
  882. You can configure the following TLS/SSL settings in
  883. `elasticsearch.yml`. For more information, see
  884. {xpack-ref}/encrypting-communications.html[Encrypting communications]. These settings will be used
  885. for all of {xpack} unless they have been overridden by more specific
  886. settings such as those for HTTP or Transport.
  887. `xpack.ssl.supported_protocols`::
  888. Supported protocols with versions. Valid protocols: `SSLv2Hello`,
  889. `SSLv3`, `TLSv1`, `TLSv1.1`, `TLSv1.2`. Defaults to `TLSv1.2`, `TLSv1.1`,
  890. `TLSv1`.
  891. `xpack.ssl.client_authentication`::
  892. Controls the server's behavior in regard to requesting a certificate
  893. from client connections. Valid values are `required`, `optional`, and `none`.
  894. `required` forces a client to present a certificate, while `optional`
  895. requests a client certificate but the client is not required to present one.
  896. Defaults to `required`. This global setting is not applicable for HTTP, see
  897. <<http-tls-ssl-settings>>.
  898. `xpack.ssl.verification_mode`::
  899. Controls the verification of certificates. Valid values are:
  900. - `full`, which verifies that the provided certificate is signed by a trusted
  901. authority (CA) and also verifies that the server's hostname (or IP
  902. address) matches the names identified within the certificate.
  903. - `certificate`, which verifies that the provided certificate is signed by a
  904. trusted authority (CA), but does not perform any hostname verification.
  905. - `none`, which performs _no verification_ of the server's certificate. This mode
  906. disables many of the security benefits of SSL/TLS and should only be
  907. used after very careful consideration. It is primarily intended as a
  908. temporary diagnostic mechanism when attempting to resolve TLS errors,
  909. and its use on production clusters is strongly discouraged.
  910. +
  911. The default value is `full`.
  912. `xpack.ssl.cipher_suites`::
  913. Supported cipher suites can be found in Oracle's http://docs.oracle.com/javase/8/docs/technotes/guides/security/SunProviders.html[
  914. Java Cryptography Architecture documentation]. Defaults to `TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256`,
  915. `TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256`, `TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA`, `TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA`,
  916. `TLS_RSA_WITH_AES_128_CBC_SHA256`, `TLS_RSA_WITH_AES_128_CBC_SHA`. If the _Java Cryptography Extension (JCE) Unlimited Strength
  917. Jurisdiction Policy Files_ has been installed, the default value also includes `TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384`,
  918. `TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384`, `TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA`, `TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA`,
  919. `TLS_RSA_WITH_AES_256_CBC_SHA256`, `TLS_RSA_WITH_AES_256_CBC_SHA`.
  920. [float]
  921. [[tls-ssl-key-settings]]
  922. ===== Default TLS/SSL key and trusted certificate settings
  923. The following settings are used to specify a private key, certificate, and the
  924. trusted certificates that should be used when communicating over an SSL/TLS connection.
  925. If none of the settings below are specified, this will default to the <<ssl-tls-settings, {xpack}
  926. defaults>>. If no trusted certificates are configured, the default certificates that are trusted by the JVM will be
  927. trusted along with the certificate(s) from the <<tls-ssl-key-settings, key settings>>. The key and certificate must be in place
  928. for connections that require client authentication or when acting as a SSL enabled server.
  929. [float]
  930. ===== PEM encoded files
  931. When using PEM encoded files, use the following settings:
  932. `xpack.ssl.key`::
  933. Path to the PEM encoded file containing the private key.
  934. `xpack.ssl.key_passphrase`::
  935. The passphrase that is used to decrypt the private key. This value is
  936. optional as the key might not be encrypted.
  937. `xpack.ssl.secure_key_passphrase` (<<secure-settings,Secure>>)::
  938. The passphrase that is used to decrypt the private key. This value is
  939. optional as the key might not be encrypted.
  940. `xpack.ssl.certificate`::
  941. Path to a PEM encoded file containing the certificate (or certificate chain)
  942. that will be presented to clients when they connect.
  943. `xpack.ssl.certificate_authorities`::
  944. List of paths to the PEM encoded certificate files that should be trusted.
  945. [float]
  946. ===== Java keystore files
  947. When using Java keystore files (JKS), which contain the private key, certificate
  948. and certificates that should be trusted, use the following settings:
  949. `xpack.ssl.keystore.path`::
  950. Path to the keystore that holds the private key and certificate.
  951. `xpack.ssl.keystore.password`::
  952. Password to the keystore.
  953. `xpack.ssl.keystore.secure_password` (<<secure-settings,Secure>>)::
  954. Password to the keystore.
  955. `xpack.ssl.keystore.key_password`::
  956. Password for the private key in the keystore. Defaults to the
  957. same value as `xpack.ssl.keystore.password`.
  958. `xpack.ssl.keystore.secure_key_password` (<<secure-settings,Secure>>)::
  959. Password for the private key in the keystore.
  960. `xpack.ssl.truststore.path`::
  961. Path to the truststore file.
  962. `xpack.ssl.truststore.password`::
  963. Password to the truststore.
  964. `xpack.ssl.truststore.secure_password` (<<secure-settings,Secure>>)::
  965. Password to the truststore.
  966. [float]
  967. ===== PKCS#12 files
  968. When using PKCS#12 container files (`.p12` or `.pfx`), which contain the
  969. private key, certificate, and certificates that should be trusted, use
  970. the following settings:
  971. `xpack.ssl.keystore.path`::
  972. Path to the PKCS#12 file that holds the private key and certificate.
  973. `xpack.ssl.keystore.type`::
  974. Set this to `PKCS12`.
  975. `xpack.ssl.keystore.password`::
  976. Password to the PKCS#12 file.
  977. `xpack.ssl.keystore.secure_password` (<<secure-settings,Secure>>)::
  978. Password to the PKCS#12 file.
  979. `xpack.ssl.keystore.key_password`::
  980. Password for the private key in the PKCS12 file.
  981. Defaults to the same value as `xpack.ssl.keystore.password`.
  982. `xpack.ssl.keystore.secure_key_password` (<<secure-settings,Secure>>)::
  983. Password for the private key in the PKCS12 file.
  984. `xpack.ssl.truststore.path`::
  985. Path to the truststore file.
  986. `xpack.ssl.truststore.type`::
  987. Set this to `PKCS12`.
  988. `xpack.ssl.truststore.password`::
  989. Password to the truststore.
  990. `xpack.ssl.truststore.secure_password` (<<secure-settings,Secure>>)::
  991. Password to the truststore.
  992. [[pkcs12-truststore-note]]
  993. [NOTE]
  994. Storing trusted certificates in a PKCS#12 file, although supported, is
  995. uncommon in practice. The {ref}/certutil.html[`elasticsearch-certutil`] tool,
  996. as well as Java's `keytool`, are designed to generate PKCS#12 files that
  997. can be used both as a keystore and as a truststore, but this may not be the
  998. case for container files that are created using other tools. Usually,
  999. PKCS#12 files only contain secret and private entries. To confirm that
  1000. a PKCS#12 container includes trusted certificate ("anchor") entries look for
  1001. `2.16.840.1.113894.746875.1.1: <Unsupported tag 6>` in the
  1002. `openssl pkcs12 -info` output, or `trustedCertEntry` in the
  1003. `keytool -list` output.
  1004. [[http-tls-ssl-settings]]
  1005. :ssl-prefix: xpack.security.http
  1006. :component: HTTP
  1007. :client-auth-default: none
  1008. :verifies!:
  1009. :server:
  1010. include::ssl-settings.asciidoc[]
  1011. [[transport-tls-ssl-settings]]
  1012. :ssl-prefix: xpack.security.transport
  1013. :component: Transport
  1014. :client-auth-default!:
  1015. :verifies:
  1016. :server:
  1017. include::ssl-settings.asciidoc[]
  1018. [[ssl-tls-profile-settings]]
  1019. [float]
  1020. ===== Transport profile TLS/SSL settings
  1021. The same settings that are available for the <<transport-tls-ssl-settings, default transport>>
  1022. are also available for each transport profile. By default, the settings for a
  1023. transport profile will be the same as the default transport unless they
  1024. are specified.
  1025. As an example, lets look at the key setting. For the default transport
  1026. this is `xpack.security.transport.ssl.key`. In order to use this setting in a
  1027. transport profile, use the prefix `transport.profiles.$PROFILE.xpack.security.` and
  1028. append the portion of the setting after `xpack.security.transport.`. For the key
  1029. setting, this would be `transport.profiles.$PROFILE.xpack.security.ssl.key`.
  1030. [[auditing-tls-ssl-settings]]
  1031. :ssl-prefix: xpack.security.audit.index.client.xpack
  1032. :component: Auditing
  1033. :client-auth-default!:
  1034. :server!:
  1035. include::ssl-settings.asciidoc[]
  1036. See also <<remote-audit-settings>>.
  1037. [float]
  1038. [[ip-filtering-settings]]
  1039. ==== IP filtering settings
  1040. You can configure the following settings for {xpack-ref}/ip-filtering.html[IP filtering].
  1041. `xpack.security.transport.filter.allow`::
  1042. List of IP addresses to allow.
  1043. `xpack.security.transport.filter.deny`::
  1044. List of IP addresses to deny.
  1045. `xpack.security.http.filter.allow`::
  1046. List of IP addresses to allow just for HTTP.
  1047. `xpack.security.http.filter.deny`::
  1048. List of IP addresses to deny just for HTTP.
  1049. `transport.profiles.$PROFILE.xpack.security.filter.allow`::
  1050. List of IP addresses to allow for this profile.
  1051. `transport.profiles.$PROFILE.xpack.security.filter.deny`::
  1052. List of IP addresses to deny for this profile.
  1053. include::security-hash-settings.asciidoc[]