security-settings.asciidoc 55 KB

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