security-settings.asciidoc 54 KB

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