[role="xpack"]
[[security-settings]]
=== Security settings in {es}
++++
Security settings
++++
You configure `xpack.security` settings to
<> and perform message
authentication,
<>,
<>,
<>,and
<>.
All of these settings can be added to the `elasticsearch.yml` configuration file,
with the exception of the secure settings, which you add to the {es} keystore.
For more information about creating and updating the {es} keystore, see
<>.
[discrete]
[[general-security-settings]]
==== General security settings
`xpack.security.enabled`::
(<>)
Defaults to `true`, which enables {es} {security-features} on the node.
This setting must be enabled to use Elasticsearch's authentication,
authorization and audit features. +
+
--
If set to `false`, {security-features} are disabled, which is not recommended.
It also affects all {kib} instances that connect to this {es} instance; you do
not need to disable {security-features} in those `kibana.yml` files. For more
information about disabling {security-features} in specific {kib} instances, see
{kibana-ref}/security-settings-kb.html[{kib} security settings].
--
`xpack.security.autoconfiguration.enabled`::
(<>)
Defaults to `true`, which enables
<>.
+
--
If set to `false`, security auto configuration is disabled, which is not
recommended. When disabled, security is not configured automatically when
starting {es} for the first time, which means that you must
<>.
--
`xpack.security.enrollment.enabled`::
(<>)
Defaults to `false`. Controls enrollment (of nodes and {kib}) to a local node
that's been <>.
When set to `true`, the local node can generate new enrollment tokens. Existing
tokens can be used for enrollment if they are still valid.
+
--
The security autoconfiguration process will set this to `true` unless
an administrator sets it to `false` before starting {es}.
--
`xpack.security.hide_settings`::
(<>)
A comma-separated list of settings that are omitted from the results of the
<>. You can use wildcards to include
multiple settings in the list. For example, the following value hides all the
settings for the ad1 active_directory realm:
`xpack.security.authc.realms.active_directory.ad1.*`.
The API already omits all `ssl` settings, `bind_dn`, and `bind_password` due to
the sensitive nature of the information.
`xpack.security.fips_mode.enabled`::
(<>)
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 <>. Defaults to `false`.
`xpack.security.fips_mode.required_providers`::
(<>)
Optionally enforce specific Java JCE/JSSE security providers. For example, set this to `["BCFIPS", "BCJSSE"]` (case-insensitive) to require
the Bouncy Castle FIPS JCE and JSSE security providers. Only applicable when `xpack.security.fips_mode.enabled` is set to `true`.
[discrete]
[[password-hashing-settings]]
==== Password hashing settings
`xpack.security.authc.password_hashing.algorithm`::
(<>)
Specifies the hashing algorithm that is used for secure user credential storage.
See <>.
If `xpack.security.fips_mode.enabled` is true (see <>), defaults to `pbkdf2_stretch`.
In all other cases, defaults to `bcrypt`.
[discrete]
[[anonymous-access-settings]]
==== Anonymous access settings
You can configure the following anonymous access settings in
`elasticsearch.yml`. For more information, see <>.
`xpack.security.authc.anonymous.username`::
(<>)
The username (principal) of the anonymous user. Defaults to `_es_anonymous_user`.
`xpack.security.authc.anonymous.roles`::
(<>)
The roles to associate with the anonymous user. Required.
`xpack.security.authc.anonymous.authz_exception`::
(<>)
When `true`, an HTTP 403 response is returned if the anonymous user
does not have the appropriate permissions for the requested action. The
user is not prompted to provide credentials to access the requested
resource. When set to `false`, an HTTP 401 response is returned and the user
can provide credentials with the appropriate permissions to gain
access. Defaults to `true`.
[discrete]
[[security-automata-settings]]
==== Automata Settings
In places where the {security-features} accept wildcard patterns (e.g. index
patterns in roles, group matches in the role mapping API), each pattern is
compiled into an Automaton. The follow settings are available to control this
behaviour.
`xpack.security.automata.max_determinized_states`::
(<>)
The upper limit on how many automaton states may be created by a single pattern.
This protects against too-difficult (e.g. exponentially hard) patterns.
Defaults to `100,000`.
`xpack.security.automata.cache.enabled`::
(<>)
Whether to cache the compiled automata. Compiling automata can be CPU intensive
and may slowdown some operations. The cache reduces the frequency with which
automata need to be compiled.
Defaults to `true`.
`xpack.security.automata.cache.size`::
(<>)
The maximum number of items to retain in the automata cache.
Defaults to `10,000`.
`xpack.security.automata.cache.ttl`::
(<>)
The length of time to retain in an item in the automata cache (based on most
recent usage).
Defaults to `48h` (48 hours).
[discrete]
[[field-document-security-settings]]
==== Document and field level security settings
You can set the following document and field level security
settings in `elasticsearch.yml`. For more information, see
<>.
`xpack.security.dls_fls.enabled`::
(<>)
Set to `false` to prevent document and field level security
from being configured. Defaults to `true`.
`xpack.security.dls.bitset.cache.ttl`::
(<>)
The time-to-live for cached `BitSet` entries for document level security.
Document level security queries may depend on Lucene BitSet objects, and these are
automatically cached to improve performance. Defaults to expire entries that are
unused for `2h` (2 hours).
`xpack.security.dls.bitset.cache.size`::
(<>)
The maximum memory usage of cached `BitSet` entries for document level security.
Document level security queries may depend on Lucene BitSet objects, and these are
automatically cached to improve performance. Can be configured as a raw number
of bytes (such as `200mb` or `1g`) or a percentage of the node's JVM heap
memory (such as `5%`). When the default value is exceeded, the least recently
used entries are evicted. Defaults to `10%` of the heap assigned to the node.
[discrete]
[[token-service-settings]]
==== Token service settings
You can set the following token service settings in
`elasticsearch.yml`.
`xpack.security.authc.token.enabled`::
(<>)
Set to `false` to disable the built-in token service. Defaults to `true` unless
`xpack.security.http.ssl.enabled` is `false`. This prevents sniffing the token
from a connection over plain http.
`xpack.security.authc.token.timeout`::
(<>)
The length of time that a token is valid for. By default this value is `20m` or
20 minutes. The maximum value is 1 hour.
[discrete]
[[api-key-service-settings]]
==== API key service settings
You can set the following API key service settings in
`elasticsearch.yml`.
`xpack.security.authc.api_key.enabled`::
(<>)
Set to `false` to disable the built-in API key service. Defaults to `true`.
`xpack.security.authc.api_key.cache.ttl`::
(<>)
The time-to-live for cached API key entries. A API key id and a hash of its
API key are cached for this period of time. Specify the time period using
the standard {es} <>. Defaults to `1d`.
`xpack.security.authc.api_key.cache.max_keys`::
(<>)
The maximum number of API key entries that can live in the
cache at any given time. Defaults to 10,000.
`xpack.security.authc.api_key.cache.hash_algo`::
(<>, Expert)
The hashing algorithm that is used for the
in-memory cached API key credentials. For possible values, see <>.
Defaults to `ssha256`.
[[api-key-service-settings-delete-retention-period]]
`xpack.security.authc.api_key.delete.retention_period`::
(<>)
Invalidated or expired API keys older than the retention period are eligible for deletion.
Defaults to `7d`.
--
NOTE: Large real-time clock inconsistency across cluster nodes can cause problems
with evaluating the API key retention period. That is, if the clock on the node
invalidating the API key is significantly different than the one performing the deletion,
the key may be retained for longer or shorter than the configured retention period.
--
`xpack.security.authc.api_key.delete.interval`::
(<>, Expert)
Cluster nodes schedule the automatic deletion of invalidated or expired API keys
that are older than the retention period.
This setting controls the minimum time interval between two such deletion jobs.
Defaults to `24h`.
+
NOTE: This is a low-level setting that currently controls the interval between
deletion jobs triggered per-node, not across the cluster.
`xpack.security.authc.api_key.delete.timeout`::
(<>, Expert)
Sets the timeout of the internal search and delete call.
`xpack.security.authc.api_key.hashing.algorithm`::
(<>)
Specifies the hashing algorithm that is used for securing API key credentials.
See <>. Defaults to `pbkdf2`.
[discrete]
[[security-domain-settings]]
==== Security domain settings
// tag::security-domain-settings-description-tag[]
You configure security domain settings in the `xpack.security.authc.domains`
namespace in `elasticsearch.yml`.
For example:
[source, yaml]
------------------------------------------------------------
xpack:
security:
authc:
domains:
my_domain: <1>
realms: [ 'default_native', 'saml1' ] <2>
------------------------------------------------------------
<1> Specifies the name of the security domain
<2> Specifies the realms that belong to the domain
// end::security-domain-settings-description-tag[]
[discrete]
[[realm-settings]]
==== Realm settings
// tag::realm-settings-description-tag[]
You configure realm settings in the `xpack.security.authc.realms`
namespace in `elasticsearch.yml`.
For example:
[source,yaml]
----------------------------------------
xpack.security.authc.realms:
native.realm1: <1>
order: 0 <2>
...
ldap.realm2:
order: 1
...
active_directory.realm3:
order: 2
...
...
----------------------------------------
<1> Specifies the type of realm (for example, `native`, `ldap`,
`active_directory`, `pki`, `file`, `kerberos`, `saml`) and the realm name. This
information is required.
<2> Specifies priority of a realm in the realm chain. This information
is required.
The valid settings vary depending on the realm type. For more
information, see <>.
// end::realm-settings-description-tag[]
[discrete]
[[ref-realm-settings]]
===== Settings valid for all realms
// tag::realm-order-tag[]
`order`::
(<>)
The priority of the realm within the realm chain. Realms with a lower order are
consulted first. The value must be unique for each realm. This setting is required.
// end::realm-order-tag[]
`enabled`::
(<>)
Indicates whether a realm is enabled. You can use this setting to disable a
realm without removing its configuration information. Defaults to `true`.
[[ref-native-settings]]
[discrete]
===== Native realm settings
In addition to the <>,
you can specify the following optional settings:
`cache.ttl`::
(<>)
The time-to-live for cached user entries. A user and a hash of its
credentials are cached for this period of time. Specify the time period using
the standard {es} <>. Defaults to `20m`.
`cache.max_users`::
(<>)
The maximum number of user entries that can live in the
cache at any given time. Defaults to 100,000.
`cache.hash_algo`::
(<>, Expert)
The hashing algorithm that is used for the
in-memory cached user credentials. For possible values, see <>.
Defaults to `ssha256`.
`authentication.enabled`::
(<>)
If set to `false`, disables authentication support in
this realm, so that it only supports user lookups.
(See the <> and
<> features).
Defaults to `true`.
[[ref-users-settings]]
[discrete]
===== File realm settings
In addition to the <>, you can specify
the following settings:
`cache.ttl`::
(<>)
The time-to-live for cached user entries. A user and a hash of its credentials
are cached for this configured period of time. Defaults to `20m`. Specify values
using the standard {es} <>.
Defaults to `20m`.
`cache.max_users`::
(<>)
The maximum number of user entries that can live in the cache at a given time.
Defaults to 100,000.
`cache.hash_algo`::
(<>, Expert)
The hashing algorithm that is used for the in-memory cached
user credentials. See <>. Defaults to `ssha256`.
`authentication.enabled`::
(<>)
If set to `false`, disables authentication support in
this realm, so that it only supports user lookups.
(See the <> and
<> features).
Defaults to `true`.
[[ref-ldap-settings]]
[discrete]
===== LDAP realm settings
In addition to the <>, you can specify the following settings:
`url`::
(<>)
One or more LDAP URLs in the `ldap[s]://:` format. Required.
+
To provide multiple URLs, use a YAML array (`["ldap://server1:636", "ldap://server2:636"]`)
or comma-separated string (`"ldap://server1:636, ldap://server2:636"`).
+
While both are supported, you can't mix the `ldap` and `ldaps` protocols.
`load_balance.type`::
(<>)
The behavior to use when there are multiple LDAP URLs defined. For supported
values see <>.
Defaults to `failover`.
`load_balance.cache_ttl`::
(<>)
When using `dns_failover` or `dns_round_robin` as the load balancing type,
this setting controls the amount of time to cache DNS lookups. Defaults
to `1h`.
`bind_dn`::
(<>)
The DN of the user that is used to bind to the LDAP and perform searches.
Only applicable in user search mode.
If not specified, an anonymous bind is attempted.
Defaults to Empty. Due to its potential security impact, `bind_dn` is not
exposed via the <>.
`bind_password`::
(<>)
deprecated[6.3] Use `secure_bind_password` instead. The password for the user
that is used to bind to the LDAP directory.
Defaults to Empty. Due to its potential security impact, `bind_password` is not
exposed via the <>.
`secure_bind_password`::
(<>, <>)
The password for the user that is used to bind to the LDAP directory.
Defaults to Empty.
`user_dn_templates`::
(<>)
The DN template that replaces the user name with the string `{0}`.
This setting is multivalued; you can specify multiple user contexts.
Required to operate in user template mode. If `user_search.base_dn` is specified,
this setting is not valid. For more information on
the different modes, see <>.
`authorization_realms`::
(<>)
The names of the realms that should be consulted for delegated authorization.
If this setting is used, then the LDAP realm does not perform role mapping and
instead loads the user from the listed realms. The referenced realms are
consulted in the order that they are defined in this list.
See <>.
+
--
NOTE: If any settings starting with `user_search` are specified, the
`user_dn_templates` settings are ignored.
--
`user_group_attribute`::
(<>)
Specifies the attribute to examine on the user for group membership.
If any `group_search` settings are specified, this setting is ignored. Defaults
to `memberOf`.
`user_full_name_attribute`::
(<>)
Specifies the attribute to examine on the user for the full name of the user.
Defaults to `cn`.
`user_email_attribute`::
(<>)
Specifies the attribute to examine on the user for the email address of the user.
Defaults to `mail`.
`user_search.base_dn`::
(<>)
Specifies a container DN to search for users. Required
to operated in user search mode. If `user_dn_templates` is specified, this
setting is not valid. For more information on
the different modes, see <>.
`user_search.scope`::
(<>)
The scope of the user search. Valid values are `sub_tree`, `one_level` or
`base`. `one_level` only searches objects directly contained within the
`base_dn`. `sub_tree` searches all objects contained under `base_dn`.
`base` specifies that the `base_dn` is the user object, and that it is
the only user considered. Defaults to `sub_tree`.
`user_search.filter`::
(<>)
Specifies the filter used to search the directory in attempts to match
an entry with the username provided by the user. Defaults to `(uid={0})`.
`{0}` is substituted with the username provided when searching.
`user_search.attribute`::
(<>)
deprecated[5.6] Use `user_search.filter` instead.
The attribute to match with the username sent with the request. Defaults to `uid`.
`user_search.pool.enabled`::
(<>)
Enables or disables connection pooling for user search. If set to `false`, a new
connection is created for every search. The
default is `true` when `bind_dn` is set.
`user_search.pool.size`::
(<>)
The maximum number of connections to the LDAP server to allow in the
connection pool. Defaults to `20`.
`user_search.pool.initial_size`::
(<>)
The initial number of connections to create to the LDAP server on startup.
Defaults to `0`. If the LDAP server is down, values greater than `0` could cause
startup failures.
`user_search.pool.health_check.enabled`::
(<>)
Enables or disables a health check on LDAP connections in the connection
pool. Connections are checked in the background at the specified interval.
Defaults to `true`.
`user_search.pool.health_check.dn`::
(<>)
The distinguished name that is retrieved as part of the health check.
Defaults to the value of `bind_dn` if present; if
not, falls back to `user_search.base_dn`.
`user_search.pool.health_check.interval`::
(<>)
The interval to perform background checks of connections in the pool.
Defaults to `60s`.
`group_search.base_dn`::
(<>)
The container DN to search for groups in which the user has membership. When
this element is absent, {es} searches for the attribute specified by
`user_group_attribute` set on the user in order to determine group membership.
`group_search.scope`::
(<>)
Specifies whether the group search should be `sub_tree`, `one_level` or
`base`. `one_level` only searches objects directly contained within the
`base_dn`. `sub_tree` searches all objects contained under `base_dn`.
`base` specifies that the `base_dn` is a group object, and that it is the
only group considered. Defaults to `sub_tree`.
`group_search.filter`::
(<>)
Specifies a filter to use to look up a group.
When not set, the realm searches for `group`, `groupOfNames`, `groupOfUniqueNames`,
or `posixGroup` with the attributes `member`, `memberOf`, or `memberUid`. Any
instance of `{0}` in the filter is replaced by the user attribute defined in
`group_search.user_attribute`.
`group_search.user_attribute`::
(<>)
Specifies the user attribute that is fetched and provided as a parameter to
the filter. If not set, the user DN is passed into the filter. Defaults to Empty.
`unmapped_groups_as_roles`::
(<>)
If set to `true`, the names of any unmapped LDAP groups are used as role names
and assigned to the user. A group is considered to be _unmapped_ if it is not
referenced in a <>. API-based
role mappings are not considered. Defaults to `false`.
`files.role_mapping`::
(<>)
The <> for the
<>. Defaults to
`ES_PATH_CONF/role_mapping.yml`.
`follow_referrals`::
(<>)
Specifies whether {es} should follow referrals returned
by the LDAP server. Referrals are URLs returned by the server that are to be
used to continue the LDAP operation (for example, search). Defaults to `true`.
`metadata`::
(<>)
A list of additional LDAP attributes that should be loaded from the
LDAP server and stored in the authenticated user's metadata field.
`timeout.tcp_connect`::
(<>)
The TCP connect timeout period for establishing an LDAP connection.
An `s` at the end indicates seconds, or `ms` indicates milliseconds.
Defaults to `5s` (5 seconds ).
`timeout.tcp_read`::
(<>)
deprecated[7.7] The TCP read timeout period after establishing an LDAP
connection. This is equivalent to and is deprecated in favor of
`timeout.response` and they cannot be used simultaneously. An `s` at the end
indicates seconds, or `ms` indicates milliseconds.
`timeout.response`::
(<>)
The time interval to wait for the response from the LDAP server. An `s` at the
end indicates seconds, or `ms` indicates milliseconds. Defaults to the value of
`timeout.ldap_search`.
`timeout.ldap_search`::
(<>)
The timeout period for an LDAP search. The value is specified in the request
and is enforced by the receiving LDAP Server.
An `s` at the end indicates seconds, or `ms` indicates milliseconds.
Defaults to `5s` (5 seconds ).
`ssl.key`::
(<>)
include::{es-ref-dir}/settings/common-defs.asciidoc[tag=ssl-key-pem]
+
If the LDAP server requires client authentication, it uses this file. You cannot
use this setting and `ssl.keystore.path` at the same time.
`ssl.key_passphrase`::
(<>)
include::{es-ref-dir}/settings/common-defs.asciidoc[tag=ssl-key-passphrase]
`ssl.secure_key_passphrase`::
(<>)
include::{es-ref-dir}/settings/common-defs.asciidoc[tag=ssl-secure-key-passphrase]
`ssl.certificate`::
(<>)
include::{es-ref-dir}/settings/common-defs.asciidoc[tag=ssl-certificate]
+
This certificate is presented to clients when they connect.
`ssl.certificate_authorities`::
(<>)
include::{es-ref-dir}/settings/common-defs.asciidoc[tag=ssl-certificate-authorities]
+
You cannot use this setting and `ssl.truststore.path` at the same time.
`ssl.keystore.path`::
(<>)
include::{es-ref-dir}/settings/common-defs.asciidoc[tag=ssl-keystore-path]
+
You cannot use this setting and `ssl.key` at the same time.
`ssl.keystore.type`::
(<>)
include::{es-ref-dir}/settings/common-defs.asciidoc[tag=ssl-keystore-type-pkcs12]
`ssl.keystore.password`::
(<>)
include::{es-ref-dir}/settings/common-defs.asciidoc[tag=ssl-keystore-password]
`ssl.keystore.secure_password`::
(<>)
include::{es-ref-dir}/settings/common-defs.asciidoc[tag=ssl-keystore-secure-password]
`ssl.keystore.key_password`::
(<>)
include::{es-ref-dir}/settings/common-defs.asciidoc[tag=ssl-keystore-key-password]
`ssl.keystore.secure_key_password`::
(<>)
include::{es-ref-dir}/settings/common-defs.asciidoc[tag=ssl-keystore-secure-key-password]
`ssl.truststore.path`::
(<>)
include::{es-ref-dir}/settings/common-defs.asciidoc[tag=ssl-truststore-path]
+
You cannot use this setting and `ssl.certificate_authorities` at the same time.
`ssl.truststore.password`::
(<>)
include::{es-ref-dir}/settings/common-defs.asciidoc[tag=ssl-truststore-password]
`ssl.truststore.secure_password`::
(<>)
include::{es-ref-dir}/settings/common-defs.asciidoc[tag=ssl-truststore-secure-password]
`ssl.truststore.type`::
(<>)
include::{es-ref-dir}/settings/common-defs.asciidoc[tag=ssl-truststore-type]
`ssl.verification_mode`::
(<>)
Indicates the type of verification when using `ldaps` to protect against man
in the middle attacks and certificate forgery.
include::{es-ref-dir}/settings/common-defs.asciidoc[tag=ssl-verification-mode-values]
`ssl.supported_protocols`::
(<>)
include::{es-ref-dir}/settings/common-defs.asciidoc[tag=ssl-supported-protocols]
`ssl.cipher_suites`::
(<>)
Specifies the cipher suites that should be supported when
communicating with the LDAP server.
include::{es-ref-dir}/settings/common-defs.asciidoc[tag=ssl-cipher-suites-values]
//TBD: Can this be updated to using the Java 11 URL instead or does it have to stay java8?
`cache.ttl`::
(<>)
Specifies the time-to-live for cached user entries. A user and a hash of its
credentials are cached for this period of time. Use the standard {es}
<>. Defaults to `20m`.
`cache.max_users`::
(<>)
Specifies the maximum number of user entries that the cache can contain.
Defaults to `100000`.
`cache.hash_algo`::
(<>, Expert)
Specifies the hashing algorithm that is used for the
in-memory cached user credentials. See <>. Defaults to `ssha256`.
`authentication.enabled`::
(<>)
If set to `false`, disables authentication support in
this realm, so that it only supports user lookups.
(See the <> and
<> features).
Defaults to `true`.
[[ref-ad-settings]]
[discrete]
===== Active Directory realm settings
In addition to the <>,
you can specify the following settings:
`url`::
(<>)
One or more LDAP URLs in the `ldap[s]://:` format. Defaults to
`ldap://:389`. This setting is required when connecting using
SSL/TLS or when using a custom port.
+
To provide multiple URLs, use a YAML array (`["ldap://server1:636", "ldap://server2:636"]`)
or comma-separated string (`"ldap://server1:636, ldap://server2:636"`).
+
While both are supported, you can't mix the `ldap` and `ldaps` protocols.
+
If no URL is provided, {es} uses a default of `ldap://:389`. This
default uses the `domain_name` setting value and assumes an unencrypted
connection to port 389.
`load_balance.type`::
(<>)
The behavior to use when there are multiple LDAP URLs defined. For supported
values see <>.
Defaults to `failover`.
`load_balance.cache_ttl`::
(<>)
When using `dns_failover` or `dns_round_robin` as the load balancing type,
this setting controls the amount of time to cache DNS lookups. Defaults
to `1h`.
`domain_name`::
(<>)
The domain name of Active Directory. If the `url` and the `user_search.base_dn`
settings are not specified, the cluster can derive those values from this
setting. Required.
`bind_dn`::
(<>)
The DN of the user that is used to bind to Active Directory and perform searches.
Defaults to Empty. Due to its potential security impact, `bind_dn` is not
exposed via the <>.
`bind_password`::
(<>)
deprecated[6.3] Use `secure_bind_password` instead. The password for the user
that is used to bind to Active Directory. Defaults to Empty. Due to its
potential security impact, `bind_password` is not exposed via the
<>.
`secure_bind_password`::
(<>, <>)
The password for the user that is used to bind to Active Directory.
Defaults to Empty.
`unmapped_groups_as_roles`::
(<>)
If set to `true`, the names of any unmapped Active Directory groups are used as
role names and assigned to the user. A group is considered _unmapped_ when it
is not referenced in any role-mapping files. API-based role mappings are not
considered. Defaults to `false`.
`files.role_mapping`::
(<>)
The <> for the YAML
role mapping configuration file. Defaults to `ES_PATH_CONF/role_mapping.yml`.
`user_search.base_dn`::
(<>)
The context to search for a user. Defaults to the root
of the Active Directory domain.
`user_search.scope`::
(<>)
Specifies whether the user search should be `sub_tree`, `one_level` or `base`.
`one_level` only searches users directly contained within the `base_dn`.
`sub_tree` searches all objects contained under `base_dn`. `base`
specifies that the `base_dn` is a user object, and that it is the
only user considered. Defaults to `sub_tree`.
`user_search.filter`::
(<>)
Specifies a filter to use to lookup a user given a username. The default
filter looks up `user` objects with either `sAMAccountName` or
`userPrincipalName`. If specified, this must be a valid LDAP user search filter.
For example `(&(objectClass=user)(sAMAccountName={0}))`. For more information,
see
https://msdn.microsoft.com/en-us/library/aa746475(v=vs.85).aspx[Search Filter Syntax].
`user_search.upn_filter`::
(<>)
Specifies a filter to use to lookup a user given a user principal name.
The default filter looks up `user` objects with
a matching `userPrincipalName`. If specified, this
must be a valid LDAP user search filter. For example,
`(&(objectClass=user)(userPrincipalName={1}))`. `{1}` is the full user principal name
provided by the user. For more information, see
https://msdn.microsoft.com/en-us/library/aa746475(v=vs.85).aspx[Search Filter Syntax].
`user_search.down_level_filter`::
(<>)
Specifies a filter to use to lookup a user given a down level logon name
(DOMAIN\user). The default filter looks up `user` objects with a matching
`sAMAccountName` in the domain provided. If specified, this
must be a valid LDAP user search filter. For example,
`(&(objectClass=user)(sAMAccountName={0}))`. For more information, see
https://msdn.microsoft.com/en-us/library/aa746475(v=vs.85).aspx[Search Filter Syntax].
`user_search.pool.enabled`::
(<>)
Enables or disables connection pooling for user search. When
disabled a new connection is created for every search. The
default is `true` when `bind_dn` is provided.
`user_search.pool.size`::
(<>)
The maximum number of connections to the Active Directory server to allow in the
connection pool. Defaults to `20`.
`user_search.pool.initial_size`::
(<>)
The initial number of connections to create to the Active Directory server on startup.
Defaults to `0`. If the LDAP server is down, values greater than 0
could cause startup failures.
`user_search.pool.health_check.enabled`::
(<>)
Enables or disables a health check on Active Directory connections in the connection
pool. Connections are checked in the background at the specified interval.
Defaults to `true`.
`user_search.pool.health_check.dn`::
(<>)
The distinguished name to be retrieved as part of the health check.
Defaults to the value of `bind_dn` if that setting is present. Otherwise, it
defaults to the value of the `user_search.base_dn` setting.
`user_search.pool.health_check.interval`::
(<>)
The interval to perform background checks of connections in the pool.
Defaults to `60s`.
`group_search.base_dn`::
(<>)
The context to search for groups in which the user has membership. Defaults
to the root of the Active Directory domain.
`group_search.scope`::
(<>)
Specifies whether the group search should be `sub_tree`, `one_level` or
`base`. `one_level` searches for groups directly contained within the
`base_dn`. `sub_tree` searches all objects contained under `base_dn`.
`base` specifies that the `base_dn` is a group object, and that it is
the only group considered. Defaults to `sub_tree`.
`metadata`::
(<>)
A list of additional LDAP attributes that should be loaded from the
LDAP server and stored in the authenticated user's metadata field.
`timeout.tcp_connect`::
(<>)
The TCP connect timeout period for establishing an LDAP connection.
An `s` at the end indicates seconds, or `ms` indicates milliseconds.
Defaults to `5s` (5 seconds ).
`timeout.tcp_read`::
(<>)
deprecated[7.7] The TCP read timeout period after establishing an LDAP
connection. This is equivalent to and is deprecated in favor of
`timeout.response` and they cannot be used simultaneously. An `s` at the end
indicates seconds, or `ms` indicates milliseconds. Defaults to the value of
`timeout.ldap_search`.
`timeout.response`::
(<>)
The time interval to wait for the response from the AD server. An `s` at the
end indicates seconds, or `ms` indicates milliseconds. Defaults to the value of
`timeout.ldap_search`.
`timeout.ldap_search`::
(<>)
The timeout period for an LDAP search. The value is specified in the request
and is enforced by the receiving LDAP Server.
An `s` at the end indicates seconds, or `ms` indicates milliseconds.
Defaults to `5s` (5 seconds ).
`ssl.certificate`::
(<>)
include::{es-ref-dir}/settings/common-defs.asciidoc[tag=ssl-certificate]
+
This certificate is presented to clients when they connect.
`ssl.certificate_authorities`::
(<>)
include::{es-ref-dir}/settings/common-defs.asciidoc[tag=ssl-certificate-authorities]
+
You cannot use this setting and `ssl.truststore.path` at the same time.
`ssl.key`::
(<>)
include::{es-ref-dir}/settings/common-defs.asciidoc[tag=ssl-key-pem]
+
If the Active Directory server requires client authentication, it uses this file.
You cannot use this setting and `ssl.keystore.path` at the same time.
`ssl.key_passphrase`::
(<>)
include::{es-ref-dir}/settings/common-defs.asciidoc[tag=ssl-key-passphrase]
`ssl.secure_key_passphrase`::
(<>)
include::{es-ref-dir}/settings/common-defs.asciidoc[tag=ssl-secure-key-passphrase]
`ssl.keystore.key_password`::
(<>)
include::{es-ref-dir}/settings/common-defs.asciidoc[tag=ssl-keystore-key-password]
`ssl.keystore.secure_key_password`::
(<>)
include::{es-ref-dir}/settings/common-defs.asciidoc[tag=ssl-keystore-secure-key-password]
`ssl.keystore.password`::
(<>)
include::{es-ref-dir}/settings/common-defs.asciidoc[tag=ssl-keystore-password]
`ssl.secure_keystore.password`::
(<>)
include::{es-ref-dir}/settings/common-defs.asciidoc[tag=ssl-keystore-secure-password]
//TBD: Why/how is this different than `ssl.keystore.secure_password`?
`ssl.keystore.path`::
(<>)
include::{es-ref-dir}/settings/common-defs.asciidoc[tag=ssl-keystore-path]
+
You cannot use this setting and `ssl.key` at the same time.
`ssl.keystore.type`::
(<>)
include::{es-ref-dir}/settings/common-defs.asciidoc[tag=ssl-keystore-type-pkcs12]
`ssl.truststore.password`::
(<>)
include::{es-ref-dir}/settings/common-defs.asciidoc[tag=ssl-truststore-password]
`ssl.truststore.secure_password`::
(<>)
include::{es-ref-dir}/settings/common-defs.asciidoc[tag=ssl-truststore-secure-password]
`ssl.truststore.path`::
(<>)
include::{es-ref-dir}/settings/common-defs.asciidoc[tag=ssl-truststore-path]
+
You cannot use this setting and `ssl.certificate_authorities` at the same time.
`ssl.truststore.type`::
(<>)
include::{es-ref-dir}/settings/common-defs.asciidoc[tag=ssl-truststore-type]
`ssl.verification_mode`::
(<>)
Indicates the type of verification when using `ldaps` to protect against man
in the middle attacks and certificate forgery.
include::{es-ref-dir}/settings/common-defs.asciidoc[tag=ssl-verification-mode-values]
`ssl.supported_protocols`::
(<>)
include::{es-ref-dir}/settings/common-defs.asciidoc[tag=ssl-supported-protocols]
`ssl.cipher_suites`::
(<>)
Specifies the cipher suites that should be supported when
communicating with the Active Directory server.
include::{es-ref-dir}/settings/common-defs.asciidoc[tag=ssl-cipher-suites-values]
//TBD: Can this be updated to using the Java 11 URL instead or does it have to stay java8?
`cache.ttl`::
(<>)
Specifies the time-to-live for cached user entries. A user and a hash of its
credentials are cached for this configured period of time. Use the
standard Elasticsearch <>).
Defaults to `20m`.
`cache.max_users`::
(<>)
Specifies the maximum number of user entries that the cache can contain.
Defaults to `100000`.
`cache.hash_algo`::
(<>, Expert)
Specifies the hashing algorithm that is used for
the in-memory cached user credentials. See <>. Defaults to `ssha256`.
`authentication.enabled`::
(<>)
If set to `false`, disables authentication support in
this realm, so that it only supports user lookups.
(See the <> and
<> features).
Defaults to `true`.
`follow_referrals`::
(<>)
If set to `true`, {es} follows referrals returned by the LDAP server.
Referrals are URLs returned by the server that are to be used to continue the
LDAP operation (such as `search`). Defaults to `true`.
[[ref-pki-settings]]
[discrete]
===== PKI realm settings
In addition to the <>, you can specify
the following settings:
`username_pattern`::
(<>)
The regular expression pattern used to extract the username from the
certificate DN. The username is used for auditing and logging. The username can also be used
with the <> and <>.
The first match group is the used as the username.
Defaults to `CN=(.*?)(?:,|$)`.
`certificate_authorities`::
(<>)
List of paths to the PEM certificate files that should be used to authenticate a
user's certificate as trusted. Defaults to the trusted certificates configured
for SSL. This setting cannot be used with `truststore.path`.
`truststore.algorithm`::
(<>)
Algorithm for the truststore. Defaults to `SunX509`.
`truststore.password`::
(<>)
include::{es-ref-dir}/settings/common-defs.asciidoc[tag=ssl-truststore-password]
If `truststore.path` is set, this setting is required.
`truststore.secure_password`::
(<>)
include::{es-ref-dir}/settings/common-defs.asciidoc[tag=ssl-truststore-secure-password]
`truststore.path`::
(<>)
The path of a truststore to use. Defaults to the trusted certificates configured
for SSL. This setting cannot be used with `certificate_authorities`.
`files.role_mapping`::
(<>)
Specifies the <> of the
<>.
Defaults to `ES_PATH_CONF/role_mapping.yml`.
`authorization_realms`::
(<>)
The names of the realms that should be consulted for delegated authorization.
If this setting is used, then the PKI realm does not perform role mapping and
instead loads the user from the listed realms.
See <>.
`cache.ttl`::
(<>)
Specifies the time-to-live for cached user entries. A user and a hash of its
credentials are cached for this period of time. Use the
standard {es} <>).
Defaults to `20m`.
`cache.max_users`::
(<>)
Specifies the maximum number of user entries that the cache can contain.
Defaults to `100000`.
`delegation.enabled`::
(<>)
Generally, in order for the clients to be authenticated by the PKI realm they
must connect directly to {es}. That is, they must not pass through proxies
which terminate the TLS connection. In order to allow for a *trusted* and
*smart* proxy, such as Kibana, to sit before {es} and terminate TLS
connections, but still allow clients to be authenticated on {es} by this realm,
you need to toggle this to `true`. Defaults to `false`. If delegation is
enabled, then either `truststore.path` or `certificate_authorities` setting
must be defined. For more details, see <>.
[[ref-saml-settings]]
[discrete]
===== SAML realm settings
// tag::saml-description-tag[]
In addition to the <>, you can specify
the following settings.
// end::saml-description-tag[]
// tag::saml-idp-entity-id-tag[]
`idp.entity_id` {ess-icon}::
(<>)
The Entity ID of the SAML Identity Provider. An Entity ID is a URI with a
maximum length of 1024 characters. It can be a URL (https://idp.example.com/) or
a URN (`urn:example.com:idp`) and can be found in the configuration or the SAML
metadata of the Identity Provider.
// end::saml-idp-entity-id-tag[]
// tag::saml-idp-metadata-path-tag[]
`idp.metadata.path` {ess-icon}::
(<>)
The path _(recommended)_ or URL to a SAML 2.0 metadata file describing the
capabilities and configuration of the Identity Provider.
If a path is provided, then it is resolved relative to the {es} config
directory.
If a URL is provided, then it must be either a `file` URL or a `https` URL.
+
{es} automatically polls this metadata resource and reloads
the IdP configuration when changes are detected.
File based resources are polled at a frequency determined by the global {es}
`resource.reload.interval.high` setting, which defaults to 5 seconds.
HTTPS resources are polled at a frequency determined by the realm's
`idp.metadata.http.refresh` and `idp.metadata.http.minimum_refresh` settings.
+
If the metadata resource is loaded from a file then the file must exist at node
startup, if it does not exist then the node will fail to start.
If the resource is loaded over HTTPS then (by default) the node will be tolerant
of a failure to load the resource - the node will start and will continue to
poll the URL for updates. The affected SAML realm will fail to authenticate
users until the problem is resolved. To force the node to fail if the metadata is
unavailable set `idp.metadata.http.fail_on_error` to `true`.
// end::saml-idp-metadata-path-tag[]
// tag::saml-idp-metadata-http-refresh-tag[]
`idp.metadata.http.fail_on_error`::
(<>)
If set to `true`, the realm will fail on startup (and prevent the node from starting)
if it attempts to load metadata over HTTPS and that metadata is not available.
If set to `false` (the default), the node will start but the affected SAML realm will
not support user authentication until the metadata can be successfully loaded.
This setting is ignored if metadata is loaded from a file.
// end::saml-idp-metadata-http-refresh-tag[]
// tag::saml-idp-metadata-http-refresh-tag[]
`idp.metadata.http.refresh` {ess-icon}::
(<>)
Controls the frequency with which `https` metadata is checked for changes.
Defaults to `1h` (1 hour).
+
Under some circumstances {es} may determine that the metadata needs to be checked
more frequently. This may occur if previous attempts to load the metadata
encountered an error, or if the metadata indicates that it is due to expire in
less than the configured refresh interval. In these cases {es} will poll more
often, but never more frequently than `idp.metadata.http.minimum_refresh`.
If there is an attempt to authenticate against a realm that has not yet loaded
metadata successfully, that realm may attempt to load metadata outside of the
configured polling frequency.
// end::saml-idp-metadata-http-refresh-tag[]
// tag::saml-idp-metadata-http-minimum-refresh-tag[]
`idp.metadata.http.minimum_refresh`::
(<>)
Controls the minimum frequency with which `https` metadata is checked for
changes. In regular operation {es} will use the value of
`idp.metadata.http.refresh` as the polling interval. However, under some
circumstances {es} may determine that it needs to poll more frequently.
In these cases, the `minimum_refresh` will set the minimum frequency at which
the metdata will be checked.
Defaults to `5m` (5 minutes) and must not be set to a value greater than
`idp.metadata.http.refresh`
// end::saml-idp-metadata-http-minimum-refresh-tag[]
// tag::saml-idp-use-single-logout-tag[]
`idp.use_single_logout` {ess-icon}::
(<>)
Indicates whether to utilise the Identity Provider's Single Logout service
(if one exists in the IdP metadata file).
Defaults to `true`.
// end::saml-idp-use-single-logout-tag[]
// tag::saml-sp-entity-id-tag[]
`sp.entity_id` {ess-icon}::
(<>)
The Entity ID to use for this SAML Service Provider. This should be entered as a
URI. We recommend that you use the base URL of your Kibana instance. For example,
`https://kibana.example.com/`.
// end::saml-sp-entity-id-tag[]
// tag::saml-sp-acs-tag[]
`sp.acs` {ess-icon}::
(<>)
The URL of the Assertion Consumer Service within {kib}. Typically this is the
"api/security/saml/callback" endpoint of your Kibana server. For example,
`https://kibana.example.com/api/security/saml/callback`.
// end::saml-sp-acs-tag[]
// tag::saml-sp-logout-tag[]
`sp.logout` {ess-icon}::
(<>)
The URL of the Single Logout service within {kib}. Typically this is the
"logout" endpoint of your Kibana server. For example,
`https://kibana.example.com/logout`.
// end::saml-sp-logout-tag[]
// tag::saml-attributes-principal-tag[]
`attributes.principal` {ess-icon}::
(<>)
The Name of the SAML attribute that contains the user's principal (username).
// end::saml-attributes-principal-tag[]
// tag::saml-attributes-groups-tag[]
`attributes.groups` {ess-icon}::
(<>)
The Name of the SAML attribute that contains the user's groups.
// end::saml-attributes-groups-tag[]
// tag::saml-attributes-name-tag[]
`attributes.name` {ess-icon}::
(<>)
The Name of the SAML attribute that contains the user's full name.
// end::saml-attributes-name-tag[]
// tag::saml-attributes-mail-tag[]
`attributes.mail` {ess-icon}::
(<>)
The Name of the SAML attribute that contains the user's email address.
// end::saml-attributes-mail-tag[]
// tag::saml-attributes-dn-tag[]
`attributes.dn` {ess-icon}::
(<>)
The Name of the SAML attribute that contains the user's X.50
_Distinguished Name_.
// end::saml-attributes-dn-tag[]
// tag::saml-attributes-patterns-principal-tag[]
`attribute_patterns.principal` {ess-icon}::
(<>)
A Java regular expression that is matched against the SAML attribute specified
by `attributes.principal` before it is applied to the user's _principal_ property.
The attribute value must match the pattern and the value of the first
_capturing group_ is used as the principal. For example, `^([^@]+)@example\\.com$`
matches email addresses from the "example.com" domain and uses the local-part as
the principal.
// end::saml-attributes-patterns-principal-tag[]
// tag::saml-attributes-patterns-groups-tag[]
`attribute_patterns.groups` {ess-icon}::
(<>)
As per `attribute_patterns.principal`, but for the _group_ property.
// end::saml-attributes-patterns-groups-tag[]
// tag::saml-attributes-patterns-name-tag[]
`attribute_patterns.name` {ess-icon}::
(<>)
As per `attribute_patterns.principal`, but for the _name_ property.
// end::saml-attributes-patterns-name-tag[]
// tag::saml-attributes-patterns-mail-tag[]
`attribute_patterns.mail` {ess-icon}::
(<>)
As per `attribute_patterns.principal`, but for the _mail_ property.
// end::saml-attributes-patterns-mail-tag[]
// tag::saml-attributes-patterns-dn-tag[]
`attribute_patterns.dn` {ess-icon}::
(<>)
As per `attribute_patterns.principal`, but for the _dn_ property.
// end::saml-attributes-patterns-dn-tag[]
// tag::saml-attributes-delimiters-groups-tag[]
`attribute_delimiters.groups` {ess-icon}::
(<>)
A plain string that is used as a delimiter to split a single-valued SAML
attribute specified by `attributes.groups` before it is applied to the user's
_groups_ property. For example, splitting the SAML attribute value
`engineering,elasticsearch-admins,employees` on a delimiter value of `,` will
result in `engineering`, `elasticsearch-admins`, and `employees` as the list of
groups for the user. The delimiter will always be split on, regardless of
escaping in the input string. This setting does not support multi-valued SAML
attributes. It cannot be used together with the `attribute_patterns` setting.
You can only configure this setting for the groups attribute.
// end::saml-attributes-delimiters-groups-tag[]
// tag::saml-nameid-format-tag[]
`nameid_format` {ess-icon}::
(<>)
The NameID format that should be requested when asking the IdP to authenticate
the current user. The default is to not include the `nameid_format` attribute.
// end::saml-nameid-format-tag[]
// tag::saml-nameid-allow-create-tag[]
`nameid.allow_create` {ess-icon}::
(<>)
The value of the `AllowCreate` attribute of the
`NameIdPolicy` element in an authentication request. The default value is false.
// end::saml-nameid-allow-create-tag[]
// tag::saml-nameid-sp-qualifier-tag[]
`nameid.sp_qualifier` {ess-icon}::
(<>)
The value of the `SPNameQualifier` attribute of the
`NameIdPolicy` element in an authentication request. The default is to not
include the `SPNameQualifier` attribute.
// end::saml-nameid-sp-qualifier-tag[]
// tag::saml-force-authn-tag[]
`force_authn` {ess-icon}::
(<>)
Specifies whether to set the `ForceAuthn` attribute when requesting that the IdP
authenticate the current user. If set to `true`, the IdP is required to verify
the user’s identity, irrespective of any existing sessions they might have.
Defaults to `false`.
// end::saml-force-authn-tag[]
// tag::saml-populate-user-metadata-tag[]
`populate_user_metadata` {ess-icon}::
(<>)
Specifies whether to populate the {es} user's metadata with the values that are
provided by the SAML attributes. Defaults to `true`.
// end::saml-populate-user-metadata-tag[]
`authorization_realms`::
(<>)
The names of the realms that should be consulted for delegated authorization.
If this setting is used, then the SAML realm does not perform role mapping and
instead loads the user from the listed realms.
See <>.
// tag::saml-allowed-clock-skew-tag[]
`allowed_clock_skew` {ess-icon}::
(<>)
The maximum amount of skew that can be tolerated between the IdP's clock and the
{es} node's clock.
Defaults to `3m` (3 minutes).
// end::saml-allowed-clock-skew-tag[]
// tag::saml-req-authn-context-tag[]
`req_authn_context_class_ref` {ess-icon}::
(<>)
A comma separated list of Authentication Context Class Reference values to be
included in the Requested Authentication Context when requesting the IdP to
authenticate the current user. The Authentication Context of the corresponding
authentication response should contain at least one of the requested values.
+
For more information, see
<>.
// end::saml-req-authn-context-tag[]
[discrete]
[[ref-saml-signing-settings]]
===== SAML realm signing settings
// tag::saml-signing-description-tag[]
If a signing key is configured (that is, either `signing.key` or
`signing.keystore.path` is set), then {es} signs outgoing SAML messages.
Signing can be configured using the following settings:
// end::saml-signing-description-tag[]
// tag::saml-signing-messages-tag[]
`signing.saml_messages` {ess-icon}::
(<>)
A list of SAML message types that should be signed or `*` to sign all messages.
Each element in the list should be the local name of a SAML XML Element.
Supported element types are `AuthnRequest`, `LogoutRequest` and `LogoutResponse`.
Only valid if `signing.key` or `signing.keystore.path` is also specified.
Defaults to `*`.
// end::saml-signing-messages-tag[]
// tag::saml-signing-key-tag[]
`signing.key` {ess-icon}::
(<>)
Specifies the path to the PEM encoded private key to use for SAML message signing.
`signing.key` and `signing.keystore.path` cannot be used at the same time.
// end::saml-signing-key-tag[]
`signing.secure_key_passphrase` {ess-icon}::
(<