SlideShare a Scribd company logo
1 | P a g e
Elasticsearch Security Strategy
Table of Contents
Existing State of Elasticsearch Cluster Security........................................................................................................ 2
X-Pack..................................................................................................................................................................2
Installation........................................................................................................................................................... 2
Implementation.................................................................................................................................................... 3
Desired State of Elasticsearch Cluster Security........................................................................................................ 4
Proof of Concept - cURL Commands................................................................................................................... 4
Anonymous User trying to access Elasticsearch Cluster....................................................................................... 6
Super-User "elastic" accessing Elasticsearch Cluster............................................................................................ 6
User "charan" with role "filebeat_admin" trying to view all the indices................................................................ 7
User "charan" with role "filebeat_admin" accessing "filebeat-*" index.................................................................8
User "charan" with role "filebeat_admin" accessing "logstash-*" index................................................................ 9
User "vasu" with role "logstash_admin" trying to access "filebeat-*" index.......................................................... 9
User "vasu" with role "logstash_admin" accessing "logstash-*" index................................................................ 10
Super-User "elastic" accessing Kibana.............................................................................................................. 11
User "charan" with role "filebeat_admin" accessing Kibana............................................................................... 12
Auditing............................................................................................................................................................. 12
2 | P a g e
Existing State of Elasticsearch Cluster Security
Market IntelligenceandInvestmentServices Teamsare usingElasticsearch. Boththe teamscan view all the indices
available inElasticsearch. Also,eachof these teamscansearchthe contentsof the indicesthatare not relatedor
ownedbythem.
Thiscan cause a potential securitybreach.
X-Pack
X-Packisan ElasticStack extensionthatimplementsfeatureslike security,alerting,monitoring,reportingandgraph
representationinone package.Itiseasyto install andthese componentscanbe easilyenabledordisabled.
X-PackprovidesSecurityModule. The featuresof thismoduleare asfollows:
 Role BasedAccessControl (RBAC)
o Elasticsearchistreatedasa NoSql Database. Accesstoindex isprovidedasperthe roles.
 Privileges/Permissions
o Figuringoutthe actionsand accessesonthe index.
 Roles
o Groupingprivileges/permissionsintoroles.
 Users
o Addinguserstoroles.
Installation
X-Packisinstalledoneachandeverynode inthe Cluster. Bydefault,basicauthenticationshall be enabled. We
mustspecifya username andpassword.
X-PackSecurityprovidesabuilt-inelasticsuperuserthatcanbe usedtoset upthe securityinthe Cluster.
3 | P a g e
The default user is elastic and password is changeme.
"elastic" user hasfull accessto the cluster,includingall the indicesanddata.
Implementation
1. Install X-PackplugininElasticsearch,KibanaandLogstash
2. Modify elasticsearch.ymlfile:
a. xpack.security.enabled: true
3. Modify kibana.ymlfile:
a. xpack.security.enabled: true
b. elasticsearch.username: "kibana"
c. elasticsearch.password: "kibanapassword"
4. RestartElasticsearchandKibanaservices.
5. Change the passwordsof the built-inelastic,kibana,andlogstash_system users.
$ curl -XPUT -u elastic 'localhost:9200/_xpack/security/user/elastic/_password' -H "Content-Type:
application/json" -d '{
"password" : "elasticpassword"
}'
$ curl -XPUT -u elastic 'localhost:9200/_xpack/security/user/kibana/_password' -H "Content-Type:
application/json" -d '{
"password" : "kibanapassword"
}'
$ curl -XPUT -u elastic 'localhost:9200/_xpack/security/user/logstash_system/_password' -H "Content-Type:
application/json" -d '{
"password" : "logstashpassword"
}'
6. We needtosetup rolesandusersto control access to ElasticsearchandKibana
4 | P a g e
Desired State of Elasticsearch Cluster Security
Proof of Concept - cURL Commands
To grant DivyaCharan TejaMulagaleti full accesstoall indicesthatmatchthe pattern filebeat-*and enable himto
create visualizationsanddashboardsforthose indicesinKibana,we shall create an filebeat_admin role andassign
the role to a new charan user.
$ curl -XPOST -u elastic 'localhost:9200/_xpack/security/role/filebeat_admin' -H "Content-Type:
application/json" -d '{
"indices" : [
{
"names" : [ "filebeat-*" ],
"privileges" : [ "all" ]
},
{
"names" : [ ".kibana*" ],
"privileges" : [ "manage", "read", "index" ]
}
]
}'
{"role":{"created":true}}
$ curl -XPOST -u elastic 'localhost:9200/_xpack/security/user/charan' -H "Content-Type: application/json" -d
'{
"password" : "sagarsoft",
"full_name" : "Divya Charan Teja Mulagaleti",
"email" : "divyacharan.mulagaleti@sagarsoft.in",
"roles" : [ "filebeat_admin" ]
}'
{"user":{"created":true}}
5 | P a g e
To grant VasudevaReddyGangasani full accesstoall indicesthatmatchthe pattern logstash-*andenable himto
create visualizationsanddashboardsforthose indicesinKibana,we shall create an logstash_admin role andassign
the role to a new vasu user.
$ curl -XPOST -u elastic 'localhost:9200/_xpack/security/role/logstash_admin' -H "Content-Type:
application/json" -d '{
"indices" : [
{
"names" : [ "logstash-*" ],
"privileges" : [ "all" ]
},
{
"names" : [ ".kibana*" ],
"privileges" : [ "manage", "read", "index" ]
}
]
}'
{"role":{"created":true}}
$ curl -XPOST -u elastic 'localhost:9200/_xpack/security/user/vasu' -H "Content-Type: application/json" -d '{
"password" : "sagarsoft",
"full_name" : "Vasudeva Reddy Gangasani",
"email" : "vasudeva.gangasani@sagarsoft.in",
"roles" : [ "logstash_admin" ]
}'
{"user":{"created":true}}
6 | P a g e
AnonymousUser trying to access Elasticsearch Cluster
HTTP status code: 401 Unauthorized error
Super-User "elastic" accessing Elasticsearch Cluster
"elastic" user can access all the indices
7 | P a g e
User "charan"with role "filebeat_admin"trying to view all the indices
HTTP status code: 403 Forbidden error
8 | P a g e
User "charan"with role "filebeat_admin"accessing "filebeat-*" index
Elasticsearch serves the request with JSON response
9 | P a g e
User "charan"with role "filebeat_admin" accessing "logstash-*" index
HTTP status code: 403 Forbidden error
User "vasu" with role"logstash_admin" trying to access "filebeat-*" index
HTTP status code: 403 Forbidden error
10 | P a g e
User "vasu" with role"logstash_admin" accessing "logstash-*" index
Elasticsearch serves the request with JSON response
11 | P a g e
Super-User "elastic" accessing Kibana
"elastic" user can access all the indices
12 | P a g e
User "charan"with role "filebeat_admin"accessing Kibana
"logstash-*" index is not accessible
Only "filebeat-*" index is accessible
Auditing
Auditlogsare disabledbydefault.Toenable thisfunctionality,setthe followingin elasticsearch.yml:
xpack.security.audit.enabled: true
X-PackSecurityprovidesaudittrail functionalityforall nodesinthe cluster.We can configure the auditlevel,which
accounts forthe type of eventsthatare logged.These eventsinclude failedauthenticationattempts,useraccess
denied,node connectiondenied,andmore.
Ad

More Related Content

What's hot (20)

[AzureCamp 24 Juin 2014] Cache Distribué par Thomas Conté
[AzureCamp 24 Juin 2014] Cache Distribué par Thomas Conté[AzureCamp 24 Juin 2014] Cache Distribué par Thomas Conté
[AzureCamp 24 Juin 2014] Cache Distribué par Thomas Conté
Microsoft Technet France
 
Cassandra summit 2013 - DataStax Java Driver Unleashed!
Cassandra summit 2013 - DataStax Java Driver Unleashed!Cassandra summit 2013 - DataStax Java Driver Unleashed!
Cassandra summit 2013 - DataStax Java Driver Unleashed!
Michaël Figuière
 
Encryption Boot Camp at Øredev
Encryption Boot Camp at ØredevEncryption Boot Camp at Øredev
Encryption Boot Camp at Øredev
Matthew McCullough
 
Connecting to the network
Connecting to the networkConnecting to the network
Connecting to the network
Mu Chun Wang
 
Advance MySQL Docstore Features
Advance MySQL Docstore FeaturesAdvance MySQL Docstore Features
Advance MySQL Docstore Features
sankalita chakraborty
 
Managing and Integrating Vault at The New York Times
Managing and Integrating Vault at The New York TimesManaging and Integrating Vault at The New York Times
Managing and Integrating Vault at The New York Times
Amanda MacLeod
 
Struts database access
Struts database accessStruts database access
Struts database access
Abass Ndiaye
 
Odv oracle customer_demo
Odv oracle customer_demoOdv oracle customer_demo
Odv oracle customer_demo
Viaggio Italia
 
Wicket Security Presentation
Wicket Security PresentationWicket Security Presentation
Wicket Security Presentation
mrmean
 
Bkbiet day2 & 3
Bkbiet day2 & 3Bkbiet day2 & 3
Bkbiet day2 & 3
mihirio
 
Azure Web Camp : Cache Distribué
Azure Web Camp : Cache DistribuéAzure Web Camp : Cache Distribué
Azure Web Camp : Cache Distribué
Thomas Conté
 
Clustering your Application with Hazelcast
Clustering your Application with HazelcastClustering your Application with Hazelcast
Clustering your Application with Hazelcast
Hazelcast
 
Sequelize
SequelizeSequelize
Sequelize
Tarek Raihan
 
Getting started with Elasticsearch and .NET
Getting started with Elasticsearch and .NETGetting started with Elasticsearch and .NET
Getting started with Elasticsearch and .NET
Tomas Jansson
 
Provisioning with OSGi Subsystems and Repository using Apache Aries and Felix
Provisioning with OSGi Subsystems and Repository using Apache Aries and FelixProvisioning with OSGi Subsystems and Repository using Apache Aries and Felix
Provisioning with OSGi Subsystems and Repository using Apache Aries and Felix
David Bosschaert
 
Form認証で学ぶSpring Security入門
Form認証で学ぶSpring Security入門Form認証で学ぶSpring Security入門
Form認証で学ぶSpring Security入門
Ryosuke Uchitate
 
Search Evolution - Von Lucene zu Solr und ElasticSearch
Search Evolution - Von Lucene zu Solr und ElasticSearchSearch Evolution - Von Lucene zu Solr und ElasticSearch
Search Evolution - Von Lucene zu Solr und ElasticSearch
Florian Hopf
 
Cassandra Security Configuration
Cassandra Security ConfigurationCassandra Security Configuration
Cassandra Security Configuration
Braja Krishna Das
 
Building Your Own IoT Platform using FIWARE GEis
Building Your Own IoT Platform using FIWARE GEisBuilding Your Own IoT Platform using FIWARE GEis
Building Your Own IoT Platform using FIWARE GEis
FIWARE
 
Codemotion 2013: Feliz 15 aniversario, SQL Injection
Codemotion 2013: Feliz 15 aniversario, SQL InjectionCodemotion 2013: Feliz 15 aniversario, SQL Injection
Codemotion 2013: Feliz 15 aniversario, SQL Injection
Chema Alonso
 
[AzureCamp 24 Juin 2014] Cache Distribué par Thomas Conté
[AzureCamp 24 Juin 2014] Cache Distribué par Thomas Conté[AzureCamp 24 Juin 2014] Cache Distribué par Thomas Conté
[AzureCamp 24 Juin 2014] Cache Distribué par Thomas Conté
Microsoft Technet France
 
Cassandra summit 2013 - DataStax Java Driver Unleashed!
Cassandra summit 2013 - DataStax Java Driver Unleashed!Cassandra summit 2013 - DataStax Java Driver Unleashed!
Cassandra summit 2013 - DataStax Java Driver Unleashed!
Michaël Figuière
 
Encryption Boot Camp at Øredev
Encryption Boot Camp at ØredevEncryption Boot Camp at Øredev
Encryption Boot Camp at Øredev
Matthew McCullough
 
Connecting to the network
Connecting to the networkConnecting to the network
Connecting to the network
Mu Chun Wang
 
Managing and Integrating Vault at The New York Times
Managing and Integrating Vault at The New York TimesManaging and Integrating Vault at The New York Times
Managing and Integrating Vault at The New York Times
Amanda MacLeod
 
Struts database access
Struts database accessStruts database access
Struts database access
Abass Ndiaye
 
Odv oracle customer_demo
Odv oracle customer_demoOdv oracle customer_demo
Odv oracle customer_demo
Viaggio Italia
 
Wicket Security Presentation
Wicket Security PresentationWicket Security Presentation
Wicket Security Presentation
mrmean
 
Bkbiet day2 & 3
Bkbiet day2 & 3Bkbiet day2 & 3
Bkbiet day2 & 3
mihirio
 
Azure Web Camp : Cache Distribué
Azure Web Camp : Cache DistribuéAzure Web Camp : Cache Distribué
Azure Web Camp : Cache Distribué
Thomas Conté
 
Clustering your Application with Hazelcast
Clustering your Application with HazelcastClustering your Application with Hazelcast
Clustering your Application with Hazelcast
Hazelcast
 
Getting started with Elasticsearch and .NET
Getting started with Elasticsearch and .NETGetting started with Elasticsearch and .NET
Getting started with Elasticsearch and .NET
Tomas Jansson
 
Provisioning with OSGi Subsystems and Repository using Apache Aries and Felix
Provisioning with OSGi Subsystems and Repository using Apache Aries and FelixProvisioning with OSGi Subsystems and Repository using Apache Aries and Felix
Provisioning with OSGi Subsystems and Repository using Apache Aries and Felix
David Bosschaert
 
Form認証で学ぶSpring Security入門
Form認証で学ぶSpring Security入門Form認証で学ぶSpring Security入門
Form認証で学ぶSpring Security入門
Ryosuke Uchitate
 
Search Evolution - Von Lucene zu Solr und ElasticSearch
Search Evolution - Von Lucene zu Solr und ElasticSearchSearch Evolution - Von Lucene zu Solr und ElasticSearch
Search Evolution - Von Lucene zu Solr und ElasticSearch
Florian Hopf
 
Cassandra Security Configuration
Cassandra Security ConfigurationCassandra Security Configuration
Cassandra Security Configuration
Braja Krishna Das
 
Building Your Own IoT Platform using FIWARE GEis
Building Your Own IoT Platform using FIWARE GEisBuilding Your Own IoT Platform using FIWARE GEis
Building Your Own IoT Platform using FIWARE GEis
FIWARE
 
Codemotion 2013: Feliz 15 aniversario, SQL Injection
Codemotion 2013: Feliz 15 aniversario, SQL InjectionCodemotion 2013: Feliz 15 aniversario, SQL Injection
Codemotion 2013: Feliz 15 aniversario, SQL Injection
Chema Alonso
 

Similar to Elasticsearch Security Strategy (20)

Null Bachaav - May 07 Attack Monitoring workshop.
Null Bachaav - May 07 Attack Monitoring workshop.Null Bachaav - May 07 Attack Monitoring workshop.
Null Bachaav - May 07 Attack Monitoring workshop.
Prajal Kulkarni
 
JavaFest. Nanne Baars. Web application security for developers
JavaFest. Nanne Baars. Web application security for developersJavaFest. Nanne Baars. Web application security for developers
JavaFest. Nanne Baars. Web application security for developers
FestGroup
 
ELK: a log management framework
ELK: a log management frameworkELK: a log management framework
ELK: a log management framework
Giovanni Bechis
 
Cloud native java script apps
Cloud native java script appsCloud native java script apps
Cloud native java script apps
Gary Sieling
 
AWS Study Group - Chapter 03 - Elasticity and Scalability Concepts [Solution ...
AWS Study Group - Chapter 03 - Elasticity and Scalability Concepts [Solution ...AWS Study Group - Chapter 03 - Elasticity and Scalability Concepts [Solution ...
AWS Study Group - Chapter 03 - Elasticity and Scalability Concepts [Solution ...
QCloudMentor
 
How To Disable IE Enhanced Security Windows PowerShell
How To Disable IE Enhanced Security Windows PowerShellHow To Disable IE Enhanced Security Windows PowerShell
How To Disable IE Enhanced Security Windows PowerShell
VCP Muthukrishna
 
Introduction to Shield and kibana
Introduction to Shield and kibanaIntroduction to Shield and kibana
Introduction to Shield and kibana
Knoldus Inc.
 
Building and Deploying Application to Apache Mesos
Building and Deploying Application to Apache MesosBuilding and Deploying Application to Apache Mesos
Building and Deploying Application to Apache Mesos
Joe Stein
 
HashiCorp's Vault - The Examples
HashiCorp's Vault - The ExamplesHashiCorp's Vault - The Examples
HashiCorp's Vault - The Examples
Michał Czeraszkiewicz
 
Workshop: Learning Elasticsearch
Workshop: Learning ElasticsearchWorkshop: Learning Elasticsearch
Workshop: Learning Elasticsearch
Anurag Patel
 
Integrating icinga2 and the HashiCorp suite
Integrating icinga2 and the HashiCorp suiteIntegrating icinga2 and the HashiCorp suite
Integrating icinga2 and the HashiCorp suite
Bram Vogelaar
 
Terraform, Ansible, or pure CloudFormation?
Terraform, Ansible, or pure CloudFormation?Terraform, Ansible, or pure CloudFormation?
Terraform, Ansible, or pure CloudFormation?
geekQ
 
Puppet Camp Boston 2014: Greenfield Puppet: Getting it right from the start (...
Puppet Camp Boston 2014: Greenfield Puppet: Getting it right from the start (...Puppet Camp Boston 2014: Greenfield Puppet: Getting it right from the start (...
Puppet Camp Boston 2014: Greenfield Puppet: Getting it right from the start (...
Puppet
 
Greenfield Puppet: Getting it right from the start
Greenfield Puppet: Getting it right from the startGreenfield Puppet: Getting it right from the start
Greenfield Puppet: Getting it right from the start
David Danzilio
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websites
Lindsay Holmwood
 
Understanding OpenStack Deployments - PuppetConf 2014
Understanding OpenStack Deployments - PuppetConf 2014Understanding OpenStack Deployments - PuppetConf 2014
Understanding OpenStack Deployments - PuppetConf 2014
Puppet
 
Streaming using Kafka Flink & Elasticsearch
Streaming using Kafka Flink & ElasticsearchStreaming using Kafka Flink & Elasticsearch
Streaming using Kafka Flink & Elasticsearch
Keira Zhou
 
Es part 2 pdf no build
Es part 2 pdf no buildEs part 2 pdf no build
Es part 2 pdf no build
Erik Rose
 
ElasticSearch 5.x - New Tricks - 2017-02-08 - Elasticsearch Meetup
ElasticSearch 5.x -  New Tricks - 2017-02-08 - Elasticsearch Meetup ElasticSearch 5.x -  New Tricks - 2017-02-08 - Elasticsearch Meetup
ElasticSearch 5.x - New Tricks - 2017-02-08 - Elasticsearch Meetup
Alberto Paro
 
Indices APIs - Elasticsearch Reference
Indices APIs - Elasticsearch ReferenceIndices APIs - Elasticsearch Reference
Indices APIs - Elasticsearch Reference
Daniel Ku
 
Null Bachaav - May 07 Attack Monitoring workshop.
Null Bachaav - May 07 Attack Monitoring workshop.Null Bachaav - May 07 Attack Monitoring workshop.
Null Bachaav - May 07 Attack Monitoring workshop.
Prajal Kulkarni
 
JavaFest. Nanne Baars. Web application security for developers
JavaFest. Nanne Baars. Web application security for developersJavaFest. Nanne Baars. Web application security for developers
JavaFest. Nanne Baars. Web application security for developers
FestGroup
 
ELK: a log management framework
ELK: a log management frameworkELK: a log management framework
ELK: a log management framework
Giovanni Bechis
 
Cloud native java script apps
Cloud native java script appsCloud native java script apps
Cloud native java script apps
Gary Sieling
 
AWS Study Group - Chapter 03 - Elasticity and Scalability Concepts [Solution ...
AWS Study Group - Chapter 03 - Elasticity and Scalability Concepts [Solution ...AWS Study Group - Chapter 03 - Elasticity and Scalability Concepts [Solution ...
AWS Study Group - Chapter 03 - Elasticity and Scalability Concepts [Solution ...
QCloudMentor
 
How To Disable IE Enhanced Security Windows PowerShell
How To Disable IE Enhanced Security Windows PowerShellHow To Disable IE Enhanced Security Windows PowerShell
How To Disable IE Enhanced Security Windows PowerShell
VCP Muthukrishna
 
Introduction to Shield and kibana
Introduction to Shield and kibanaIntroduction to Shield and kibana
Introduction to Shield and kibana
Knoldus Inc.
 
Building and Deploying Application to Apache Mesos
Building and Deploying Application to Apache MesosBuilding and Deploying Application to Apache Mesos
Building and Deploying Application to Apache Mesos
Joe Stein
 
Workshop: Learning Elasticsearch
Workshop: Learning ElasticsearchWorkshop: Learning Elasticsearch
Workshop: Learning Elasticsearch
Anurag Patel
 
Integrating icinga2 and the HashiCorp suite
Integrating icinga2 and the HashiCorp suiteIntegrating icinga2 and the HashiCorp suite
Integrating icinga2 and the HashiCorp suite
Bram Vogelaar
 
Terraform, Ansible, or pure CloudFormation?
Terraform, Ansible, or pure CloudFormation?Terraform, Ansible, or pure CloudFormation?
Terraform, Ansible, or pure CloudFormation?
geekQ
 
Puppet Camp Boston 2014: Greenfield Puppet: Getting it right from the start (...
Puppet Camp Boston 2014: Greenfield Puppet: Getting it right from the start (...Puppet Camp Boston 2014: Greenfield Puppet: Getting it right from the start (...
Puppet Camp Boston 2014: Greenfield Puppet: Getting it right from the start (...
Puppet
 
Greenfield Puppet: Getting it right from the start
Greenfield Puppet: Getting it right from the startGreenfield Puppet: Getting it right from the start
Greenfield Puppet: Getting it right from the start
David Danzilio
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websites
Lindsay Holmwood
 
Understanding OpenStack Deployments - PuppetConf 2014
Understanding OpenStack Deployments - PuppetConf 2014Understanding OpenStack Deployments - PuppetConf 2014
Understanding OpenStack Deployments - PuppetConf 2014
Puppet
 
Streaming using Kafka Flink & Elasticsearch
Streaming using Kafka Flink & ElasticsearchStreaming using Kafka Flink & Elasticsearch
Streaming using Kafka Flink & Elasticsearch
Keira Zhou
 
Es part 2 pdf no build
Es part 2 pdf no buildEs part 2 pdf no build
Es part 2 pdf no build
Erik Rose
 
ElasticSearch 5.x - New Tricks - 2017-02-08 - Elasticsearch Meetup
ElasticSearch 5.x -  New Tricks - 2017-02-08 - Elasticsearch Meetup ElasticSearch 5.x -  New Tricks - 2017-02-08 - Elasticsearch Meetup
ElasticSearch 5.x - New Tricks - 2017-02-08 - Elasticsearch Meetup
Alberto Paro
 
Indices APIs - Elasticsearch Reference
Indices APIs - Elasticsearch ReferenceIndices APIs - Elasticsearch Reference
Indices APIs - Elasticsearch Reference
Daniel Ku
 
Ad

More from Nag Arvind Gudiseva (12)

Git as version control for Analytics project
Git as version control for Analytics projectGit as version control for Analytics project
Git as version control for Analytics project
Nag Arvind Gudiseva
 
Exception Handling in Scala
Exception Handling in ScalaException Handling in Scala
Exception Handling in Scala
Nag Arvind Gudiseva
 
Hive performance optimizations
Hive performance optimizationsHive performance optimizations
Hive performance optimizations
Nag Arvind Gudiseva
 
Creating executable JAR from Eclipse IDE
Creating executable JAR from Eclipse IDECreating executable JAR from Eclipse IDE
Creating executable JAR from Eclipse IDE
Nag Arvind Gudiseva
 
Adding Idea IntelliJ projects to Subversion Version Control
Adding Idea IntelliJ projects to Subversion Version ControlAdding Idea IntelliJ projects to Subversion Version Control
Adding Idea IntelliJ projects to Subversion Version Control
Nag Arvind Gudiseva
 
Apache Drill with Oracle, Hive and HBase
Apache Drill with Oracle, Hive and HBaseApache Drill with Oracle, Hive and HBase
Apache Drill with Oracle, Hive and HBase
Nag Arvind Gudiseva
 
ElasticSearch Hands On
ElasticSearch Hands OnElasticSearch Hands On
ElasticSearch Hands On
Nag Arvind Gudiseva
 
Hadoop 2.0 cluster setup on ubuntu 14.04 (64 bit)
Hadoop 2.0 cluster setup on ubuntu 14.04 (64 bit)Hadoop 2.0 cluster setup on ubuntu 14.04 (64 bit)
Hadoop 2.0 cluster setup on ubuntu 14.04 (64 bit)
Nag Arvind Gudiseva
 
Order Review Solution Application (Version 2.0)
Order Review Solution Application (Version 2.0)Order Review Solution Application (Version 2.0)
Order Review Solution Application (Version 2.0)
Nag Arvind Gudiseva
 
MSC Temporary Passwords reset tool
MSC Temporary Passwords reset toolMSC Temporary Passwords reset tool
MSC Temporary Passwords reset tool
Nag Arvind Gudiseva
 
Store Support Operations - Training on MSC Application
Store Support Operations - Training on MSC ApplicationStore Support Operations - Training on MSC Application
Store Support Operations - Training on MSC Application
Nag Arvind Gudiseva
 
Store Support Operations - Training on MSC Application
Store Support Operations - Training on MSC ApplicationStore Support Operations - Training on MSC Application
Store Support Operations - Training on MSC Application
Nag Arvind Gudiseva
 
Git as version control for Analytics project
Git as version control for Analytics projectGit as version control for Analytics project
Git as version control for Analytics project
Nag Arvind Gudiseva
 
Creating executable JAR from Eclipse IDE
Creating executable JAR from Eclipse IDECreating executable JAR from Eclipse IDE
Creating executable JAR from Eclipse IDE
Nag Arvind Gudiseva
 
Adding Idea IntelliJ projects to Subversion Version Control
Adding Idea IntelliJ projects to Subversion Version ControlAdding Idea IntelliJ projects to Subversion Version Control
Adding Idea IntelliJ projects to Subversion Version Control
Nag Arvind Gudiseva
 
Apache Drill with Oracle, Hive and HBase
Apache Drill with Oracle, Hive and HBaseApache Drill with Oracle, Hive and HBase
Apache Drill with Oracle, Hive and HBase
Nag Arvind Gudiseva
 
Hadoop 2.0 cluster setup on ubuntu 14.04 (64 bit)
Hadoop 2.0 cluster setup on ubuntu 14.04 (64 bit)Hadoop 2.0 cluster setup on ubuntu 14.04 (64 bit)
Hadoop 2.0 cluster setup on ubuntu 14.04 (64 bit)
Nag Arvind Gudiseva
 
Order Review Solution Application (Version 2.0)
Order Review Solution Application (Version 2.0)Order Review Solution Application (Version 2.0)
Order Review Solution Application (Version 2.0)
Nag Arvind Gudiseva
 
MSC Temporary Passwords reset tool
MSC Temporary Passwords reset toolMSC Temporary Passwords reset tool
MSC Temporary Passwords reset tool
Nag Arvind Gudiseva
 
Store Support Operations - Training on MSC Application
Store Support Operations - Training on MSC ApplicationStore Support Operations - Training on MSC Application
Store Support Operations - Training on MSC Application
Nag Arvind Gudiseva
 
Store Support Operations - Training on MSC Application
Store Support Operations - Training on MSC ApplicationStore Support Operations - Training on MSC Application
Store Support Operations - Training on MSC Application
Nag Arvind Gudiseva
 
Ad

Recently uploaded (20)

Data Science Courses in India iim skills
Data Science Courses in India iim skillsData Science Courses in India iim skills
Data Science Courses in India iim skills
dharnathakur29
 
Digilocker under workingProcess Flow.pptx
Digilocker  under workingProcess Flow.pptxDigilocker  under workingProcess Flow.pptx
Digilocker under workingProcess Flow.pptx
satnamsadguru491
 
Decision Trees in Artificial-Intelligence.pdf
Decision Trees in Artificial-Intelligence.pdfDecision Trees in Artificial-Intelligence.pdf
Decision Trees in Artificial-Intelligence.pdf
Saikat Basu
 
computer organization and assembly language.docx
computer organization and assembly language.docxcomputer organization and assembly language.docx
computer organization and assembly language.docx
alisoftwareengineer1
 
DPR_Expert_Recruitment_notice_Revised.pdf
DPR_Expert_Recruitment_notice_Revised.pdfDPR_Expert_Recruitment_notice_Revised.pdf
DPR_Expert_Recruitment_notice_Revised.pdf
inmishra17121973
 
Ch3MCT24.pptx measure of central tendency
Ch3MCT24.pptx measure of central tendencyCh3MCT24.pptx measure of central tendency
Ch3MCT24.pptx measure of central tendency
ayeleasefa2
 
Developing Security Orchestration, Automation, and Response Applications
Developing Security Orchestration, Automation, and Response ApplicationsDeveloping Security Orchestration, Automation, and Response Applications
Developing Security Orchestration, Automation, and Response Applications
VICTOR MAESTRE RAMIREZ
 
CTS EXCEPTIONSPrediction of Aluminium wire rod physical properties through AI...
CTS EXCEPTIONSPrediction of Aluminium wire rod physical properties through AI...CTS EXCEPTIONSPrediction of Aluminium wire rod physical properties through AI...
CTS EXCEPTIONSPrediction of Aluminium wire rod physical properties through AI...
ThanushsaranS
 
04302025_CCC TUG_DataVista: The Design Story
04302025_CCC TUG_DataVista: The Design Story04302025_CCC TUG_DataVista: The Design Story
04302025_CCC TUG_DataVista: The Design Story
ccctableauusergroup
 
Data Analytics Overview and its applications
Data Analytics Overview and its applicationsData Analytics Overview and its applications
Data Analytics Overview and its applications
JanmejayaMishra7
 
Geometry maths presentation for begginers
Geometry maths presentation for begginersGeometry maths presentation for begginers
Geometry maths presentation for begginers
zrjacob283
 
Flip flop presenation-Presented By Mubahir khan.pptx
Flip flop presenation-Presented By Mubahir khan.pptxFlip flop presenation-Presented By Mubahir khan.pptx
Flip flop presenation-Presented By Mubahir khan.pptx
mubashirkhan45461
 
Defense Against LLM Scheming 2025_04_28.pptx
Defense Against LLM Scheming 2025_04_28.pptxDefense Against LLM Scheming 2025_04_28.pptx
Defense Against LLM Scheming 2025_04_28.pptx
Greg Makowski
 
EDU533 DEMO.pptxccccvbnjjkoo jhgggggbbbb
EDU533 DEMO.pptxccccvbnjjkoo jhgggggbbbbEDU533 DEMO.pptxccccvbnjjkoo jhgggggbbbb
EDU533 DEMO.pptxccccvbnjjkoo jhgggggbbbb
JessaMaeEvangelista2
 
4. Multivariable statistics_Using Stata_2025.pdf
4. Multivariable statistics_Using Stata_2025.pdf4. Multivariable statistics_Using Stata_2025.pdf
4. Multivariable statistics_Using Stata_2025.pdf
axonneurologycenter1
 
VKS-Python-FIe Handling text CSV Binary.pptx
VKS-Python-FIe Handling text CSV Binary.pptxVKS-Python-FIe Handling text CSV Binary.pptx
VKS-Python-FIe Handling text CSV Binary.pptx
Vinod Srivastava
 
Template_A3nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
Template_A3nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnTemplate_A3nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
Template_A3nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
cegiver630
 
Simple_AI_Explanation_English somplr.pptx
Simple_AI_Explanation_English somplr.pptxSimple_AI_Explanation_English somplr.pptx
Simple_AI_Explanation_English somplr.pptx
ssuser2aa19f
 
定制学历(美国Purdue毕业证)普渡大学电子版毕业证
定制学历(美国Purdue毕业证)普渡大学电子版毕业证定制学历(美国Purdue毕业证)普渡大学电子版毕业证
定制学历(美国Purdue毕业证)普渡大学电子版毕业证
Taqyea
 
Molecular methods diagnostic and monitoring of infection - Repaired.pptx
Molecular methods diagnostic and monitoring of infection  -  Repaired.pptxMolecular methods diagnostic and monitoring of infection  -  Repaired.pptx
Molecular methods diagnostic and monitoring of infection - Repaired.pptx
7tzn7x5kky
 
Data Science Courses in India iim skills
Data Science Courses in India iim skillsData Science Courses in India iim skills
Data Science Courses in India iim skills
dharnathakur29
 
Digilocker under workingProcess Flow.pptx
Digilocker  under workingProcess Flow.pptxDigilocker  under workingProcess Flow.pptx
Digilocker under workingProcess Flow.pptx
satnamsadguru491
 
Decision Trees in Artificial-Intelligence.pdf
Decision Trees in Artificial-Intelligence.pdfDecision Trees in Artificial-Intelligence.pdf
Decision Trees in Artificial-Intelligence.pdf
Saikat Basu
 
computer organization and assembly language.docx
computer organization and assembly language.docxcomputer organization and assembly language.docx
computer organization and assembly language.docx
alisoftwareengineer1
 
DPR_Expert_Recruitment_notice_Revised.pdf
DPR_Expert_Recruitment_notice_Revised.pdfDPR_Expert_Recruitment_notice_Revised.pdf
DPR_Expert_Recruitment_notice_Revised.pdf
inmishra17121973
 
Ch3MCT24.pptx measure of central tendency
Ch3MCT24.pptx measure of central tendencyCh3MCT24.pptx measure of central tendency
Ch3MCT24.pptx measure of central tendency
ayeleasefa2
 
Developing Security Orchestration, Automation, and Response Applications
Developing Security Orchestration, Automation, and Response ApplicationsDeveloping Security Orchestration, Automation, and Response Applications
Developing Security Orchestration, Automation, and Response Applications
VICTOR MAESTRE RAMIREZ
 
CTS EXCEPTIONSPrediction of Aluminium wire rod physical properties through AI...
CTS EXCEPTIONSPrediction of Aluminium wire rod physical properties through AI...CTS EXCEPTIONSPrediction of Aluminium wire rod physical properties through AI...
CTS EXCEPTIONSPrediction of Aluminium wire rod physical properties through AI...
ThanushsaranS
 
04302025_CCC TUG_DataVista: The Design Story
04302025_CCC TUG_DataVista: The Design Story04302025_CCC TUG_DataVista: The Design Story
04302025_CCC TUG_DataVista: The Design Story
ccctableauusergroup
 
Data Analytics Overview and its applications
Data Analytics Overview and its applicationsData Analytics Overview and its applications
Data Analytics Overview and its applications
JanmejayaMishra7
 
Geometry maths presentation for begginers
Geometry maths presentation for begginersGeometry maths presentation for begginers
Geometry maths presentation for begginers
zrjacob283
 
Flip flop presenation-Presented By Mubahir khan.pptx
Flip flop presenation-Presented By Mubahir khan.pptxFlip flop presenation-Presented By Mubahir khan.pptx
Flip flop presenation-Presented By Mubahir khan.pptx
mubashirkhan45461
 
Defense Against LLM Scheming 2025_04_28.pptx
Defense Against LLM Scheming 2025_04_28.pptxDefense Against LLM Scheming 2025_04_28.pptx
Defense Against LLM Scheming 2025_04_28.pptx
Greg Makowski
 
EDU533 DEMO.pptxccccvbnjjkoo jhgggggbbbb
EDU533 DEMO.pptxccccvbnjjkoo jhgggggbbbbEDU533 DEMO.pptxccccvbnjjkoo jhgggggbbbb
EDU533 DEMO.pptxccccvbnjjkoo jhgggggbbbb
JessaMaeEvangelista2
 
4. Multivariable statistics_Using Stata_2025.pdf
4. Multivariable statistics_Using Stata_2025.pdf4. Multivariable statistics_Using Stata_2025.pdf
4. Multivariable statistics_Using Stata_2025.pdf
axonneurologycenter1
 
VKS-Python-FIe Handling text CSV Binary.pptx
VKS-Python-FIe Handling text CSV Binary.pptxVKS-Python-FIe Handling text CSV Binary.pptx
VKS-Python-FIe Handling text CSV Binary.pptx
Vinod Srivastava
 
Template_A3nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
Template_A3nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnTemplate_A3nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
Template_A3nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
cegiver630
 
Simple_AI_Explanation_English somplr.pptx
Simple_AI_Explanation_English somplr.pptxSimple_AI_Explanation_English somplr.pptx
Simple_AI_Explanation_English somplr.pptx
ssuser2aa19f
 
定制学历(美国Purdue毕业证)普渡大学电子版毕业证
定制学历(美国Purdue毕业证)普渡大学电子版毕业证定制学历(美国Purdue毕业证)普渡大学电子版毕业证
定制学历(美国Purdue毕业证)普渡大学电子版毕业证
Taqyea
 
Molecular methods diagnostic and monitoring of infection - Repaired.pptx
Molecular methods diagnostic and monitoring of infection  -  Repaired.pptxMolecular methods diagnostic and monitoring of infection  -  Repaired.pptx
Molecular methods diagnostic and monitoring of infection - Repaired.pptx
7tzn7x5kky
 

Elasticsearch Security Strategy

  • 1. 1 | P a g e Elasticsearch Security Strategy Table of Contents Existing State of Elasticsearch Cluster Security........................................................................................................ 2 X-Pack..................................................................................................................................................................2 Installation........................................................................................................................................................... 2 Implementation.................................................................................................................................................... 3 Desired State of Elasticsearch Cluster Security........................................................................................................ 4 Proof of Concept - cURL Commands................................................................................................................... 4 Anonymous User trying to access Elasticsearch Cluster....................................................................................... 6 Super-User "elastic" accessing Elasticsearch Cluster............................................................................................ 6 User "charan" with role "filebeat_admin" trying to view all the indices................................................................ 7 User "charan" with role "filebeat_admin" accessing "filebeat-*" index.................................................................8 User "charan" with role "filebeat_admin" accessing "logstash-*" index................................................................ 9 User "vasu" with role "logstash_admin" trying to access "filebeat-*" index.......................................................... 9 User "vasu" with role "logstash_admin" accessing "logstash-*" index................................................................ 10 Super-User "elastic" accessing Kibana.............................................................................................................. 11 User "charan" with role "filebeat_admin" accessing Kibana............................................................................... 12 Auditing............................................................................................................................................................. 12
  • 2. 2 | P a g e Existing State of Elasticsearch Cluster Security Market IntelligenceandInvestmentServices Teamsare usingElasticsearch. Boththe teamscan view all the indices available inElasticsearch. Also,eachof these teamscansearchthe contentsof the indicesthatare not relatedor ownedbythem. Thiscan cause a potential securitybreach. X-Pack X-Packisan ElasticStack extensionthatimplementsfeatureslike security,alerting,monitoring,reportingandgraph representationinone package.Itiseasyto install andthese componentscanbe easilyenabledordisabled. X-PackprovidesSecurityModule. The featuresof thismoduleare asfollows:  Role BasedAccessControl (RBAC) o Elasticsearchistreatedasa NoSql Database. Accesstoindex isprovidedasperthe roles.  Privileges/Permissions o Figuringoutthe actionsand accessesonthe index.  Roles o Groupingprivileges/permissionsintoroles.  Users o Addinguserstoroles. Installation X-Packisinstalledoneachandeverynode inthe Cluster. Bydefault,basicauthenticationshall be enabled. We mustspecifya username andpassword. X-PackSecurityprovidesabuilt-inelasticsuperuserthatcanbe usedtoset upthe securityinthe Cluster.
  • 3. 3 | P a g e The default user is elastic and password is changeme. "elastic" user hasfull accessto the cluster,includingall the indicesanddata. Implementation 1. Install X-PackplugininElasticsearch,KibanaandLogstash 2. Modify elasticsearch.ymlfile: a. xpack.security.enabled: true 3. Modify kibana.ymlfile: a. xpack.security.enabled: true b. elasticsearch.username: "kibana" c. elasticsearch.password: "kibanapassword" 4. RestartElasticsearchandKibanaservices. 5. Change the passwordsof the built-inelastic,kibana,andlogstash_system users. $ curl -XPUT -u elastic 'localhost:9200/_xpack/security/user/elastic/_password' -H "Content-Type: application/json" -d '{ "password" : "elasticpassword" }' $ curl -XPUT -u elastic 'localhost:9200/_xpack/security/user/kibana/_password' -H "Content-Type: application/json" -d '{ "password" : "kibanapassword" }' $ curl -XPUT -u elastic 'localhost:9200/_xpack/security/user/logstash_system/_password' -H "Content-Type: application/json" -d '{ "password" : "logstashpassword" }' 6. We needtosetup rolesandusersto control access to ElasticsearchandKibana
  • 4. 4 | P a g e Desired State of Elasticsearch Cluster Security Proof of Concept - cURL Commands To grant DivyaCharan TejaMulagaleti full accesstoall indicesthatmatchthe pattern filebeat-*and enable himto create visualizationsanddashboardsforthose indicesinKibana,we shall create an filebeat_admin role andassign the role to a new charan user. $ curl -XPOST -u elastic 'localhost:9200/_xpack/security/role/filebeat_admin' -H "Content-Type: application/json" -d '{ "indices" : [ { "names" : [ "filebeat-*" ], "privileges" : [ "all" ] }, { "names" : [ ".kibana*" ], "privileges" : [ "manage", "read", "index" ] } ] }' {"role":{"created":true}} $ curl -XPOST -u elastic 'localhost:9200/_xpack/security/user/charan' -H "Content-Type: application/json" -d '{ "password" : "sagarsoft", "full_name" : "Divya Charan Teja Mulagaleti", "email" : "[email protected]", "roles" : [ "filebeat_admin" ] }' {"user":{"created":true}}
  • 5. 5 | P a g e To grant VasudevaReddyGangasani full accesstoall indicesthatmatchthe pattern logstash-*andenable himto create visualizationsanddashboardsforthose indicesinKibana,we shall create an logstash_admin role andassign the role to a new vasu user. $ curl -XPOST -u elastic 'localhost:9200/_xpack/security/role/logstash_admin' -H "Content-Type: application/json" -d '{ "indices" : [ { "names" : [ "logstash-*" ], "privileges" : [ "all" ] }, { "names" : [ ".kibana*" ], "privileges" : [ "manage", "read", "index" ] } ] }' {"role":{"created":true}} $ curl -XPOST -u elastic 'localhost:9200/_xpack/security/user/vasu' -H "Content-Type: application/json" -d '{ "password" : "sagarsoft", "full_name" : "Vasudeva Reddy Gangasani", "email" : "[email protected]", "roles" : [ "logstash_admin" ] }' {"user":{"created":true}}
  • 6. 6 | P a g e AnonymousUser trying to access Elasticsearch Cluster HTTP status code: 401 Unauthorized error Super-User "elastic" accessing Elasticsearch Cluster "elastic" user can access all the indices
  • 7. 7 | P a g e User "charan"with role "filebeat_admin"trying to view all the indices HTTP status code: 403 Forbidden error
  • 8. 8 | P a g e User "charan"with role "filebeat_admin"accessing "filebeat-*" index Elasticsearch serves the request with JSON response
  • 9. 9 | P a g e User "charan"with role "filebeat_admin" accessing "logstash-*" index HTTP status code: 403 Forbidden error User "vasu" with role"logstash_admin" trying to access "filebeat-*" index HTTP status code: 403 Forbidden error
  • 10. 10 | P a g e User "vasu" with role"logstash_admin" accessing "logstash-*" index Elasticsearch serves the request with JSON response
  • 11. 11 | P a g e Super-User "elastic" accessing Kibana "elastic" user can access all the indices
  • 12. 12 | P a g e User "charan"with role "filebeat_admin"accessing Kibana "logstash-*" index is not accessible Only "filebeat-*" index is accessible Auditing Auditlogsare disabledbydefault.Toenable thisfunctionality,setthe followingin elasticsearch.yml: xpack.security.audit.enabled: true X-PackSecurityprovidesaudittrail functionalityforall nodesinthe cluster.We can configure the auditlevel,which accounts forthe type of eventsthatare logged.These eventsinclude failedauthenticationattempts,useraccess denied,node connectiondenied,andmore.