security-settings.asciidoc 52 KB

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