- Elasticsearch Guide: other versions:
- Elasticsearch introduction
- Getting started with Elasticsearch
- Set up Elasticsearch
- Installing Elasticsearch
- Configuring Elasticsearch
- Important Elasticsearch configuration
- Important System Configuration
- Bootstrap Checks
- Heap size check
- File descriptor check
- Memory lock check
- Maximum number of threads check
- Max file size check
- Maximum size virtual memory check
- Maximum map count check
- Client JVM check
- Use serial collector check
- System call filter check
- OnError and OnOutOfMemoryError checks
- Early-access check
- G1GC check
- All permission check
- Starting Elasticsearch
- Stopping Elasticsearch
- Adding nodes to your cluster
- Installing X-Pack
- Set up X-Pack
- Configuring X-Pack Java Clients
- X-Pack Settings
- Bootstrap Checks for X-Pack
- Upgrade Elasticsearch
- API Conventions
- Document APIs
- Search APIs
- Aggregations
- Metrics Aggregations
- Avg Aggregation
- Weighted Avg Aggregation
- Cardinality Aggregation
- Extended Stats Aggregation
- Geo Bounds Aggregation
- Geo Centroid Aggregation
- Max Aggregation
- Min Aggregation
- Percentiles Aggregation
- Percentile Ranks Aggregation
- Scripted Metric Aggregation
- Stats Aggregation
- Sum Aggregation
- Top Hits Aggregation
- Value Count Aggregation
- Median Absolute Deviation Aggregation
- Bucket Aggregations
- Adjacency Matrix Aggregation
- Auto-interval Date Histogram Aggregation
- Children Aggregation
- Composite Aggregation
- Date Histogram Aggregation
- Date Range Aggregation
- Diversified Sampler Aggregation
- Filter Aggregation
- Filters Aggregation
- Geo Distance Aggregation
- GeoHash grid Aggregation
- Global Aggregation
- Histogram Aggregation
- IP Range Aggregation
- Missing Aggregation
- Nested Aggregation
- Parent Aggregation
- Range Aggregation
- Reverse nested Aggregation
- Sampler Aggregation
- Significant Terms Aggregation
- Significant Text Aggregation
- Terms Aggregation
- Pipeline Aggregations
- Avg Bucket Aggregation
- Derivative Aggregation
- Max Bucket Aggregation
- Min Bucket Aggregation
- Sum Bucket Aggregation
- Stats Bucket Aggregation
- Extended Stats Bucket Aggregation
- Percentiles Bucket Aggregation
- Moving Average Aggregation
- Moving Function Aggregation
- Cumulative Sum Aggregation
- Bucket Script Aggregation
- Bucket Selector Aggregation
- Bucket Sort Aggregation
- Serial Differencing Aggregation
- Matrix Aggregations
- Caching heavy aggregations
- Returning only aggregation results
- Aggregation Metadata
- Returning the type of the aggregation
- Metrics Aggregations
- Indices APIs
- Create Index
- Delete Index
- Get Index
- Indices Exists
- Open / Close Index API
- Shrink Index
- Split Index
- Rollover Index
- Put Mapping
- Get Mapping
- Get Field Mapping
- Types Exists
- Index Aliases
- Update Indices Settings
- Get Settings
- Analyze
- Index Templates
- Indices Stats
- Indices Segments
- Indices Recovery
- Indices Shard Stores
- Clear Cache
- Flush
- Refresh
- Force Merge
- cat APIs
- Cluster APIs
- Query DSL
- Scripting
- Mapping
- Analysis
- Anatomy of an analyzer
- Testing analyzers
- Analyzers
- Normalizers
- Tokenizers
- Standard Tokenizer
- Letter Tokenizer
- Lowercase Tokenizer
- Whitespace Tokenizer
- UAX URL Email Tokenizer
- Classic Tokenizer
- Thai Tokenizer
- NGram Tokenizer
- Edge NGram Tokenizer
- Keyword Tokenizer
- Pattern Tokenizer
- Char Group Tokenizer
- Simple Pattern Tokenizer
- Simple Pattern Split Tokenizer
- Path Hierarchy Tokenizer
- Path Hierarchy Tokenizer Examples
- Token Filters
- Standard Token Filter
- ASCII Folding Token Filter
- Flatten Graph Token Filter
- Length Token Filter
- Lowercase Token Filter
- Uppercase Token Filter
- NGram Token Filter
- Edge NGram Token Filter
- Porter Stem Token Filter
- Shingle Token Filter
- Stop Token Filter
- Word Delimiter Token Filter
- Word Delimiter Graph Token Filter
- Multiplexer Token Filter
- Conditional Token Filter
- Predicate Token Filter Script
- Stemmer Token Filter
- Stemmer Override Token Filter
- Keyword Marker Token Filter
- Keyword Repeat Token Filter
- KStem Token Filter
- Snowball Token Filter
- Phonetic Token Filter
- Synonym Token Filter
- Parsing synonym files
- Synonym Graph Token Filter
- Compound Word Token Filters
- Reverse Token Filter
- Elision Token Filter
- Truncate Token Filter
- Unique Token Filter
- Pattern Capture Token Filter
- Pattern Replace Token Filter
- Trim Token Filter
- Limit Token Count Token Filter
- Hunspell Token Filter
- Common Grams Token Filter
- Normalization Token Filter
- CJK Width Token Filter
- CJK Bigram Token Filter
- Delimited Payload Token Filter
- Keep Words Token Filter
- Keep Types Token Filter
- Exclude mode settings example
- Classic Token Filter
- Apostrophe Token Filter
- Decimal Digit Token Filter
- Fingerprint Token Filter
- MinHash Token Filter
- Remove Duplicates Token Filter
- Character Filters
- Modules
- Index Modules
- Ingest Node
- Pipeline Definition
- Ingest APIs
- Accessing Data in Pipelines
- Conditional Execution in Pipelines
- Handling Failures in Pipelines
- Processors
- Append Processor
- Bytes Processor
- Convert Processor
- Date Processor
- Date Index Name Processor
- Dissect Processor
- Dot Expander Processor
- Drop Processor
- Fail Processor
- Foreach Processor
- GeoIP Processor
- Grok Processor
- Gsub Processor
- Join Processor
- JSON Processor
- KV Processor
- Lowercase Processor
- Pipeline Processor
- Remove Processor
- Rename Processor
- Script Processor
- Set Processor
- Set Security User Processor
- Split Processor
- Sort Processor
- Trim Processor
- Uppercase Processor
- URL Decode Processor
- User Agent processor
- Managing the index lifecycle
- SQL Access
- Monitor a cluster
- Rolling up historical data
- Frozen indices
- Set up a cluster for high availability
- Secure a cluster
- Overview
- Configuring security
- Encrypting communications in Elasticsearch
- Encrypting communications in an Elasticsearch Docker Container
- Enabling cipher suites for stronger encryption
- Separating node-to-node and client traffic
- Configuring an Active Directory realm
- Configuring a file realm
- Configuring an LDAP realm
- Configuring a native realm
- Configuring a PKI realm
- Configuring a SAML realm
- Configuring a Kerberos realm
- FIPS 140-2
- Security settings
- Security files
- Auditing Settings
- How security works
- User authentication
- Built-in users
- Internal users
- Token-based authentication services
- Realms
- Realm chains
- Active Directory user authentication
- File-based user authentication
- LDAP user authentication
- Native user authentication
- PKI user authentication
- SAML authentication
- Kerberos authentication
- Integrating with other authentication systems
- Enabling anonymous access
- Controlling the user cache
- Configuring SAML single-sign-on on the Elastic Stack
- User authorization
- Auditing security events
- Encrypting communications
- Restricting connections with IP filtering
- Cross cluster search, tribe, clients, and integrations
- Tutorial: Getting started with security
- Tutorial: Encrypting communications
- Troubleshooting
- Can’t log in after upgrading to 6.8.23
- Some settings are not returned via the nodes settings API
- Authorization exceptions
- Users command fails due to extra arguments
- Users are frequently locked out of Active Directory
- Certificate verification fails for curl on Mac
- SSLHandshakeException causes connections to fail
- Common SSL/TLS exceptions
- Common Kerberos exceptions
- Common SAML issues
- Internal Server Error in Kibana
- Setup-passwords command fails due to connection failure
- Failures due to relocation of the configuration files
- Limitations
- Alerting on Cluster and Index Events
- Command line tools
- How To
- Glossary of terms
- X-Pack APIs
- Info API
- Cross-cluster replication APIs
- Explore API
- Freeze index
- Index lifecycle management API
- Licensing APIs
- Migration APIs
- Machine learning APIs
- Add events to calendar
- Add jobs to calendar
- Close jobs
- Create calendar
- Create datafeeds
- Create filter
- Create jobs
- Delete calendar
- Delete datafeeds
- Delete events from calendar
- Delete filter
- Delete forecast
- Delete jobs
- Delete jobs from calendar
- Delete model snapshots
- Delete expired data
- Find file structure
- Flush jobs
- Forecast jobs
- Get calendars
- Get buckets
- Get overall buckets
- Get categories
- Get datafeeds
- Get datafeed statistics
- Get influencers
- Get jobs
- Get job statistics
- Get machine learning info
- Get model snapshots
- Get scheduled events
- Get filters
- Get records
- Open jobs
- Post data to jobs
- Preview datafeeds
- Revert model snapshots
- Set upgrade mode
- Start datafeeds
- Stop datafeeds
- Update datafeeds
- Update filter
- Update jobs
- Update model snapshots
- Rollup APIs
- Security APIs
- Authenticate
- Change passwords
- Clear cache
- Clear roles cache
- Create API keys
- Create or update application privileges
- Create or update role mappings
- Create or update roles
- Create or update users
- Delete application privileges
- Delete role mappings
- Delete roles
- Delete users
- Disable users
- Enable users
- Get API key information
- Get application privileges
- Get role mappings
- Get roles
- Get token
- Get users
- Has privileges
- Invalidate API key
- Invalidate token
- SSL certificate
- Unfreeze index
- Watcher APIs
- Definitions
- Release Highlights
- Breaking changes
- Release Notes
- Elasticsearch version 6.8.23
- Elasticsearch version 6.8.22
- Elasticsearch version 6.8.21
- Elasticsearch version 6.8.20
- Elasticsearch version 6.8.19
- Elasticsearch version 6.8.18
- Elasticsearch version 6.8.17
- Elasticsearch version 6.8.16
- Elasticsearch version 6.8.15
- Elasticsearch version 6.8.14
- Elasticsearch version 6.8.13
- Elasticsearch version 6.8.12
- Elasticsearch version 6.8.11
- Elasticsearch version 6.8.10
- Elasticsearch version 6.8.9
- Elasticsearch version 6.8.8
- Elasticsearch version 6.8.7
- Elasticsearch version 6.8.6
- Elasticsearch version 6.8.5
- Elasticsearch version 6.8.4
- Elasticsearch version 6.8.3
- Elasticsearch version 6.8.2
- Elasticsearch version 6.8.1
- Elasticsearch version 6.8.0
- Elasticsearch version 6.7.2
- Elasticsearch version 6.7.1
- Elasticsearch version 6.7.0
- Elasticsearch version 6.6.2
- Elasticsearch version 6.6.1
- Elasticsearch version 6.6.0
- Elasticsearch version 6.5.4
- Elasticsearch version 6.5.3
- Elasticsearch version 6.5.2
- Elasticsearch version 6.5.1
- Elasticsearch version 6.5.0
- Elasticsearch version 6.4.3
- Elasticsearch version 6.4.2
- Elasticsearch version 6.4.1
- Elasticsearch version 6.4.0
- Elasticsearch version 6.3.2
- Elasticsearch version 6.3.1
- Elasticsearch version 6.3.0
- Elasticsearch version 6.2.4
- Elasticsearch version 6.2.3
- Elasticsearch version 6.2.2
- Elasticsearch version 6.2.1
- Elasticsearch version 6.2.0
- Elasticsearch version 6.1.4
- Elasticsearch version 6.1.3
- Elasticsearch version 6.1.2
- Elasticsearch version 6.1.1
- Elasticsearch version 6.1.0
- Elasticsearch version 6.0.1
- Elasticsearch version 6.0.0
- Elasticsearch version 6.0.0-rc2
- Elasticsearch version 6.0.0-rc1
- Elasticsearch version 6.0.0-beta2
- Elasticsearch version 6.0.0-beta1
- Elasticsearch version 6.0.0-alpha2
- Elasticsearch version 6.0.0-alpha1
- Elasticsearch version 6.0.0-alpha1 (Changes previously released in 5.x)
NOTE: You are looking at documentation for an older release. For the latest information, see the current release documentation.
Auditing Security Settings
editAuditing Security Settings
editAll of these settings can be added to the elasticsearch.yml
configuration
file. For more information, see
Auditing security events.
General Auditing Settings
edit-
xpack.security.audit.enabled
-
Set to
true
to enable auditing on the node. The default value isfalse
. -
xpack.security.audit.outputs
-
Specifies where audit logs are output. For example:
[ index, logfile ]
. The default value islogfile
, which puts the auditing events in a dedicated file named<clustername>_audit.log
on each node.You can also specify
index
, which puts the auditing events in an Elasticsearch index that is prefixed with.security_audit_log
. The index can reside on the same cluster or a separate cluster. [6.7.0] Deprecated in 6.7.0. The outputs setting will be removed in 7.0 as there will only be one supported output type (logfile
). Users who wish to store their audit information in an Elasticsearch index should write to the log file output, and a use a file ingestion component to index it into Elasticsearch.For backwards compatibility reasons, if you use the logfile output type, a
<clustername>_access.log
file is also created. It contains the same information, but it uses the older (pre-6.5.0) formatting style. If the backwards compatible format is not required, it should be disabled. To do that, change its logger level tooff
in thelog4j2.properties
file. For more information, see Configuring logging levels.If the index is unavailable, it is possible for auditing events to be lost. The
index
output type should therefore be used in conjunction with thelogfile
output type and the latter should be the official record of events. This unreliability is an important reason for why theindex
output type was deprecated in 6.7.0 and will be removed in 7.0.
Audited Event Settings
editThe events and some other information about what gets logged can be controlled by using the following settings:
-
xpack.security.audit.logfile.events.include
-
Specifies which events to include in the auditing output. The default value is:
access_denied, access_granted, anonymous_access_denied, authentication_failed, connection_denied, tampered_request, run_as_denied, run_as_granted
. -
xpack.security.audit.logfile.events.exclude
- Excludes the specified events from the output. By default, no events are excluded.
-
xpack.security.audit.logfile.events.emit_request_body
-
Specifies whether to include the request body from REST requests on certain event types such as
authentication_failed
. The default value isfalse
.No filtering is performed when auditing, so sensitive data may be audited in plain text when including the request body in audit events.
Local Node Info Settings
edit-
xpack.security.audit.logfile.emit_node_name
-
Specifies whether to include the node name as a field in
each audit event.
The default value is
true
. -
xpack.security.audit.logfile.emit_node_host_address
-
Specifies whether to include the node’s IP address as a field in each audit event.
The default value is
false
. -
xpack.security.audit.logfile.emit_node_host_name
-
Specifies whether to include the node’s host name as a field in each audit event.
The default value is
false
. -
xpack.security.audit.logfile.emit_node_id
-
Specifies whether to include the node id as a field in each audit event.
This is available for the new format only. That is to say, this information
does not exist in the
<clustername>_access.log
file. Unlike node name, whose value might change if the administrator changes the setting in the config file, the node id will persist across cluster restarts and the administrator cannot change it. The default value istrue
.
Audit Logfile Event Ignore Policies
editThese settings affect the ignore policies that enable fine-grained control over which audit events are printed to the log file. All of the settings with the same policy name combine to form a single policy. If an event matches all of the conditions for a specific policy, it is ignored and not printed.
-
xpack.security.audit.logfile.events.ignore_filters.<policy_name>.users
- A list of user names or wildcards. The specified policy will not print audit events for users matching these values.
-
xpack.security.audit.logfile.events.ignore_filters.<policy_name>.realms
- A list of authentication realm names or wildcards. The specified policy will not print audit events for users in these realms.
-
xpack.security.audit.logfile.events.ignore_filters.<policy_name>.roles
- A list of role names or wildcards. The specified policy will not print audit events for users that have these roles. If the user has several roles, some of which are not covered by the policy, the policy will not cover this event.
-
xpack.security.audit.logfile.events.ignore_filters.<policy_name>.indices
- A list of index names or wildcards. The specified policy will not print audit events when all the indices in the event match these values. If the event concerns several indices, some of which are not covered by the policy, the policy will not cover this event.
Audit Log Indexing Configuration Settings
edit
[6.7.0]
Deprecated in 6.7.0. xpack.security.audit.index
settings namespace refers to the index
audit output type which is deprecated and will be removed in 7.0
-
xpack.security.audit.index.bulk_size
-
Controls how many audit events are batched into a single write. The default
value is
1000
. [6.7.0] Deprecated in 6.7.0. -
xpack.security.audit.index.flush_interval
-
Controls how often buffered events are flushed to the index. The default value
is
1s
. [6.7.0] Deprecated in 6.7.0. -
xpack.security.audit.index.rollover
-
Controls how often to roll over to a new index:
hourly
,daily
,weekly
, ormonthly
. The default value isdaily
. [6.7.0] Deprecated in 6.7.0. -
xpack.security.audit.index.events.include
-
Specifies the audit events to be indexed. The default value is
anonymous_access_denied, authentication_failed, realm_authentication_failed, access_granted, access_denied, tampered_request, connection_granted, connection_denied, run_as_granted, run_as_denied
. See Audit event types for the complete list. [6.7.0] Deprecated in 6.7.0. -
xpack.security.audit.index.events.exclude
- Excludes the specified auditing events from indexing. By default, no events are excluded. [6.7.0] Deprecated in 6.7.0.
-
xpack.security.audit.index.events.emit_request_body
-
Specifies whether to include the request body from REST requests on certain
event types such as
authentication_failed
. The default value isfalse
. [6.7.0] Deprecated in 6.7.0. -
xpack.security.audit.index.settings
-
Specifies settings for the indices that the events are stored in. For example, the following configuration sets the number of shards and replicas to 1 for the audit indices: [6.7.0] Deprecated in 6.7.0.
xpack.security.audit.index.settings: index: number_of_shards: 1 number_of_replicas: 1
These settings apply to the local audit indices, as well as to the remote audit indices, but only if the remote cluster does not have security features enabled or the Elasticsearch versions are different. If the remote cluster has security features enabled and the versions coincide, the settings for the audit indices there will take precedence, even if they are unspecified (i.e. left to defaults).
Remote Audit Log Indexing Configuration Settings
edit
[6.7.0]
Deprecated in 6.7.0. xpack.security.audit.index
settings namespace refers to the index
audit output type which is deprecated and will be removed in 7.0
To index audit events to a remote Elasticsearch cluster, you configure the following
xpack.security.audit.index.client
settings:
-
xpack.security.audit.index.client.hosts
-
Specifies a comma-separated list of
host:port
pairs. These hosts should be nodes in the remote cluster. If you are using default values for thetransport.port
setting, you can omit theport
value. Otherwise, it must match thetransport.port
setting. [6.7.0] Deprecated in 6.7.0. -
xpack.security.audit.index.client.cluster.name
- Specifies the name of the remote cluster. [6.7.0] Deprecated in 6.7.0.
-
xpack.security.audit.index.client.xpack.security.user
-
Specifies the
username:password
pair that is used to authenticate with the remote cluster. This user must have authority to create the.security-audit
index on the remote cluster. [6.7.0] Deprecated in 6.7.0.
If the remote Elasticsearch cluster has Transport Layer Security (TLS/SSL) enabled, you
must set the following setting to true
:
-
xpack.security.audit.index.client.xpack.security.transport.ssl.enabled
-
Used to enable or disable TLS/SSL for the transport client that forwards audit
logs to the remote cluster. The default is
false
. [6.7.0] Deprecated in 6.7.0.
You must also specify the information necessary to access certificates. See Auditing TLS/SSL Settings.
You can pass additional settings to the remote client by specifying them in the
xpack.security.audit.index.client
namespace.
[6.7.0]
Deprecated in 6.7.0.
For example,
you can add transport settings and
advanced TCP settings in that namespace. To allow the remote
client to discover all of the nodes in the remote cluster you can specify the
client.transport.sniff
setting:
xpack.security.audit.index.client.transport.sniff: true
On this page