security-settings.asciidoc 67 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636
  1. [role="xpack"]
  2. [[security-settings]]
  3. === Security settings in {es}
  4. ++++
  5. <titleabbrev>Security settings</titleabbrev>
  6. ++++
  7. By default, the {es} {security-features} are disabled when you have a basic or
  8. trial license. To enable {security-features}, use the `xpack.security.enabled`
  9. setting.
  10. You configure `xpack.security` settings to
  11. <<anonymous-access-settings, enable anonymous access>>
  12. and perform message authentication,
  13. <<field-document-security-settings, set up document and field level security>>,
  14. <<realm-settings, configure realms>>,
  15. <<ssl-tls-settings, encrypt communications with SSL>>, and
  16. <<auditing-settings, audit security events>>.
  17. All of these settings can be added to the `elasticsearch.yml` configuration file,
  18. with the exception of the secure settings, which you add to the {es} keystore.
  19. For more information about creating and updating the {es} keystore, see
  20. <<secure-settings>>.
  21. [float]
  22. [[general-security-settings]]
  23. ==== General security settings
  24. `xpack.security.enabled`::
  25. Set to `true` to enable {es} {security-features} on the node. +
  26. +
  27. --
  28. If set to `false`, which is the default value for basic and trial licenses,
  29. {security-features} are disabled. It also affects all {kib} instances that
  30. connect to this {es} instance; you do not need to disable {security-features} in
  31. those `kibana.yml` files. For more information about disabling {security-features}
  32. in specific {kib} instances, see
  33. {kibana-ref}/security-settings-kb.html[{kib} security settings].
  34. TIP: If you have gold or higher licenses, the default value is `true`; we
  35. recommend that you explicitly add this setting to avoid confusion.
  36. --
  37. `xpack.security.hide_settings`::
  38. A comma-separated list of settings that are omitted from the results of the
  39. <<cluster-nodes-info,cluster nodes info API>>. You can use wildcards to include
  40. multiple settings in the list. For example, the following value hides all the
  41. settings for the ad1 active_directory realm:
  42. `xpack.security.authc.realms.active_directory.ad1.*`.
  43. The API already omits all `ssl` settings, `bind_dn`, and `bind_password` due to
  44. the sensitive nature of the information.
  45. `xpack.security.fips_mode.enabled`::
  46. 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`.
  47. [float]
  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 {stack-ov}/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. [[security-automata-settings]]
  72. ==== Automata Settings
  73. In places where the {security-features} accept wildcard patterns (e.g. index
  74. patterns in roles, group matches in the role mapping API), each pattern is
  75. compiled into an Automaton. The follow settings are available to control this
  76. behaviour.
  77. `xpack.security.automata.max_determinized_states`::
  78. The upper limit on how many automaton states may be created by a single pattern.
  79. This protects against too-difficult (e.g. exponentially hard) patterns.
  80. Defaults to `100,000`.
  81. `xpack.security.automata.cache.enabled`::
  82. Whether to cache the compiled automata. Compiling automata can be CPU intensive
  83. and may slowdown some operations. The cache reduces the frequency with which
  84. automata need to be compiled.
  85. Defaults to `true`.
  86. `xpack.security.automata.cache.size`::
  87. The maximum number of items to retain in the automata cache.
  88. Defaults to `10,000`.
  89. `xpack.security.automata.cache.ttl`::
  90. The length of time to retain in an item in the automata cache (based on most
  91. recent usage).
  92. Defaults to `48h` (48 hours).
  93. [float]
  94. [[field-document-security-settings]]
  95. ==== Document and field level security settings
  96. You can set the following document and field level security
  97. settings in `elasticsearch.yml`. For more information, see
  98. {stack-ov}/field-and-document-access-control.html[Setting up document and field
  99. level security].
  100. `xpack.security.dls_fls.enabled`::
  101. Set to `false` to prevent document and field level security
  102. from being configured. Defaults to `true`.
  103. `xpack.security.dls.bitset.cache.ttl`::
  104. The time-to-live for cached `BitSet` entries for document level security.
  105. Document level security queries may depend on Lucene BitSet objects, and these are
  106. automatically cached to improve performance. Defaults to expire entries that are
  107. unused for `168h` (7 days).
  108. `xpack.security.dls.bitset.cache.size`::
  109. The maximum memory usage of cached `BitSet` entries for document level security.
  110. Document level security queries may depend on Lucene BitSet objects, and these are
  111. automatically cached to improve performance. Defaults to `50mb`, after which
  112. least-recently-used entries will be evicted.
  113. [float]
  114. [[token-service-settings]]
  115. ==== Token service settings
  116. You can set the following token service settings in
  117. `elasticsearch.yml`.
  118. `xpack.security.authc.token.enabled`::
  119. Set to `false` to disable the built-in token service. Defaults to `true` unless
  120. `xpack.security.http.ssl.enabled` is `false`. This prevents sniffing the token
  121. from a connection over plain http.
  122. `xpack.security.authc.token.timeout`::
  123. The length of time that a token is valid for. By default this value is `20m` or
  124. 20 minutes. The maximum value is 1 hour.
  125. [float]
  126. [[api-key-service-settings]]
  127. ==== API key service settings
  128. You can set the following API key service settings in
  129. `elasticsearch.yml`.
  130. `xpack.security.authc.api_key.enabled`::
  131. Set to `false` to disable the built-in API key service. Defaults to `true` unless
  132. `xpack.security.http.ssl.enabled` is `false`. This prevents sniffing the API key
  133. from a connection over plain http.
  134. `xpack.security.authc.api_key.hashing.algorithm`::
  135. Specifies the hashing algorithm that is used for securing API key credentials.
  136. See <<password-hashing-algorithms>>. Defaults to `pbkdf2`.
  137. `xpack.security.authc.api_key.cache.ttl`::
  138. The time-to-live for cached API key entries. A API key id and a hash of its
  139. API key are cached for this period of time. Specify the time period using
  140. the standard {es} <<time-units,time units>>. Defaults to `1d`.
  141. `xpack.security.authc.api_key.cache.max_keys`::
  142. The maximum number of API key entries that can live in the
  143. cache at any given time. Defaults to 10,000.
  144. `xpack.security.authc.api_key.cache.hash_algo`:: (Expert Setting)
  145. The hashing algorithm that is used for the
  146. in-memory cached API key credentials. For possible values, see <<cache-hash-algo>>.
  147. Defaults to `ssha256`.
  148. [float]
  149. [[realm-settings]]
  150. ==== Realm settings
  151. You configure realm settings in the `xpack.security.authc.realms`
  152. namespace in `elasticsearch.yml`. For example:
  153. [source,yaml]
  154. ----------------------------------------
  155. xpack.security.authc.realms:
  156. native.realm1:
  157. order: 0
  158. ...
  159. ldap.realm2:
  160. order: 1
  161. ...
  162. active_directory.realm3:
  163. order: 2
  164. ...
  165. ...
  166. ----------------------------------------
  167. The valid settings vary depending on the realm type. For more
  168. information, see {stack-ov}/setting-up-authentication.html[Setting up authentication].
  169. [float]
  170. [[ref-realm-settings]]
  171. ===== Settings valid for all realms
  172. `type`::
  173. The type of the realm: `native`, `ldap`, `active_directory`, `pki`, or `file`. Required.
  174. `order`::
  175. The priority of the realm within the realm chain. Realms with a lower order are
  176. consulted first. Although not required, use of this setting is strongly
  177. recommended when you configure multiple realms. Defaults to `Integer.MAX_VALUE`.
  178. `enabled`::
  179. Indicates whether a realm is enabled. You can use this setting to disable a
  180. realm without removing its configuration information. Defaults to `true`.
  181. [[ref-native-settings]]
  182. [float]
  183. ===== Native realm settings
  184. For a native realm, the `type` must be set to `native`. In addition to the
  185. <<ref-realm-settings,settings that are valid for all realms>>, you can specify
  186. the following optional settings:
  187. `cache.ttl`:: The time-to-live for cached user entries. A user and a hash of its
  188. credentials are cached for this period of time. Specify the time period using
  189. the standard {es} <<time-units,time units>>. Defaults to `20m`.
  190. `cache.max_users`:: The maximum number of user entries that can live in the
  191. cache at any given time. Defaults to 100,000.
  192. `cache.hash_algo`:: (Expert Setting) The hashing algorithm that is used for the
  193. in-memory cached user credentials. For possible values, see <<cache-hash-algo>>.
  194. Defaults to `ssha256`.
  195. `authentication.enabled`:: If set to `false`, disables authentication support in
  196. this realm, so that it only supports user lookups.
  197. (See the {stack-ov}/run-as-privilege.html[run as] and
  198. {stack-ov}/realm-chains.html#authorization_realms[authorization realms] features).
  199. Defaults to `true`.
  200. [[ref-users-settings]]
  201. [float]
  202. ===== File realm settings
  203. The `type` setting must be set to `file`. In addition to the
  204. <<ref-realm-settings,settings that are valid for all realms>>, you can specify
  205. the following settings:
  206. `cache.ttl`::
  207. The time-to-live for cached user entries. A user and a hash of its credentials
  208. are cached for this configured period of time. Defaults to `20m`. Specify values
  209. using the standard {es} {ref}/common-options.html#time-units[time units].
  210. Defaults to `20m`.
  211. `cache.max_users`::
  212. The maximum number of user entries that can live in the cache at a given time.
  213. Defaults to 100,000.
  214. `cache.hash_algo`::
  215. (Expert Setting) The hashing algorithm that is used for the in-memory cached
  216. user credentials. See <<cache-hash-algo>>. Defaults to `ssha256`.
  217. `authentication.enabled`:: If set to `false`, disables authentication support in
  218. this realm, so that it only supports user lookups.
  219. (See the {stack-ov}/run-as-privilege.html[run as] and
  220. {stack-ov}/realm-chains.html#authorization_realms[authorization realms] features).
  221. Defaults to `true`.
  222. [[ref-ldap-settings]]
  223. [float]
  224. ===== LDAP realm settings
  225. The `type` setting must be set to `ldap`. In addition to the
  226. <<ref-realm-settings>>, you can specify the following settings:
  227. `url`::
  228. One or more LDAP URLs in the `ldap[s]://<server>:<port>` format. Required.
  229. +
  230. To provide multiple URLs, use a YAML array (`["ldap://server1:636", "ldap://server2:636"]`)
  231. or comma-separated string (`"ldap://server1:636, ldap://server2:636"`).
  232. +
  233. While both are supported, you can't mix the `ldap` and `ldaps` protocols.
  234. `load_balance.type`::
  235. The behavior to use when there are multiple LDAP URLs defined. For supported
  236. values see <<load-balancing,load balancing and failover types>>.
  237. Defaults to `failover`.
  238. `load_balance.cache_ttl`::
  239. When using `dns_failover` or `dns_round_robin` as the load balancing type,
  240. this setting controls the amount of time to cache DNS lookups. Defaults
  241. to `1h`.
  242. `bind_dn`::
  243. The DN of the user that is used to bind to the LDAP and perform searches.
  244. Only applicable in user search mode.
  245. If not specified, an anonymous bind is attempted.
  246. Defaults to Empty. Due to its potential security impact, `bind_dn` is not
  247. exposed via the <<cluster-nodes-info,nodes info API>>.
  248. `bind_password`::
  249. deprecated[6.3] Use `secure_bind_password` instead. The password for the user
  250. that is used to bind to the LDAP directory.
  251. Defaults to Empty. Due to its potential security impact, `bind_password` is not
  252. exposed via the <<cluster-nodes-info,nodes info API>>.
  253. `secure_bind_password` (<<secure-settings,Secure>>)::
  254. The password for the user that is used to bind to the LDAP directory.
  255. Defaults to Empty.
  256. `user_dn_templates`::
  257. The DN template that replaces the user name with the string `{0}`.
  258. This setting is multivalued; you can specify multiple user contexts.
  259. Required to operate in user template mode. If `user_search.base_dn` is specified,
  260. this setting is not valid. For more information on
  261. the different modes, see {stack-ov}/ldap-realm.html[LDAP realms].
  262. `authorization_realms`::
  263. The names of the realms that should be consulted for delegated authorization.
  264. If this setting is used, then the LDAP realm does not perform role mapping and
  265. instead loads the user from the listed realms. The referenced realms are
  266. consulted in the order that they are defined in this list.
  267. See {stack-ov}/realm-chains.html#authorization_realms[Delegating authorization to another realm]
  268. +
  269. --
  270. NOTE: If any settings starting with `user_search` are specified, the
  271. `user_dn_templates` settings are ignored.
  272. --
  273. `user_group_attribute`::
  274. Specifies the attribute to examine on the user for group membership.
  275. If any `group_search` settings are specified, this setting is ignored. Defaults
  276. to `memberOf`.
  277. `user_search.base_dn`::
  278. Specifies a container DN to search for users. Required
  279. to operated in user search mode. If `user_dn_templates` is specified, this
  280. setting is not valid. For more information on
  281. the different modes, see {stack-ov}/ldap-realm.html[LDAP realms].
  282. `user_search.scope`::
  283. The scope of the user search. Valid values are `sub_tree`, `one_level` or
  284. `base`. `one_level` only searches objects directly contained within the
  285. `base_dn`. `sub_tree` searches all objects contained under `base_dn`.
  286. `base` specifies that the `base_dn` is the user object, and that it is
  287. the only user considered. Defaults to `sub_tree`.
  288. `user_search.filter`::
  289. Specifies the filter used to search the directory in attempts to match
  290. an entry with the username provided by the user. Defaults to `(uid={0})`.
  291. `{0}` is substituted with the username provided when searching.
  292. `user_search.attribute`::
  293. deprecated[5.6] Use `user_search.filter` instead.
  294. The attribute to match with the username sent with the request. Defaults to `uid`.
  295. `user_search.pool.enabled`::
  296. Enables or disables connection pooling for user search. If set to `false`, a new
  297. connection is created for every search. The
  298. default is `true` when `bind_dn` is set.
  299. `user_search.pool.size`::
  300. The maximum number of connections to the LDAP server to allow in the
  301. connection pool. Defaults to `20`.
  302. `user_search.pool.initial_size`::
  303. The initial number of connections to create to the LDAP server on startup.
  304. Defaults to `0`. If the LDAP server is down, values greater than `0` could cause
  305. startup failures.
  306. `user_search.pool.health_check.enabled`::
  307. Enables or disables a health check on LDAP connections in the connection
  308. pool. Connections are checked in the background at the specified interval.
  309. Defaults to `true`.
  310. `user_search.pool.health_check.dn`::
  311. The distinguished name that is retrieved as part of the health check.
  312. Defaults to the value of `bind_dn` if present; if
  313. not, falls back to `user_search.base_dn`.
  314. `user_search.pool.health_check.interval`::
  315. The interval to perform background checks of connections in the pool.
  316. Defaults to `60s`.
  317. `group_search.base_dn`::
  318. The container DN to search for groups in which the user has membership. When
  319. this element is absent, {es} searches for the attribute specified by
  320. `user_group_attribute` set on the user in order to determine group membership.
  321. `group_search.scope`::
  322. Specifies whether the group search should be `sub_tree`, `one_level` or
  323. `base`. `one_level` only searches objects directly contained within the
  324. `base_dn`. `sub_tree` searches all objects contained under `base_dn`.
  325. `base` specifies that the `base_dn` is a group object, and that it is the
  326. only group considered. Defaults to `sub_tree`.
  327. `group_search.filter`::
  328. Specifies a filter to use to look up a group.
  329. When not set, the realm searches for `group`, `groupOfNames`, `groupOfUniqueNames`,
  330. or `posixGroup` with the attributes `member`, `memberOf`, or `memberUid`. Any
  331. instance of `{0}` in the filter is replaced by the user attribute defined in
  332. `group_search.user_attribute`.
  333. `group_search.user_attribute`::
  334. Specifies the user attribute that is fetched and provided as a parameter to
  335. the filter. If not set, the user DN is passed into the filter. Defaults to Empty.
  336. `unmapped_groups_as_roles`::
  337. If set to `true`, the names of any unmapped LDAP groups are used as role names
  338. and assigned to the user. A group is considered to be _unmapped_ if it is not
  339. referenced in a
  340. {stack-ov}/mapping-roles.html#mapping-roles-file[role-mapping file]. API-based
  341. role mappings are not considered. Defaults to `false`.
  342. `files.role_mapping`::
  343. The <<security-files,location>> for the {stack-ov}/mapping-roles.html#mapping-roles[
  344. YAML role mapping configuration file]. Defaults to
  345. `ES_PATH_CONF/role_mapping.yml`.
  346. `follow_referrals`::
  347. Specifies whether {es} should follow referrals returned
  348. by the LDAP server. Referrals are URLs returned by the server that are to be
  349. used to continue the LDAP operation (for example, search). Defaults to `true`.
  350. `metadata`::
  351. A list of additional LDAP attributes that should be loaded from the
  352. LDAP server and stored in the authenticated user's metadata field.
  353. `timeout.tcp_connect`::
  354. The TCP connect timeout period for establishing an LDAP connection.
  355. An `s` at the end indicates seconds, or `ms` indicates milliseconds.
  356. Defaults to `5s` (5 seconds ).
  357. `timeout.tcp_read`::
  358. The TCP read timeout period after establishing an LDAP connection.
  359. An `s` at the end indicates seconds, or `ms` indicates milliseconds.
  360. Defaults to `5s` (5 seconds ).
  361. `timeout.ldap_search`::
  362. The LDAP Server enforced timeout period for an LDAP search.
  363. An `s` at the end indicates seconds, or `ms` indicates milliseconds.
  364. Defaults to `5s` (5 seconds ).
  365. `ssl.key`::
  366. Path to a PEM encoded file containing the private key, which is used if the
  367. LDAP server requires client authentication. `ssl.key` and `ssl.keystore.path`
  368. cannot be used at the same time.
  369. `ssl.key_passphrase`::
  370. The passphrase that is used to decrypt the private key. This value is
  371. optional as the key may not be encrypted.
  372. `ssl.secure_key_passphrase` (<<secure-settings,Secure>>)::
  373. The passphrase that is used to decrypt the private key.
  374. `ssl.certificate`::
  375. Path to a PEM encoded file containing the certificate (or certificate chain)
  376. that will be presented to clients when they connect.
  377. `ssl.certificate_authorities`::
  378. List of paths to PEM encoded certificate files that should be trusted.
  379. `ssl.certificate_authorities` and `ssl.truststore.path` cannot be used at the
  380. same time.
  381. `ssl.keystore.path`::
  382. The path to the Java Keystore file that contains a private key and certificate.
  383. `ssl.key` and `ssl.keystore.path` may not be used at the same time.
  384. `ssl.keystore.type`::
  385. The format of the keystore file. Should be `jks` to use the Java
  386. Keystore format, `PKCS12` to use PKCS#12 files, or `PKCS11` to use a PKCS#11 token.
  387. The default is `jks`.
  388. `ssl.keystore.password`::
  389. The password to the keystore.
  390. `ssl.keystore.secure_password` (<<secure-settings,Secure>>)::
  391. The password to the keystore.
  392. `ssl.keystore.key_password`::
  393. The password for the key in the keystore. Defaults to the keystore password.
  394. `ssl.keystore.secure_key_password`::
  395. The password for the key in the keystore. Defaults to the keystore password.
  396. `ssl.truststore.path`::
  397. The path to the Java Keystore file that contains the certificates to trust.
  398. `ssl.certificate_authorities` and `ssl.truststore.path` cannot be used at the same time.
  399. `ssl.truststore.password`::
  400. The password to the truststore.
  401. `ssl.truststore.secure_password` (<<secure-settings,Secure>>)::
  402. The password to the truststore.
  403. `ssl.truststore.type`::
  404. The format of the keystore file. Should be `jks` to use the Java
  405. Keystore format, `PKCS12` to use PKCS#12 files, or `PKCS11` to use a PKCS#11 token.
  406. The default is `jks`.
  407. `ssl.verification_mode`::
  408. Indicates the type of verification when using `ldaps` to protect against man
  409. in the middle attacks and certificate forgery. Values are `none`, `certificate`,
  410. and `full`. Defaults to `full`.
  411. +
  412. See <<ssl-tls-settings,`ssl.verification_mode`>> for an explanation of these values.
  413. `ssl.supported_protocols`::
  414. Supported protocols for TLS/SSL (with versions). Defaults to `TLSv1.3,TLSv1.2,TLSv1.1`.
  415. `ssl.cipher_suites`:: Specifies the cipher suites that should be supported when
  416. communicating with the LDAP server.
  417. Supported cipher suites can be found in Oracle's http://docs.oracle.com/javase/8/docs/technotes/guides/security/SunProviders.html[
  418. Java Cryptography Architecture documentation]. See <<ssl-tls-settings,`ssl.cipher_suites`>>
  419. for the default value.
  420. `cache.ttl`::
  421. Specifies the time-to-live for cached user entries. A user and a hash of its
  422. credentials are cached for this period of time. Use the standard {es}
  423. <<time-units,time units>>. Defaults to `20m`.
  424. `cache.max_users`::
  425. Specifies the maximum number of user entries that the cache can contain.
  426. Defaults to `100000`.
  427. `cache.hash_algo`::
  428. (Expert Setting) Specifies the hashing algorithm that is used for the
  429. in-memory cached user credentials. See <<cache-hash-algo>>. Defaults to `ssha256`.
  430. `authentication.enabled`:: If set to `false`, disables authentication support in
  431. this realm, so that it only supports user lookups.
  432. (See the {stack-ov}/run-as-privilege.html[run as] and
  433. {stack-ov}/realm-chains.html#authorization_realms[authorization realms] features).
  434. Defaults to `true`.
  435. [[ref-ad-settings]]
  436. [float]
  437. ===== Active Directory realm settings
  438. The `type` setting must be set to `active_directory`. In addition to the
  439. <<ref-realm-settings,settings that are valid for all realms>>, you can specify
  440. the following settings:
  441. `url`::
  442. One or more LDAP URLs in the `ldap[s]://<server>:<port>` format. Defaults to
  443. `ldap://<domain_name>:389`. This setting is required when connecting using
  444. SSL/TLS or when using a custom port.
  445. +
  446. To provide multiple URLs, use a YAML array (`["ldap://server1:636", "ldap://server2:636"]`)
  447. or comma-separated string (`"ldap://server1:636, ldap://server2:636"`).
  448. +
  449. While both are supported, you can't mix the `ldap` and `ldaps` protocols.
  450. +
  451. If no URL is provided, {es} uses a default of `ldap://<domain_name>:389`. This
  452. default uses the `domain_name` setting value and assumes an unencrypted
  453. connection to port 389.
  454. `load_balance.type`::
  455. The behavior to use when there are multiple LDAP URLs defined. For supported
  456. values see <<load-balancing,load balancing and failover types>>.
  457. Defaults to `failover`.
  458. `load_balance.cache_ttl`::
  459. When using `dns_failover` or `dns_round_robin` as the load balancing type,
  460. this setting controls the amount of time to cache DNS lookups. Defaults
  461. to `1h`.
  462. `domain_name`::
  463. The domain name of Active Directory. If the `url` and the `user_search_dn`
  464. settings are not specified, the cluster can derive those values from this
  465. setting. Required.
  466. `bind_dn`::
  467. The DN of the user that is used to bind to Active Directory and perform searches.
  468. Defaults to Empty. Due to its potential security impact, `bind_dn` is not
  469. exposed via the <<cluster-nodes-info,nodes info API>>.
  470. `bind_password`::
  471. deprecated[6.3] Use `secure_bind_password` instead. The password for the user
  472. that is used to bind to Active Directory. Defaults to Empty. Due to its
  473. potential security impact, `bind_password` is not exposed via the
  474. <<cluster-nodes-info,nodes info API>>.
  475. `secure_bind_password` (<<secure-settings,Secure>>)::
  476. The password for the user that is used to bind to Active Directory.
  477. Defaults to Empty.
  478. `unmapped_groups_as_roles`::
  479. If set to `true`, the names of any unmapped Active Directory groups are used as
  480. role names and assigned to the user. A group is considered _unmapped_ when it
  481. is not referenced in any role-mapping files. API-based role mappings are not
  482. considered. Defaults to `false`.
  483. `files.role_mapping`::
  484. The <<security-files,location>> for the YAML
  485. role mapping configuration file. Defaults to `ES_PATH_CONF/role_mapping.yml`.
  486. `user_search.base_dn`::
  487. The context to search for a user. Defaults to the root
  488. of the Active Directory domain.
  489. `user_search.scope`::
  490. Specifies whether the user search should be `sub_tree`, `one_level` or `base`.
  491. `one_level` only searches users directly contained within the `base_dn`.
  492. `sub_tree` searches all objects contained under `base_dn`. `base`
  493. specifies that the `base_dn` is a user object, and that it is the
  494. only user considered. Defaults to `sub_tree`.
  495. `user_search.filter`::
  496. Specifies a filter to use to lookup a user given a username. The default
  497. filter looks up `user` objects with either `sAMAccountName` or
  498. `userPrincipalName`. If specified, this must be a valid LDAP user search filter.
  499. For example `(&(objectClass=user)(sAMAccountName={0}))`. For more information,
  500. see
  501. https://msdn.microsoft.com/en-us/library/aa746475(v=vs.85).aspx[Search Filter Syntax].
  502. `user_search.upn_filter`::
  503. Specifies a filter to use to lookup a user given a user principal name.
  504. The default filter looks up `user` objects with
  505. a matching `userPrincipalName`. If specified, this
  506. must be a valid LDAP user search filter. For example,
  507. `(&(objectClass=user)(userPrincipalName={1}))`. `{1}` is the full user principal name
  508. provided by the user. For more information, see
  509. https://msdn.microsoft.com/en-us/library/aa746475(v=vs.85).aspx[Search Filter Syntax].
  510. `user_search.down_level_filter`::
  511. Specifies a filter to use to lookup a user given a down level logon name
  512. (DOMAIN\user). The default filter looks up `user` objects with a matching
  513. `sAMAccountName` in the domain provided. If specified, this
  514. must be a valid LDAP user search filter. For example,
  515. `(&(objectClass=user)(sAMAccountName={0}))`. For more information, see
  516. https://msdn.microsoft.com/en-us/library/aa746475(v=vs.85).aspx[Search Filter Syntax].
  517. `user_search.pool.enabled`::
  518. Enables or disables connection pooling for user search. When
  519. disabled a new connection is created for every search. The
  520. default is `true` when `bind_dn` is provided.
  521. `user_search.pool.size`::
  522. The maximum number of connections to the Active Directory server to allow in the
  523. connection pool. Defaults to `20`.
  524. `user_search.pool.initial_size`::
  525. The initial number of connections to create to the Active Directory server on startup.
  526. Defaults to `0`. If the LDAP server is down, values greater than 0
  527. could cause startup failures.
  528. `user_search.pool.health_check.enabled`::
  529. Enables or disables a health check on Active Directory connections in the connection
  530. pool. Connections are checked in the background at the specified interval.
  531. Defaults to `true`.
  532. `user_search.pool.health_check.dn`::
  533. The distinguished name to be retrieved as part of the health check.
  534. Defaults to the value of `bind_dn` if that setting is present. Otherwise, it
  535. defaults to the value of the `user_search.base_dn` setting.
  536. `user_search.pool.health_check.interval`::
  537. The interval to perform background checks of connections in the pool.
  538. Defaults to `60s`.
  539. `group_search.base_dn`::
  540. The context to search for groups in which the user has membership. Defaults
  541. to the root of the Active Directory domain.
  542. `group_search.scope`::
  543. Specifies whether the group search should be `sub_tree`, `one_level` or
  544. `base`. `one_level` searches for groups directly contained within the
  545. `base_dn`. `sub_tree` searches all objects contained under `base_dn`.
  546. `base` specifies that the `base_dn` is a group object, and that it is
  547. the only group considered. Defaults to `sub_tree`.
  548. `metadata`::
  549. A list of additional LDAP attributes that should be loaded from the
  550. LDAP server and stored in the authenticated user's metadata field.
  551. `timeout.tcp_connect`::
  552. The TCP connect timeout period for establishing an LDAP connection.
  553. An `s` at the end indicates seconds, or `ms` indicates milliseconds.
  554. Defaults to `5s` (5 seconds ).
  555. `timeout.tcp_read`::
  556. The TCP read timeout period after establishing an LDAP connection.
  557. An `s` at the end indicates seconds, or `ms` indicates milliseconds.
  558. Defaults to `5s` (5 seconds ).
  559. `timeout.ldap_search`::
  560. The LDAP Server enforced timeout period for an LDAP search.
  561. An `s` at the end indicates seconds, or `ms` indicates milliseconds.
  562. Defaults to `5s` (5 seconds ).
  563. `ssl.certificate`::
  564. Path to a PEM encoded file containing the certificate (or certificate chain)
  565. that will be presented to clients when they connect.
  566. `ssl.certificate_authorities`::
  567. List of paths to PEM encoded certificate files that should be trusted.
  568. `ssl.certificate_authorities` and `ssl.truststore.path` cannot be used at the
  569. same time.
  570. `ssl.key`::
  571. Path to the PEM encoded file containing the private key, which is used when the
  572. Active Directory server requires client authentication. `ssl.key` and
  573. `ssl.keystore.path` cannot be used at the same time.
  574. `ssl.key_passphrase`::
  575. The passphrase that is used to decrypt the private key. This value is
  576. optional as the key might not be encrypted.
  577. `ssl.secure_key_passphrase` (<<secure-settings,Secure>>)::
  578. The passphrase that is used to decrypt the private key. This value is
  579. optional as the key might not be encrypted.
  580. `ssl.keystore.key_password`::
  581. The password for the key in the keystore. Defaults to the keystore password.
  582. `ssl.keystore.secure_key_password` (<<secure-settings,Secure>>)::
  583. The password for the key in the keystore. Defaults to the keystore password.
  584. `ssl.keystore.password`::
  585. The password to the keystore.
  586. `ssl.secure_keystore.password` (<<secure-settings,Secure>>)::
  587. The password to the keystore.
  588. `ssl.keystore.path`::
  589. The path to the Java Keystore file that contains a private key and certificate.
  590. `ssl.key` and `ssl.keystore.path` cannot be used at the same time.
  591. `ssl.keystore.type`::
  592. The format of the keystore file. Should be `jks` to use the Java
  593. Keystore format, `PKCS12` to use PKCS#12 files, or `PKCS11` to use a PKCS#11 token.
  594. The default is `jks`.
  595. `ssl.truststore.password`::
  596. The password to the truststore.
  597. `ssl.truststore.secure_password` (<<secure-settings,Secure>>)::
  598. The password to the truststore.
  599. `ssl.truststore.path`::
  600. The path to the Java Keystore file that contains the certificates to trust.
  601. `ssl.certificate_authorities` and `ssl.truststore.path` cannot be used at the
  602. same time.
  603. `ssl.truststore.type`::
  604. The format of the truststore file. Should be `jks` to use the Java
  605. Keystore format, `PKCS12` to use PKCS#12 files, or `PKCS11` to use a PKCS#11 token.
  606. The default is `jks`.
  607. `ssl.verification_mode`::
  608. Indicates the type of verification when using `ldaps` to protect against man
  609. in the middle attacks and certificate forgery. Values are `none`, `certificate`,
  610. and `full`. Defaults to `full`.
  611. +
  612. See <<ssl-tls-settings,`ssl.verification_mode`>> for an explanation of these values.
  613. `ssl.supported_protocols`::
  614. Supported protocols for TLS/SSL (with versions). Defaults to `TLSv1.3,TLSv1.2,TLSv1.1`.
  615. `ssl.cipher_suites`:: Specifies the cipher suites that should be supported when
  616. communicating with the Active Directory server.
  617. Supported cipher suites can be found in Oracle's http://docs.oracle.com/javase/8/docs/technotes/guides/security/SunProviders.html[
  618. Java Cryptography Architecture documentation]. See <<ssl-tls-settings,`ssl.cipher_suites`>> for
  619. the default values.
  620. `cache.ttl`::
  621. Specifies the time-to-live for cached user entries. A user and a hash of its
  622. credentials are cached for this configured period of time. Use the
  623. standard Elasticsearch {ref}/common-options.html#time-units[time units]).
  624. Defaults to `20m`.
  625. `cache.max_users`::
  626. Specifies the maximum number of user entries that the cache can contain.
  627. Defaults to `100000`.
  628. `cache.hash_algo`::
  629. (Expert Setting) Specifies the hashing algorithm that is used for
  630. the in-memory cached user credentials. See <<cache-hash-algo>>. Defaults to `ssha256`.
  631. `authentication.enabled`:: If set to `false`, disables authentication support in
  632. this realm, so that it only supports user lookups.
  633. (See the {stack-ov}/run-as-privilege.html[run as] and
  634. {stack-ov}/realm-chains.html#authorization_realms[authorization realms] features).
  635. Defaults to `true`.
  636. `follow_referrals`::
  637. If set to `true`, {es} follows referrals returned by the LDAP server.
  638. Referrals are URLs returned by the server that are to be used to continue the
  639. LDAP operation (such as `search`). Defaults to `true`.
  640. [[ref-pki-settings]]
  641. [float]
  642. ===== PKI realm settings
  643. The `type` setting must be set to `pki`. In addition to the
  644. <<ref-realm-settings,settings that are valid for all realms>>, you can specify
  645. the following settings:
  646. `username_pattern`::
  647. The regular expression pattern used to extract the username from the
  648. certificate DN. The first match group is the used as the username.
  649. Defaults to `CN=(.*?)(?:,\|$)`.
  650. `certificate_authorities`::
  651. List of paths to the PEM certificate files that should be used to authenticate a
  652. user's certificate as trusted. Defaults to the trusted certificates configured
  653. for SSL. This setting cannot be used with `truststore.path`.
  654. `truststore.algorithm`::
  655. Algorithm for the truststore. Defaults to `SunX509`.
  656. `truststore.password`::
  657. The password for the truststore. Must be provided if `truststore.path` is set.
  658. `truststore.secure_password` (<<secure-settings,Secure>>)::
  659. The password for the truststore.
  660. `truststore.path`::
  661. The path of a truststore to use. Defaults to the trusted certificates configured
  662. for SSL. This setting cannot be used with `certificate_authorities`.
  663. `files.role_mapping`::
  664. Specifies the <<security-files,location>> of the
  665. {stack-ov}/mapping-roles.html[YAML role mapping configuration file].
  666. Defaults to `ES_PATH_CONF/role_mapping.yml`.
  667. `authorization_realms`::
  668. The names of the realms that should be consulted for delegated authorization.
  669. If this setting is used, then the PKI realm does not perform role mapping and
  670. instead loads the user from the listed realms.
  671. See {stack-ov}/realm-chains.html#authorization_realms[Delegating authorization to another realm]
  672. `cache.ttl`::
  673. Specifies the time-to-live for cached user entries. A user and a hash of its
  674. credentials are cached for this period of time. Use the
  675. standard {es} {ref}/common-options.html#time-units[time units]).
  676. Defaults to `20m`.
  677. `cache.max_users`::
  678. Specifies the maximum number of user entries that the cache can contain.
  679. Defaults to `100000`.
  680. `delegation.enabled`::
  681. Generally, in order for the clients to be authenticated by the PKI realm they
  682. must connect directly to {es}. That is, they must not pass through proxies
  683. which terminate the TLS connection. In order to allow for a *trusted* and
  684. *smart* proxy, such as Kibana, to sit before {es} and terminate TLS
  685. connections, but still allow clients to be authenticated on {es} by this realm,
  686. you need to toggle this to `true`. Defaults to `false`. If delegation is
  687. enabled, then either `truststore.path` or `certificate_authorities` setting
  688. must be defined. For more details, see <<pki-realm-for-proxied-clients,
  689. Configuring authentication delegation for PKI realms>>.
  690. [[ref-saml-settings]]
  691. [float]
  692. ===== SAML realm settings
  693. The `type` setting must be set to `saml`. In addition to the
  694. <<ref-realm-settings,settings that are valid for all realms>>, you can specify
  695. the following settings:
  696. `idp.entity_id`::
  697. The Entity ID of the SAML Identity Provider. An Entity ID is a URI with a
  698. maximum length of 1024 characters. It can be a URL (https://idp.example.com/) or
  699. a URN (`urn:example.com:idp`) and can be found in the configuration or the SAML
  700. metadata of the Identity Provider.
  701. `idp.metadata.path`::
  702. The path _(recommended)_ or URL to a SAML 2.0 metadata file describing the
  703. capabilities and configuration of the Identity Provider.
  704. If a path is provided, then it is resolved relative to the {es} config
  705. directory.
  706. If a URL is provided, then it must be either a `file` URL or a `https` URL.
  707. {es} automatically polls this metadata resource and reloads
  708. the IdP configuration when changes are detected.
  709. File based resources are polled at a frequency determined by the global {es}
  710. `resource.reload.interval.high` setting, which defaults to 5 seconds.
  711. HTTPS resources are polled at a frequency determined by the realm's
  712. `idp.metadata.http.refresh` setting.
  713. `idp.metadata.http.refresh`::
  714. Controls the frequency with which `https` metadata is checked for changes.
  715. Defaults to `1h` (1 hour).
  716. `idp.use_single_logout`::
  717. Indicates whether to utilise the Identity Provider's Single Logout service
  718. (if one exists in the IdP metadata file).
  719. Defaults to `true`.
  720. `sp.entity_id`::
  721. The Entity ID to use for this SAML Service Provider. This should be entered as a
  722. URI. We recommend that you use the base URL of your Kibana instance. For example,
  723. `https://kibana.example.com/`.
  724. `sp.acs`::
  725. The URL of the Assertion Consumer Service within {kib}. Typically this is the
  726. "api/security/v1/saml" endpoint of your Kibana server. For example,
  727. `https://kibana.example.com/api/security/v1/saml`.
  728. `sp.logout`::
  729. The URL of the Single Logout service within {kib}. Typically this is the
  730. "logout" endpoint of your Kibana server. For example,
  731. `https://kibana.example.com/logout`.
  732. `attributes.principal`::
  733. The Name of the SAML attribute that contains the user's principal (username).
  734. `attributes.groups`::
  735. The Name of the SAML attribute that contains the user's groups.
  736. `attributes.name`::
  737. The Name of the SAML attribute that contains the user's full name.
  738. `attributes.mail`::
  739. The Name of the SAML attribute that contains the user's email address.
  740. `attributes.dn`::
  741. The Name of the SAML attribute that contains the user's X.50
  742. _Distinguished Name_.
  743. `attribute_patterns.principal`::
  744. A Java regular expression that is matched against the SAML attribute specified
  745. by `attributes.pattern` before it is applied to the user's _principal_ property.
  746. The attribute value must match the pattern and the value of the first
  747. _capturing group_ is used as the principal. For example, `^([^@]+)@example\\.com$`
  748. matches email addresses from the "example.com" domain and uses the local-part as
  749. the principal.
  750. `attribute_patterns.groups`::
  751. As per `attribute_patterns.principal`, but for the _group_ property.
  752. `attribute_patterns.name`::
  753. As per `attribute_patterns.principal`, but for the _name_ property.
  754. `attribute_patterns.mail`::
  755. As per `attribute_patterns.principal`, but for the _mail_ property.
  756. `attribute_patterns.dn`::
  757. As per `attribute_patterns.principal`, but for the _dn_ property.
  758. `nameid_format`::
  759. The NameID format that should be requested when asking the IdP to authenticate
  760. the current user. The default is to not include the `nameid_format` attribute.
  761. `nameid.allow_create`:: The value of the `AllowCreate` attribute of the
  762. `NameIdPolicy` element in an authentication request. The default value is false.
  763. `nameid.sp_qualifier`:: The value of the `SPNameQualifier` attribute of the
  764. `NameIdPolicy` element in an authentication request. The default is to not
  765. include the `SPNameQualifier` attribute.
  766. `force_authn`::
  767. Specifies whether to set the `ForceAuthn` attribute when requesting that the IdP
  768. authenticate the current user. If set to `true`, the IdP is required to verify
  769. the user’s identity, irrespective of any existing sessions they might have.
  770. Defaults to `false`.
  771. `populate_user_metadata`::
  772. Specifies whether to populate the {es} user's metadata with the values that are
  773. provided by the SAML attributes. Defaults to `true`.
  774. `authorization_realms`::
  775. The names of the realms that should be consulted for delegated authorization.
  776. If this setting is used, then the SAML realm does not perform role mapping and
  777. instead loads the user from the listed realms.
  778. See {stack-ov}/realm-chains.html#authorization_realms[Delegating authorization to another realm]
  779. `allowed_clock_skew`::
  780. The maximum amount of skew that can be tolerated between the IdP's clock and the
  781. {es} node's clock.
  782. Defaults to `3m` (3 minutes).
  783. `req_authn_context_class_ref`::
  784. A comma separated list of Authentication Context Class Reference values to be
  785. included in the Requested Authentication Context when requesting the IdP to
  786. authenticate the current user. The Authentication Context of the corresponding
  787. authentication response should contain at least one of the requested values.
  788. +
  789. For more information, see
  790. {stack-ov}/saml-guide-authentication.html#req-authn-context[Requesting specific authentication methods].
  791. [float]
  792. [[ref-saml-signing-settings]]
  793. ===== SAML realm signing settings
  794. If a signing key is configured (that is, either `signing.key` or
  795. `signing.keystore.path` is set), then {es} signs outgoing SAML messages.
  796. Signing can be configured using the following settings:
  797. `signing.saml_messages`::
  798. A list of SAML message types that should be signed or `*` to sign all messages.
  799. Each element in the list should be the local name of a SAML XML Element.
  800. Supported element types are `AuthnRequest`, `LogoutRequest` and `LogoutResponse`.
  801. Only valid if `signing.key` or `signing.keystore.path` is also specified.
  802. Defaults to `*`.
  803. `signing.key`::
  804. Specifies the path to the PEM encoded private key to use for SAML message signing.
  805. `signing.key` and `signing.keystore.path` cannot be used at the same time.
  806. `signing.secure_key_passphrase` (<<secure-settings,Secure>>)::
  807. Specifies the passphrase to decrypt the PEM encoded private key (`signing.key`)
  808. if it is encrypted.
  809. `signing.certificate`::
  810. Specifies the path to the PEM encoded certificate (or certificate chain) that
  811. corresponds to the `signing.key`. This certificate must also be included in the
  812. Service Provider metadata or manually configured within the IdP to allow for
  813. signature validation. This setting can only be used if `signing.key` is set.
  814. `signing.keystore.path`::
  815. The path to the keystore that contains a private key and certificate.
  816. Must be either a Java Keystore (jks) or a PKCS#12 file.
  817. `signing.key` and `signing.keystore.path` cannot be used at the same time.
  818. `signing.keystore.type`::
  819. The type of the keystore in `signing.keystore.path`.
  820. Must be either `jks` or `PKCS12`. If the keystore path ends in ".p12", ".pfx",
  821. or "pkcs12", this setting defaults to `PKCS12`. Otherwise, it defaults to `jks`.
  822. `signing.keystore.alias`::
  823. Specifies the alias of the key within the keystore that should be
  824. used for SAML message signing. If the keystore contains more than one private
  825. key, this setting must be specified.
  826. `signing.keystore.secure_password` (<<secure-settings,Secure>>)::
  827. The password to the keystore in `signing.keystore.path`.
  828. `signing.keystore.secure_key_password` (<<secure-settings,Secure>>)::
  829. The password for the key in the keystore (`signing.keystore.path`).
  830. Defaults to the keystore password.
  831. [float]
  832. [[ref-saml-encryption-settings]]
  833. ===== SAML realm encryption settings
  834. If an encryption key is configured (that is, either `encryption.key` or
  835. `encryption.keystore.path` is set), then {es} publishes an encryption
  836. certificate when generating metadata and attempts to decrypt incoming SAML
  837. content. Encryption can be configured using the following settings:
  838. `encryption.key`::
  839. Specifies the path to the PEM encoded private key to use for SAML message
  840. decryption.
  841. `encryption.key` and `encryption.keystore.path` cannot be used at the same time.
  842. `encryption.secure_key_passphrase` (<<secure-settings,Secure>>)::
  843. Specifies the passphrase to decrypt the PEM encoded private key
  844. (`encryption.key`) if it is encrypted.
  845. `encryption.certificate`::
  846. Specifies the path to the PEM encoded certificate (or certificate chain) that is
  847. associated with the `encryption.key`. This certificate must also be included in
  848. the Service Provider metadata or manually configured within the IdP to enable
  849. message encryption. This setting can be used only if `encryption.key` is set.
  850. `encryption.keystore.path`::
  851. The path to the keystore that contains a private key and certificate.
  852. Must be either a Java Keystore (jks) or a PKCS#12 file.
  853. `encryption.key` and `encryption.keystore.path` cannot be used at the same time.
  854. `encryption.keystore.type`::
  855. The type of the keystore (`encryption.keystore.path`).
  856. Must be either `jks` or `PKCS12`. If the keystore path ends in ".p12", ".pfx",
  857. or "pkcs12", this setting defaults to `PKCS12`. Otherwise, it defaults to `jks`.
  858. `encryption.keystore.alias`::
  859. Specifies the alias of the key within the keystore (`encryption.keystore.path`)
  860. that should be used for SAML message decryption. If not specified, all compatible
  861. key pairs from the keystore are considered as candidate keys for decryption.
  862. `encryption.keystore.secure_password` (<<secure-settings,Secure>>)::
  863. The password to the keystore (`encryption.keystore.path`).
  864. `encryption.keystore.secure_key_password` (<<secure-settings,Secure>>)::
  865. The password for the key in the keystore (`encryption.keystore.path`). Only a
  866. single password is supported. If you are using multiple decryption keys,
  867. they cannot have individual passwords.
  868. [float]
  869. [[ref-saml-ssl-settings]]
  870. ===== SAML realm SSL settings
  871. If you are loading the IdP metadata over SSL/TLS (that is, `idp.metadata.path`
  872. is a URL using the `https` protocol), the following settings can be used to
  873. configure SSL.
  874. NOTE: These settings are not used for any purpose other than loading metadata
  875. over https.
  876. `ssl.key`::
  877. Specifies the path to the PEM encoded private key to use for http client
  878. authentication (if required). `ssl.key` and `ssl.keystore.path` cannot be used
  879. at the same time.
  880. `ssl.key_passphrase`::
  881. Specifies the
  882. passphrase to decrypt the PEM encoded private key (`ssl.key`) if it is
  883. encrypted. Cannot be used with `ssl.secure_key_passphrase`.
  884. `ssl.secure_key_passphrase` (<<secure-settings,Secure>>)::
  885. Specifies the
  886. passphrase to decrypt the PEM encoded private key (`ssl.key`) if it is
  887. encrypted. Cannot be used with `ssl.key_passphrase`.
  888. `ssl.certificate`::
  889. Specifies the
  890. path to the PEM encoded certificate (or certificate chain) that is associated
  891. with the key (`ssl.key`). This setting can be used only if `ssl.key` is set.
  892. `ssl.certificate_authorities`::
  893. Specifies the
  894. paths to the PEM encoded certificate authority certificates that should be
  895. trusted. `ssl.certificate_authorities` and `ssl.truststore.path` cannot be
  896. used at the same time.
  897. `ssl.keystore.path`::
  898. Specifies the path to
  899. the keystore that contains a private key and certificate.
  900. Must be either a Java Keystore (jks) or a PKCS#12 file.
  901. `ssl.key` and `ssl.keystore.path` cannot be used at the same time.
  902. `ssl.keystore.type`::
  903. The type of the keystore (`ssl.keystore.path`). Must be either `jks` or `PKCS12`.
  904. If the keystore path ends in ".p12", ".pfx" or "pkcs12", this setting defaults
  905. to `PKCS12`. Otherwise, it defaults to `jks`.
  906. `ssl.keystore.password`::
  907. The password to the keystore (`ssl.keystore.path`). This setting cannot be used
  908. with `ssl.keystore.secure_password`.
  909. `ssl.keystore.secure_password` (<<secure-settings,Secure>>)::
  910. The password to the keystore (`ssl.keystore.path`).
  911. This setting cannot be used with `ssl.keystore.password`.
  912. `ssl.keystore.key_password`::
  913. The password for the key in the keystore (`ssl.keystore.path`).
  914. Defaults to the keystore password. This setting cannot be used with
  915. `ssl.keystore.secure_key_password`.
  916. `ssl.keystore.secure_key_password` (<<secure-settings,Secure>>)::
  917. The password for the key in the keystore (`ssl.keystore.path`).
  918. Defaults to the keystore password. This setting cannot be used with
  919. `ssl.keystore.key_password`.
  920. `ssl.truststore.path`::
  921. The path to the
  922. keystore that contains the certificates to trust.
  923. Must be either a Java Keystore (jks) or a PKCS#12 file.
  924. `ssl.certificate_authorities` and `ssl.truststore.path` cannot be used at the
  925. same time.
  926. `ssl.truststore.type`::
  927. The type of the truststore (`ssl.truststore.path`). Must be either `jks` or
  928. `PKCS12`. If the keystore path ends in ".p12", ".pfx" or "pkcs12", this setting
  929. defaults to `PKCS12`. Otherwise, it defaults to `jks`.
  930. `ssl.truststore.password`::
  931. The password to the truststore (`ssl.truststore.path`). This setting cannot be
  932. used with `ssl.truststore.secure_password`.
  933. `ssl.truststore.secure_password` (<<secure-settings,Secure>>)::
  934. The password to the truststore (`ssl.truststore.path`). This setting cannot be
  935. used with `ssl.truststore.password`.
  936. `ssl.verification_mode`::
  937. One of `full`
  938. (verify the hostname and the certificate path), `certificate` (verify the
  939. certificate path, but not the hostname) or `none` (perform no verification).
  940. Defaults to `full`.
  941. +
  942. See <<ssl-tls-settings,`ssl.verification_mode`>> for a more detailed explanation of these values.
  943. `ssl.supported_protocols`::
  944. Specifies the supported protocols for TLS/SSL. Defaults to `TLSv1.3,TLSv1.2,TLSv1.1`.
  945. `ssl.cipher_suites`::
  946. Specifies the
  947. cipher suites that should be supported.
  948. [float]
  949. [[ref-kerberos-settings]]
  950. ===== Kerberos realm settings
  951. For a Kerberos realm, the `type` must be set to `kerberos`. In addition to the
  952. <<ref-realm-settings,settings that are valid for all realms>>, you can specify
  953. the following settings:
  954. `keytab.path`:: Specifies the path to the Kerberos keytab file that contains the
  955. service principal used by this {es} node. This must be a location within the
  956. {es} configuration directory and the file must have read permissions. Required.
  957. `remove_realm_name`:: Set to `true` to remove the realm part of principal names.
  958. Principal names in Kerberos have the form `user/instance@REALM`. If this option
  959. is `true`, the realm part (`@REALM`) will not be included in the username.
  960. Defaults to `false`.
  961. `krb.debug`:: Set to `true` to enable debug logs for the Java login module that
  962. provides support for Kerberos authentication. Defaults to `false`.
  963. `cache.ttl`:: The time-to-live for cached user entries. A user is cached for
  964. this period of time. Specify the time period using the standard {es}
  965. <<time-units,time units>>. Defaults to `20m`.
  966. `cache.max_users`:: The maximum number of user entries that can live in the
  967. cache at any given time. Defaults to 100,000.
  968. `authorization_realms`::
  969. The names of the realms that should be consulted for delegated authorization.
  970. If this setting is used, then the Kerberos realm does not perform role mapping and
  971. instead loads the user from the listed realms.
  972. See {stack-ov}/realm-chains.html#authorization_realms[Delegating authorization to another realm]
  973. [[ref-oidc-settings]]
  974. [float]
  975. ===== OpenID Connect realm settings
  976. In addition to the <<ref-realm-settings,settings that are valid for all realms>>, you
  977. can specify the following settings:
  978. `op.issuer`::
  979. A verifiable Identifier for your OpenID Connect Provider. An Issuer
  980. Identifier is usually a case sensitive URL using the https scheme that contains
  981. scheme, host, and optionally, port number and path components and no query or
  982. fragment components. The value for this setting should be provided by your OpenID
  983. Connect Provider.
  984. `op.authorization_endpoint`::
  985. The URL for the Authorization Endpoint at the
  986. OpenID Connect Provider. The value for this setting should be provided by your OpenID
  987. Connect Provider.
  988. `op.token_endpoint`::
  989. The URL for the Token Endpoint at the OpenID Connect Provider.
  990. The value for this setting should be provided by your OpenID Connect Provider.
  991. `op.userinfo_endpoint`::
  992. The URL for the User Info Endpoint at the OpenID Connect Provider.
  993. The value for this setting should be provided by your OpenID Connect Provider.
  994. `op.endsession_endpoint`::
  995. The URL for the End Session Endpoint at the OpenID Connect
  996. Provider. The value for this setting should be provided by your OpenID Connect Provider.
  997. `op.jwkset_path`::
  998. The path or URL to a JSON Web Key Set with the key material that the OpenID Connect
  999. Provider uses for signing tokens and claims responses.
  1000. If a path is provided, then it is resolved relative to the {es} config
  1001. directory.
  1002. If a URL is provided, then it must be either a `file` URL or a `https` URL.
  1003. {es} automatically caches the retrieved JWK set to avoid unnecessary HTTP
  1004. requests but will attempt to refresh the JWK upon signature verification
  1005. failure, as this might indicate that the OpenID Connect Provider has
  1006. rotated the signing keys.
  1007. File based resources are polled at a frequency determined by the global {es}
  1008. `resource.reload.interval.high` setting, which defaults to 5 seconds.
  1009. `rp.client_id`::
  1010. The OAuth 2.0 Client Identifier that was assigned to {es} during registration
  1011. at the OpenID Connect Provider
  1012. `rp.client_secret`(<<secure-settings,Secure>>)::
  1013. The OAuth 2.0 Client Secret that was assigned to {es} during registration
  1014. at the OpenID Connect Provider
  1015. `rp.redirect_uri`::
  1016. The Redirect URI within {kib}. If you want to use the authorization code flow, this is the
  1017. "api/security/v1/oidc" endpoint of your {kib} server. If you want to use the implicit flow, it is the "api/security/v1/oidc/implicit" endpoint.
  1018. For example, `https://kibana.example.com/api/security/v1/oidc`.
  1019. `rp.response_type`::
  1020. OAuth 2.0 Response Type value that determines the authorization
  1021. processing flow to be used. Can be `code` for authorization code grant flow,
  1022. or one of `id_token`, `id_token token` for the implicit flow.
  1023. `rp.signature_algorithm`::
  1024. The signature algorithm that will be used by {es} in order to verify the
  1025. signature of the id tokens it will receive from the OpenID Connect Provider.
  1026. Defaults to `RSA256`
  1027. `rp.requested_scopes`::
  1028. The scope values that will be requested by the OpenID Connect Provider as
  1029. part of the Authentication Request. Optional, defaults to `openid`
  1030. `rp.post_logout_redirect_uri`::
  1031. The Redirect URI (usually within {kib}) that the OpenID Connect Provider
  1032. should redirect the browser to after a successful Single Logout.
  1033. `claims.principal`::
  1034. The name of the OpenID Connect claim that contains the user's principal (username).
  1035. `claims.groups`::
  1036. The name of the OpenID Connect claim that contains the user's groups.
  1037. `claims.name`::
  1038. The name of the OpenID Connect claim that contains the user's full name.
  1039. `claims.mail`::
  1040. The name of the OpenID Connect claim that contains the user's email address.
  1041. `claims.dn`::
  1042. The name of the OpenID Connect claim that contains the user's X.509
  1043. _Distinguished Name_.
  1044. `claim_patterns.principal`::
  1045. A Java regular expression that is matched against the OpenID Connect claim specified
  1046. by `claims.principal` before it is applied to the user's _principal_ property.
  1047. The attribute value must match the pattern and the value of the first
  1048. _capturing group_ is used as the principal. For example, `^([^@]+)@example\\.com$`
  1049. matches email addresses from the "example.com" domain and uses the local-part as
  1050. the principal.
  1051. `claim_patterns.groups`::
  1052. As per `claim_patterns.principal`, but for the _group_ property.
  1053. `claim_patterns.name`::
  1054. As per `claim_patterns.principal`, but for the _name_ property.
  1055. `claim_patterns.mail`::
  1056. As per `claim_patterns.principal`, but for the _mail_ property.
  1057. `claim_patterns.dn`::
  1058. As per `claim_patterns.principal`, but for the _dn_ property.
  1059. `allowed_clock_skew`::
  1060. The maximum allowed clock skew to be taken into consideration when validating
  1061. id tokens with regards to their creation and expiration times.
  1062. `populate_user_metadata`::
  1063. Specifies whether to populate the {es} user's metadata with the values that are
  1064. provided by the OpenID Connect claims. Defaults to `true`.
  1065. `http.connect_timeout`::
  1066. Controls the behavior of the http client used for back-channel communication to
  1067. the OpenID Connect Provider endpoints. Specifies the timeout until a connection
  1068. is established. A value of zero means the timeout is not used. Defaults to `5s`
  1069. `http.connection_read_timeout`::
  1070. Controls the behavior of the http client used for back-channel communication to
  1071. the OpenID Connect Provider endpoints. Specifies the timeout used when
  1072. requesting a connection from the connection manager. Defaults to `5s`
  1073. `http.socket_timeout`::
  1074. Controls the behavior of the http client used for back-channel communication to
  1075. the OpenID Connect Provider endpoints. Specifies the socket timeout (SO_TIMEOUT)
  1076. in milliseconds, which is the timeout for waiting for data or, put differently,
  1077. a maximum period inactivity between two consecutive data packets). Defaults to
  1078. `5s`
  1079. `http.max_connections`::
  1080. Controls the behavior of the http client used for back-channel communication to
  1081. the OpenID Connect Provider endpoints. Specifies the maximum number of
  1082. connections allowed across all endpoints.
  1083. `http.max_endpoint_connections`::
  1084. Controls the behavior of the http client used for back-channel communication to
  1085. the OpenID Connect Provider endpoints. Specifies the maximum number of
  1086. connections allowed per endpoint.
  1087. [float]
  1088. [[ref-oidc-ssl-settings]]
  1089. ===== OpenID Connect realm SSL settings
  1090. The following settings can be used to configure SSL for all outgoing http connections
  1091. to the OpenID Connect Provider endpoints.
  1092. NOTE: These settings are _only_ used for the back-channel communication between
  1093. {es} and the OpenID Connect Provider
  1094. `ssl.key`::
  1095. Specifies the path to the PEM encoded private key to use for http client
  1096. authentication (if required). `ssl.key` and `ssl.keystore.path` cannot be used
  1097. at the same time.
  1098. `ssl.key_passphrase`::
  1099. Specifies the passphrase to decrypt the PEM encoded private key (`ssl.key`) if it is
  1100. encrypted. Cannot be used with `ssl.secure_key_passphrase`.
  1101. `ssl.secure_key_passphrase` (<<secure-settings,Secure>>)::
  1102. Specifies the passphrase to decrypt the PEM encoded private key (`ssl.key`) if it is
  1103. encrypted. Cannot be used with `ssl.key_passphrase`.
  1104. `ssl.certificate`::
  1105. Specifies the path to the PEM encoded certificate (or certificate chain) that is associated
  1106. with the key (`ssl.key`). This setting can be used only if `ssl.key` is set.
  1107. `ssl.certificate_authorities`::
  1108. Specifies the paths to the PEM encoded certificate authority certificates that should be
  1109. trusted. `ssl.certificate_authorities` and `ssl.truststore.path` cannot be
  1110. used at the same time.
  1111. `ssl.keystore.path`::
  1112. Specifies the path to the keystore that contains a private key and certificate.
  1113. Must be either a Java Keystore (jks) or a PKCS#12 file.
  1114. `ssl.key` and `ssl.keystore.path` cannot be used at the same time.
  1115. `ssl.keystore.type`::
  1116. The type of the keystore (`ssl.keystore.path`). Must be either `jks` or `PKCS12`.
  1117. If the keystore path ends in ".p12", ".pfx" or "pkcs12", this setting defaults
  1118. to `PKCS12`. Otherwise, it defaults to `jks`.
  1119. `ssl.keystore.password`::
  1120. The password to the keystore (`ssl.keystore.path`). This setting cannot be used
  1121. with `ssl.keystore.secure_password`.
  1122. `ssl.keystore.secure_password` (<<secure-settings,Secure>>)::
  1123. The password to the keystore (`ssl.keystore.path`).
  1124. This setting cannot be used with `ssl.keystore.password`.
  1125. `ssl.keystore.key_password`::
  1126. The password for the key in the keystore (`ssl.keystore.path`).
  1127. Defaults to the keystore password. This setting cannot be used with
  1128. `ssl.keystore.secure_key_password`.
  1129. `ssl.keystore.secure_key_password` (<<secure-settings,Secure>>)::
  1130. The password for the key in the keystore (`ssl.keystore.path`).
  1131. Defaults to the keystore password. This setting cannot be used with
  1132. `ssl.keystore.key_password`.
  1133. `ssl.truststore.path`::
  1134. The path to the keystore that contains the certificates to trust.
  1135. Must be either a Java Keystore (jks) or a PKCS#12 file.
  1136. `ssl.certificate_authorities` and `ssl.truststore.path` cannot be used at the
  1137. same time.
  1138. `ssl.truststore.type`::
  1139. The type of the truststore (`ssl.truststore.path`). Must be either `jks` or
  1140. `PKCS12`. If the keystore path ends in ".p12", ".pfx" or "pkcs12", this setting
  1141. defaults to `PKCS12`. Otherwise, it defaults to `jks`.
  1142. `ssl.truststore.password`::
  1143. The password to the truststore (`ssl.truststore.path`). This setting cannot be
  1144. used with `ssl.truststore.secure_password`.
  1145. `ssl.truststore.secure_password` (<<secure-settings,Secure>>)::
  1146. The password to the truststore (`ssl.truststore.path`). This setting cannot be
  1147. used with `ssl.truststore.password`.
  1148. `ssl.verification_mode`::
  1149. One of `full` (verify the hostname and the certificate path), `certificate` (verify the
  1150. certificate path, but not the hostname) or `none` (perform no verification).
  1151. Defaults to `full`.
  1152. +
  1153. See <<ssl-tls-settings,`ssl.verification_mode`>> for a more detailed explanation of these values.
  1154. `ssl.supported_protocols`::
  1155. Specifies the supported protocols for TLS/SSL. Defaults to `TLSv1.3,TLSv1.2,TLSv1.1` if
  1156. the JVM supports TLSv1.3, otherwise `TLSv1.2,TLSv1.1`.
  1157. `ssl.cipher_suites`::
  1158. Specifies the cipher suites that should be supported.
  1159. [float]
  1160. [[load-balancing]]
  1161. ===== Load balancing and failover
  1162. The `load_balance.type` setting can have the following values:
  1163. * `failover`: The URLs specified are used in the order that they are specified.
  1164. The first server that can be connected to will be used for all subsequent
  1165. connections. If a connection to that server fails then the next server that a
  1166. connection can be established to will be used for subsequent connections.
  1167. * `dns_failover`: In this mode of operation, only a single URL may be specified.
  1168. This URL must contain a DNS name. The system will be queried for all IP
  1169. addresses that correspond to this DNS name. Connections to the Active Directory
  1170. or LDAP server will always be tried in the order in which they were retrieved.
  1171. This differs from `failover` in that there is no reordering of the list and if a
  1172. server has failed at the beginning of the list, it will still be tried for each
  1173. subsequent connection.
  1174. * `round_robin`: Connections will continuously iterate through the list of
  1175. provided URLs. If a server is unavailable, iterating through the list of URLs
  1176. will continue until a successful connection is made.
  1177. * `dns_round_robin`: In this mode of operation, only a single URL may be
  1178. specified. This URL must contain a DNS name. The system will be queried for all
  1179. IP addresses that correspond to this DNS name. Connections will continuously
  1180. iterate through the list of addresses. If a server is unavailable, iterating
  1181. through the list of URLs will continue until a successful connection is made.
  1182. [float]
  1183. [[ssl-tls-settings]]
  1184. ==== Default values for TLS/SSL settings
  1185. In general, the values below represent the default values for the various TLS
  1186. settings.
  1187. The prefixes for these settings are based on the context in which they are
  1188. used (e.g. `xpack.security.authc.realms.ldap.corp_ldap.ssl.verification_mode`
  1189. or `xpack.security.transport.ssl.supported_protocols`).
  1190. For more information, see
  1191. {stack-ov}/encrypting-communications.html[Encrypting communications].
  1192. `*.ssl.supported_protocols`::
  1193. Supported protocols with versions. Valid protocols: `SSLv2Hello`,
  1194. `SSLv3`, `TLSv1`, `TLSv1.1`, `TLSv1.2`, `TLSv1.3`. Defaults to `TLSv1.3,TLSv1.2,TLSv1.1`.
  1195. +
  1196. --
  1197. NOTE: If `xpack.security.fips_mode.enabled` is `true`, you cannot use `SSLv2Hello`
  1198. or `SSLv3`. See <<fips-140-compliance>>.
  1199. --
  1200. `*.ssl.client_authentication`::
  1201. Controls the server's behavior in regard to requesting a certificate
  1202. from client connections. Valid values are `required`, `optional`, and `none`.
  1203. `required` forces a client to present a certificate, while `optional`
  1204. requests a client certificate but the client is not required to present one.
  1205. Defaults to `required`, except for HTTP, which defaults to `none`. See
  1206. <<http-tls-ssl-settings>>.
  1207. `*.ssl.verification_mode`::
  1208. Controls the verification of certificates. Valid values are:
  1209. - `full`, which verifies that the provided certificate is signed by a trusted
  1210. authority (CA) and also verifies that the server's hostname (or IP
  1211. address) matches the names identified within the certificate.
  1212. - `certificate`, which verifies that the provided certificate is signed by a
  1213. trusted authority (CA), but does not perform any hostname verification.
  1214. - `none`, which performs _no verification_ of the server's certificate. This mode
  1215. disables many of the security benefits of SSL/TLS and should only be
  1216. used after very careful consideration. It is primarily intended as a
  1217. temporary diagnostic mechanism when attempting to resolve TLS errors,
  1218. and its use on production clusters is strongly discouraged.
  1219. +
  1220. The default value is `full`.
  1221. `*.ssl.cipher_suites`::
  1222. Supported cipher suites can be found in Oracle's
  1223. https://docs.oracle.com/en/java/javase/11/security/oracle-providers.html#GUID-7093246A-31A3-4304-AC5F-5FB6400405E2[Java Cryptography Architecture documentation].
  1224. Defaults to `TLS_AES_256_GCM_SHA384`, `TLS_AES_128_GCM_SHA256`,
  1225. `TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384`, `TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256`,
  1226. `TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384`, `TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256`,
  1227. `TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384`, `TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256`,
  1228. `TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384`, `TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256`,
  1229. `TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA`, `TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA`,
  1230. `TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA`, `TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA`,
  1231. `TLS_RSA_WITH_AES_256_GCM_SHA384`, `TLS_RSA_WITH_AES_128_GCM_SHA256`,
  1232. `TLS_RSA_WITH_AES_256_CBC_SHA256`, `TLS_RSA_WITH_AES_128_CBC_SHA256`,
  1233. `TLS_RSA_WITH_AES_256_CBC_SHA`, `TLS_RSA_WITH_AES_128_CBC_SHA`.
  1234. [float]
  1235. [[tls-ssl-key-settings]]
  1236. ===== TLS/SSL key and trusted certificate settings
  1237. The following settings are used to specify a private key, certificate, and the
  1238. trusted certificates that should be used when communicating over an SSL/TLS
  1239. connection. If no trusted certificates are configured, the default certificates
  1240. that are trusted by the JVM will be trusted along with the certificate(s)
  1241. associated with a key in the same context. The key and certificate must be in
  1242. place for connections that require client authentication or when acting as a
  1243. SSL enabled server.
  1244. [[pkcs12-truststore-note]]
  1245. [NOTE]
  1246. Storing trusted certificates in a PKCS#12 file, although supported, is
  1247. uncommon in practice. The {ref}/certutil.html[`elasticsearch-certutil`] tool,
  1248. as well as Java's `keytool`, are designed to generate PKCS#12 files that
  1249. can be used both as a keystore and as a truststore, but this may not be the
  1250. case for container files that are created using other tools. Usually,
  1251. PKCS#12 files only contain secret and private entries. To confirm that
  1252. a PKCS#12 container includes trusted certificate ("anchor") entries look for
  1253. `2.16.840.1.113894.746875.1.1: <Unsupported tag 6>` in the
  1254. `openssl pkcs12 -info` output, or `trustedCertEntry` in the
  1255. `keytool -list` output.
  1256. [[http-tls-ssl-settings]]
  1257. :ssl-prefix: xpack.security.http
  1258. :component: HTTP
  1259. :client-auth-default: none
  1260. :verifies!:
  1261. :server:
  1262. :ssl-context: security-http
  1263. include::ssl-settings.asciidoc[]
  1264. [[transport-tls-ssl-settings]]
  1265. :ssl-prefix: xpack.security.transport
  1266. :component: Transport
  1267. :client-auth-default!:
  1268. :verifies:
  1269. :server:
  1270. :ssl-context: security-transport
  1271. include::ssl-settings.asciidoc[]
  1272. [[ssl-tls-profile-settings]]
  1273. [float]
  1274. ===== Transport profile TLS/SSL settings
  1275. The same settings that are available for the <<transport-tls-ssl-settings, default transport>>
  1276. are also available for each transport profile. By default, the settings for a
  1277. transport profile will be the same as the default transport unless they
  1278. are specified.
  1279. As an example, lets look at the key setting. For the default transport
  1280. this is `xpack.security.transport.ssl.key`. In order to use this setting in a
  1281. transport profile, use the prefix `transport.profiles.$PROFILE.xpack.security.` and
  1282. append the portion of the setting after `xpack.security.transport.`. For the key
  1283. setting, this would be `transport.profiles.$PROFILE.xpack.security.ssl.key`.
  1284. [float]
  1285. [[ip-filtering-settings]]
  1286. ==== IP filtering settings
  1287. You can configure the following settings for {stack-ov}/ip-filtering.html[IP filtering].
  1288. `xpack.security.transport.filter.allow`::
  1289. List of IP addresses to allow.
  1290. `xpack.security.transport.filter.deny`::
  1291. List of IP addresses to deny.
  1292. `xpack.security.http.filter.allow`::
  1293. List of IP addresses to allow just for HTTP.
  1294. `xpack.security.http.filter.deny`::
  1295. List of IP addresses to deny just for HTTP.
  1296. `transport.profiles.$PROFILE.xpack.security.filter.allow`::
  1297. List of IP addresses to allow for this profile.
  1298. `transport.profiles.$PROFILE.xpack.security.filter.deny`::
  1299. List of IP addresses to deny for this profile.
  1300. include::security-hash-settings.asciidoc[]