- X-Pack Reference for 6.0-6.2 and 5.x:
- Introduction
- Setting Up X-Pack
- Breaking Changes
- X-Pack APIs
- Graphing Connections in Your Data
- Profiling your Queries and Aggregations
- Reporting from Kibana
- Securing the Elastic Stack
- Getting Started with Security
- How Security Works
- Setting Up User Authentication
- Configuring SAML Single-Sign-On on the Elastic Stack
- Configuring Role-based Access Control
- Auditing Security Events
- Encrypting Communications
- Restricting Connections with IP Filtering
- Cross Cluster Search, Tribe, Clients and Integrations
- Reference
- Monitoring the Elastic Stack
- Alerting on Cluster and Index Events
- Machine Learning in the Elastic Stack
- Troubleshooting
- Getting Help
- X-Pack security
- Can’t log in after upgrading to 6.2.4
- 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
- Internal Server Error in Kibana
- Setup-passwords command fails due to connection failure
- X-Pack Watcher
- X-Pack monitoring
- X-Pack machine learning
- Limitations
- License Management
- Release Notes
WARNING: Version 6.2 of the Elastic Stack has passed its EOL date.
This documentation is no longer being maintained and may be removed. If you are running this version, we strongly advise you to upgrade. For the latest information, see the current release documentation.
Granting Privileges for Indices & Aliases
editGranting Privileges for Indices & Aliases
editElasticsearch allows to execute operations against index aliases, which are effectively virtual indices. An alias points to one or more indices, holds metadata and potentially a filter. X-Pack security treats aliases and indices the same. Privileges for indices actions are granted on specific indices or aliases. In order for an indices action to be authorized, the user that executes it needs to have permissions for that action on all the specific indices or aliases that the request relates to.
Let’s look at an example. Assuming we have an index called 2015
, an alias that
points to it called current_year
, and a user with the following role:
{ "names" : [ "2015" ], "privileges" : [ "read" ] }
The user attempts to retrieve a document from current_year
:
GET /current_year/event/1
The above request gets rejected, although the user has read
privilege on the
concrete index that the current_year
alias points to. The correct permission
would be as follows:
{ "names" : [ "current_year" ], "privileges" : [ "read" ] }
Managing aliases
editUnlike creating indices, which requires the create_index
privilege, adding,
removing and retrieving aliases requires the manage
permission. Aliases can be
added to an index directly as part of the index creation:
PUT /2015 { "aliases" : { "current_year" : {} } }
or via the dedicated aliases api if the index already exists:
POST /_aliases { "actions" : [ { "add" : { "index" : "2015", "alias" : "current_year" } } ] }
The above requests both require the manage
privilege on the alias name as well
as the targeted index, as follows:
{ "names" : [ "20*", "current_year" ], "privileges" : [ "manage" ] }
The index aliases api also allows also to delete aliases from existing indices.
The privileges required for such a request are the same as above. Both index and
alias need the manage
permission.
Filtered aliases
editAliases can hold a filter, which allows to select a subset of documents that can be accessed out of all the documents that the physical index contains. These filters are not always applied and should not be used in place of document level security.
On this page
ElasticON events are back!
Learn about the Elastic Search AI Platform from the experts at our live events.
Register now