security-settings.asciidoc 53 KB

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