From version 5.0 onward, Shield is part of X-Pack. For more information, see
Securing the Elastic Stack.
Elasticsearch works with standard HTTP basic authentication headers to identify the requester. Since Elasticsearch is stateless, this header must be sent with every request:
This example uses curl
without basic auth to create an index:
curl -XPUT 'localhost:9200/idx'
{ "error": "AuthenticationException[Missing authentication token]", "status": 401 }
Since no user is associated with the request above, an authentication error is returned. Now we’ll use curl
with
basic auth to create an index as the rdeniro
user:
curl --user rdeniro:taxidriver -XPUT 'localhost:9200/idx'
{ "acknowledged": true }