From version 5.0 onward, Shield is part of X-Pack. For more information, see
Securing the Elastic Stack.
Getting Started (Short Version)
edit
IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.
Getting Started (Short Version)
editThe following tutorial will get you up and running with Shield in 2 minutes.
Assumptions
edit- You have Java™ 7 or above installed.
-
You have downloaded elasticsearch 1.5.0+ and extracted it (from now on, we’ll refer to the elasticsearch directory as
ES_HOME
). If you haven’t done so, you can download it here. - You are not using a package installation (RPM/DEB) or a custom configuration directory. If you are, please see the full getting started guide.
Installation
edit-
cd
toES_HOME
-
Install the license plugin
bin/plugin -i elasticsearch/license/latest
-
Next, install the shield plugin
bin/plugin -i elasticsearch/shield/latest
-
Start Elasticsearch
bin/elasticsearch
-
Add a
es_admin
user with administrative permissionsbin/shield/esusers useradd es_admin -r admin
-
Try it out - without username/password, the request should be rejected:
curl -XGET 'http://localhost:9200/'
-
Now try with username and password
curl -u es_admin -XGET 'http://localhost:9200/'
-
Optionally, verify the Shield version
curl -u es_admin -XGET 'http://localhost:9200/_shield'
Next Steps
edit- For a more in-depth look into the meaning of each step above, please proceed to the full getting started guide.
- For better understanding of the authentication mechanisms we just used, please refer to esusers - internal file based authentication
- To learn about how to create roles and customize the permissions for users, please refer to the authorization section.
- To enable secure SSL/TLS encryption of cluster and client communication, please refer to the securing nodes section.
- If you are new to Shield, we suggest following the guide’s natural path and reading each section in order. To continue, proceed to the next section