SlideShare a Scribd company logo
Shield & Kibana
Sushil Kumar
Software Consultant
Knoldus Software LLP.
Agenda
Shield
• Introduction
• Installation
• Basic Authentication
• Role-based Access Control
• Message Authentication
Kibana
• Introduction
• Installation
• Using Kibana with Shield
• Getting Started with Kibana
• Demo
Shield
● Shield is a plugin for Elasticsearch that enables you to easily secure
an elasticsearch cluster.
● With Shield, you can protect your data with username and passwod.
● It also provides advance security features such as encrypting
communications, role-based access control, IP filtering, and
auditing.
Introduction
Features
● Preventing unauthorized access with password protection,
role-based access control, and IP filtering.
● Preserving the integrity of your data with message
authentication and SSL/TLS encryption.
● Maintaining an audit trail so you know who’s doing what to
your data.
Installation
1. Run bin/plugin install from ES_HOME to install the license plugin
2. Run bin/plugin install to install the Shield plugin into Elasticsearch.
Note: The Shield plugin must be installed on every node in the cluster. If you are installing
to a live cluster, you must stop all of the nodes, install Shield, and restart the nodes.
bin/plugin install license
bin/plugin install shield
Uninstalling Shield
To uninstall Shield:
1. Shut down Elasticsearch.
2. Remove the Shield plugin from Elasticsearch:
3. Restart Elasticsearch.
bin/plugin remove shield
Basic Authentication
Once Shield is installed, a username and password is required to
communicate with the cluster.
All you need to do to use basic authentication is set up users and assign
them to one of the basic predefined roles:
➢ admin: Can perform any cluster or index action.
➢ power_user: Can monitor the cluster and perform any index action.
➢ user: Can perform read actions on any index.
Basic Authentication
Set up Users
Use the esusers command line tool to create an user:
Example:
Now you can submit requests as your admin user:
bin/shield/esusers useradd admin -r admin -p password
curl -u admin -XGET 'http://localhost:9200/'
curl -u admin:password -XGET 'http://localhost:9200/'
Basic Authentication
Delete User
List Users
Update Roles
bin/shield/esusers userdel username
bin/shield/esusers list
bin/shield/esusers roles username -r admin -a user
User API
● The Users API enables you to create, read, update, and delete native
users from the native realm.
● To use this API, you must have at least the manage_security cluster
privilege.
User API
Adding
Submit a PUT or POST request to the /_shield/user/<username> endpoint
Response
{
"user": {
"created" : true
}
}
POST /_shield/user/alice
{
"password" : "j@rV1s",
"roles" : [ "user", "other_role1" ]
}
User API
Retrieving
GET request to the /_shield/user endpoint
Deleting
DELETE request to the /_shield/user/<username> endpoint
DELETE /_shield/user/ironman
GET /_shield/user
GET /_shield/user/alice,bob
Managing Roles
Roles Api
Adding Roles
PUT or POST request to the /_shield/role/<rolename> endpoint
POST /_shield/role/my_role
{
"cluster": ["monitor"],
"indices": [
{
"names" : [ "index1", "index2" ],
"privileges" : ["all"],
"fields" : [ "title", "body" ],
"query" : "{"match": {"title": "foo"}}"
}
]
}
Shield Privileges
1. Cluster privileges
● all
● monitor
● manage
● manage_security
● mangae_index_templates
● transport_clients
Managing Roles
2. Indices privileges
● all
● monitor
● manage
● read
● index
● create
● delete
● write
● delete_index
● create_index
Managing Roles
Managing Roles
Response
● Can also use wildcards and regular expression to reffer to multiple indices.
{
"role" : {
"created" : true
}
}
"foo-bar": # match the literal `foo-bar`
"foo-*": # match anything beginning with "foo-"
"/.*-201[0-9]-.*/": # match anything containing 2010-2019
Managing Roles
Example:
POST /_shield/role/customer_care
{
"indices": [
{
"names": [ "*" ],
"privileges": ["read"],
"fields": [
"issue_id",
"description",
“customer.*
]
}
]
}
Managing Roles
Retrieving Roles
GET request to the /_shield/role endpoint:
Deleting Roles
DELETE request to the /_shield/role/<rolename> endpoint
GET /_shield/role
GET /_shield/role/my_admin_role,log_admin_role
DELETE /_shield/role/my_admin_role
Node Authentication and Channel Encryption
● With Shield, you can use SSL/TLS to encrypt communication to and from
nodes.
● When SSL/TLS is enabled, the nodes validate each other’s certificates,
establishing trust between the nodes.
● Require that nodes authenticate new nodes that join the cluster using SSL
certificates.
Enable Message Authenticaton
Message authentication verifies that a message has not been tampered
with or corrupted in transit during node-to-node communication.
This creates a system key file in CONFIG_DIR/shield/system_key.
Copy the genererated system key to the rest of the nodes in the cluster.
Notes: The system key is a symmetric key, so the same key must be on every node in the
cluster.
Bin/shield/syskeygen
Enable Auditing
It allow you to stores a record of attempted and successful interactions
with your Elasticsearch cluster.
You can use this information track of who is doing what to your cluster and
identify potential security issues.
To enable auditing, add the following setting to elasticsearch.yml:
By default, events are logged to a dedicated elasticsearch-access.log file in ES_HOME/logs.
shield.audit.enabled: true
Introduction to Shield and kibana
Introduction
● Kibana is an open source analytics and visualization platform designed to
work with Elasticsearch
● Use Kibana to search, view, and interact with data stored in Elasticsearch
indices.
● Easily perform advanced data analysis and visualize your data in a variety
of charts, tables, and maps.
● Easy to understand large volumes of data. Its simple, browser-based
interface enables you to quickly create and share dynamic dashboards
that display changes to Elasticsearch queries in real time.
Features
● Seamless Integration with Elasticsearch
Architected to work with Elasticsearch, Kibana gives shape to any kind of data — structured and
unstructured — indexed into Elasticsearch. It also benefits from Elasticsearch's powerful search and
analytics capabilities.
● Give shape to your data
To better understand large volumes of data, easily create bar charts, line and scatter plots,
histograms, pie charts, and maps.
● Sophisticated Analytics
Leverage the power of Elasticsearch analytics capabilities to analyze your data intelligently,
perform mathematical transformations, and slice and dice your data as you see fit.
● Flexible Interface, Easy to Share
Easily create, save, share, and embed your visualized data for quick and smart communication.
Features
● Easy Setup
Simple and friendly setup and startup. Kibana 4 ships with its own web server to help you get
up and running quickly.
● Visualize Data from Many Sources
Easily visualize data pushed into Elasticsearch from Logstash, ES-Hadoop, Beats, or third-
party technologies like Apache Flume, Fluentd, and many others.
● Simple Data Export
Easily export interesting bits of data to merge and meld with other data sets to quickly
prototype new analyses and discover something new.
Installations
To get Kibana up and running:
1. Download the Kibana 4 binary package for your platform.
2. Extract the .zip or tar.gz archive file.
3. Run Kibana from the install directory: bin/kibana (Linux/MacOSX) or
binkibana.bat (Windows).
Using Kibana with Shield
● Kibana users have to authenticate when your cluster has Shield installed.
● Need to configure credentials for the Kibana server to authenticate
requests coming from Kibana webserver.
To use Kibana with Shield:
1. Configure credentials for the Kibana server.
Create a user account for the Kibana server and assign it the kibana4_server
role
esusers useradd kibana4-server -r kibana4_server -p password
Using Kibana with Shield
2. Specify the credentials for your Kibana server user in the Kibana configuration
file, /config/kibana.yml.
elasticsearch.username: "kibana4-server"
elasticsearch.password: "password"
Using Kibana with Shield
3. Derive Kibana user roles
kibana_user:
cluster:
- monitor
indices:
- names: 'customer'
privileges:
- view_index_metadata
- read
- names: '.kibana'
privileges:
- manage
- read
Using Kibana with Shield
4. Assign the appropriate roles to your Kibana users or groups of users
POST /_shield/user/alice
{
"password" : "t0pS3cr3",
"roles" : [ "kibana_user" ]
}
Using Kibana with Shield
5. Install the Shield plugin into Kibana. The Shield plugin secures user sessions
and enables users to log in and out of Kibana.
6. Configure Kibana to encrypt communications between the browser and the
Kibana server.
bin/kibana plugin --install kibana/shield/2.3.3
server.ssl.key: /path/to/your/server.key
server.ssl.cert: /path/to/your/server.crt
shield.encryptionKey: "something_secret"
Kibana Dynamic Mapping
● Kibana needs dynamic mapping to use fields in visualizations correctly, as well as
to manage the .kibana index where saved searches, visualizations, and
dashboards are stored.
Create the .kibana index with dynamic mapping enabled just for that index:
PUT .kibana
{
"index.mapper.dynamic": true
}
References
● https://www.elastic.co/products/kibana
● https://www.elastic.co/products/shield
● http://blog.trifork.com/2015/03/05/shield-your-kibana-dashboards/
● https://www.timroes.de/2015/02/07/kibana-4-tutorial-part-2-discover/
● https://www.timroes.de/2015/02/07/kibana-4-tutorial-part-3-visualize/
● https://www.timroes.de/2015/02/07/kibana-4-tutorial-part-4-dashboard/
Thank You

More Related Content

PDF
Shield talk elasticsearch meetup Zurich 27.05.2015
PDF
Vault
PPTX
Integrating OpenStack with Active Directory
PDF
A tale of application development
PPTX
OpenStack Keystone
PPTX
Hashicorp Vault ppt
PDF
Neil Saunders (Beamly) - Securing your AWS Infrastructure with Hashicorp Vault
PDF
Keystone: Federated
Shield talk elasticsearch meetup Zurich 27.05.2015
Vault
Integrating OpenStack with Active Directory
A tale of application development
OpenStack Keystone
Hashicorp Vault ppt
Neil Saunders (Beamly) - Securing your AWS Infrastructure with Hashicorp Vault
Keystone: Federated

What's hot (20)

PDF
Securing Microservices using Play and Akka HTTP
PDF
Keystone Federation
PPTX
Using ansible vault to protect your secrets
PPTX
OpenStack Keystone with LDAP
PPTX
RBAC in Azure Kubernetes Service AKS
PDF
Shipping & Visualize Your Data With ELK
PPTX
Elk ruminating on logs
PDF
Distributed Eventing in OSGi
PPTX
ELK Ruminating on Logs (Zendcon 2016)
PDF
Logging logs with Logstash - Devops MK 10-02-2016
PDF
OpenStack Identity - Keystone (liberty) by Lorenzo Carnevale and Silvio Tavilla
PPTX
Building IAM for OpenStack
PDF
Chickens & Eggs: Managing secrets in AWS with Hashicorp Vault
PPTX
Vault - Secret and Key Management
PPTX
Secure Keystone Deployment
PDF
Issuing temporary credentials for my sql using hashicorp vault
PDF
Secrets in Kubernetes
PPTX
Icinga Camp Bangalore - Icinga2 API use cases and BlueJeans Inc.
PPTX
How to Build Your First Web App in Go
PDF
Secret Management with Hashicorp’s Vault
Securing Microservices using Play and Akka HTTP
Keystone Federation
Using ansible vault to protect your secrets
OpenStack Keystone with LDAP
RBAC in Azure Kubernetes Service AKS
Shipping & Visualize Your Data With ELK
Elk ruminating on logs
Distributed Eventing in OSGi
ELK Ruminating on Logs (Zendcon 2016)
Logging logs with Logstash - Devops MK 10-02-2016
OpenStack Identity - Keystone (liberty) by Lorenzo Carnevale and Silvio Tavilla
Building IAM for OpenStack
Chickens & Eggs: Managing secrets in AWS with Hashicorp Vault
Vault - Secret and Key Management
Secure Keystone Deployment
Issuing temporary credentials for my sql using hashicorp vault
Secrets in Kubernetes
Icinga Camp Bangalore - Icinga2 API use cases and BlueJeans Inc.
How to Build Your First Web App in Go
Secret Management with Hashicorp’s Vault
Ad

Viewers also liked (20)

PDF
Kibana + timelion: time series with the elastic stack
PDF
Interactive learning analytics dashboards with ELK (Elasticsearch Logstash Ki...
PDF
Introduction au langage Go
ODP
Introduction to Scala JS
ODP
An Introduction to Quill
PDF
Introduction To Kibana
PPTX
Using ELK-Stack (Elasticsearch, Logstash and Kibana) with BizTalk Server
PPTX
Elasticsearch, Logstash, Kibana. Cool search, analytics, data mining and more...
ODP
Meet Up - Spark Stream Processing + Kafka
PDF
Logging with Elasticsearch, Logstash & Kibana
PPTX
Attack monitoring using ElasticSearch Logstash and Kibana
PDF
Watch everything, Watch anything
PDF
Building a fully-automated Fast Data Platform
PPTX
More kibana
PPTX
Data Visualization Design Best Practices Workshop
PDF
Time Series Database and Tick Stack
ODP
Drilling the Async Library
ODP
Getting Started With AureliaJs
ODP
Akka streams
Kibana + timelion: time series with the elastic stack
Interactive learning analytics dashboards with ELK (Elasticsearch Logstash Ki...
Introduction au langage Go
Introduction to Scala JS
An Introduction to Quill
Introduction To Kibana
Using ELK-Stack (Elasticsearch, Logstash and Kibana) with BizTalk Server
Elasticsearch, Logstash, Kibana. Cool search, analytics, data mining and more...
Meet Up - Spark Stream Processing + Kafka
Logging with Elasticsearch, Logstash & Kibana
Attack monitoring using ElasticSearch Logstash and Kibana
Watch everything, Watch anything
Building a fully-automated Fast Data Platform
More kibana
Data Visualization Design Best Practices Workshop
Time Series Database and Tick Stack
Drilling the Async Library
Getting Started With AureliaJs
Akka streams
Ad

Similar to Introduction to Shield and kibana (20)

PDF
OpenStack Identity - Keystone (kilo) by Lorenzo Carnevale and Silvio Tavilla
PPTX
IBM Spectrum Scale Security
PPTX
Kubernetes security with AWS
PDF
Masterless Puppet Using AWS S3 Buckets and IAM Roles
PDF
Enhancing Security of MySQL Connections using SSL certificates
PDF
Vijayanirmala a_community_builders_guidebook_for_securing_your_secrets
PPTX
Low Hanging Fruit, Making Your Basic MongoDB Installation More Secure
PPTX
Azure Low Lands 2019 - Building secure cloud applications with Azure Key Vault
PDF
How to implement data encryption at rest in compliance with enterprise requir...
PPTX
How to Secure Your Scylla Deployment: Authorization, Encryption, LDAP Authent...
PPTX
Security for cloud native workloads
PDF
Hashicorp Vault: Open Source Secrets Management at #OPEN18
PDF
AWS Security Best Practices (March 2017)
PPTX
Advance java session 19
PDF
OSMC 2018 | Current State of Icinga by Bernd Erk
PDF
Securing your database servers from external attacks
PPTX
DevFest | Presentation | Final - Imran Roshan
PDF
CloudStack Tooling Ecosystem – Kiran Chavala, ShapeBlue
PDF
201504 securing cassandraanddse
PDF
Cassandra Security Configuration
OpenStack Identity - Keystone (kilo) by Lorenzo Carnevale and Silvio Tavilla
IBM Spectrum Scale Security
Kubernetes security with AWS
Masterless Puppet Using AWS S3 Buckets and IAM Roles
Enhancing Security of MySQL Connections using SSL certificates
Vijayanirmala a_community_builders_guidebook_for_securing_your_secrets
Low Hanging Fruit, Making Your Basic MongoDB Installation More Secure
Azure Low Lands 2019 - Building secure cloud applications with Azure Key Vault
How to implement data encryption at rest in compliance with enterprise requir...
How to Secure Your Scylla Deployment: Authorization, Encryption, LDAP Authent...
Security for cloud native workloads
Hashicorp Vault: Open Source Secrets Management at #OPEN18
AWS Security Best Practices (March 2017)
Advance java session 19
OSMC 2018 | Current State of Icinga by Bernd Erk
Securing your database servers from external attacks
DevFest | Presentation | Final - Imran Roshan
CloudStack Tooling Ecosystem – Kiran Chavala, ShapeBlue
201504 securing cassandraanddse
Cassandra Security Configuration

More from Knoldus Inc. (20)

PPTX
Angular Hydration Presentation (FrontEnd)
PPTX
Optimizing Test Execution: Heuristic Algorithm for Self-Healing
PPTX
Self-Healing Test Automation Framework - Healenium
PPTX
Kanban Metrics Presentation (Project Management)
PPTX
Java 17 features and implementation.pptx
PPTX
Chaos Mesh Introducing Chaos in Kubernetes
PPTX
GraalVM - A Step Ahead of JVM Presentation
PPTX
Nomad by HashiCorp Presentation (DevOps)
PPTX
Nomad by HashiCorp Presentation (DevOps)
PPTX
DAPR - Distributed Application Runtime Presentation
PPTX
Introduction to Azure Virtual WAN Presentation
PPTX
Introduction to Argo Rollouts Presentation
PPTX
Intro to Azure Container App Presentation
PPTX
Insights Unveiled Test Reporting and Observability Excellence
PPTX
Introduction to Splunk Presentation (DevOps)
PPTX
Code Camp - Data Profiling and Quality Analysis Framework
PPTX
AWS: Messaging Services in AWS Presentation
PPTX
Amazon Cognito: A Primer on Authentication and Authorization
PPTX
ZIO Http A Functional Approach to Scalable and Type-Safe Web Development
PPTX
Managing State & HTTP Requests In Ionic.
Angular Hydration Presentation (FrontEnd)
Optimizing Test Execution: Heuristic Algorithm for Self-Healing
Self-Healing Test Automation Framework - Healenium
Kanban Metrics Presentation (Project Management)
Java 17 features and implementation.pptx
Chaos Mesh Introducing Chaos in Kubernetes
GraalVM - A Step Ahead of JVM Presentation
Nomad by HashiCorp Presentation (DevOps)
Nomad by HashiCorp Presentation (DevOps)
DAPR - Distributed Application Runtime Presentation
Introduction to Azure Virtual WAN Presentation
Introduction to Argo Rollouts Presentation
Intro to Azure Container App Presentation
Insights Unveiled Test Reporting and Observability Excellence
Introduction to Splunk Presentation (DevOps)
Code Camp - Data Profiling and Quality Analysis Framework
AWS: Messaging Services in AWS Presentation
Amazon Cognito: A Primer on Authentication and Authorization
ZIO Http A Functional Approach to Scalable and Type-Safe Web Development
Managing State & HTTP Requests In Ionic.

Recently uploaded (20)

PPTX
Operating system designcfffgfgggggggvggggggggg
PPTX
Odoo POS Development Services by CandidRoot Solutions
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPTX
ai tools demonstartion for schools and inter college
PPTX
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
AI in Product Development-omnex systems
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
System and Network Administraation Chapter 3
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PPTX
Introduction to Artificial Intelligence
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
top salesforce developer skills in 2025.pdf
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
Operating system designcfffgfgggggggvggggggggg
Odoo POS Development Services by CandidRoot Solutions
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Which alternative to Crystal Reports is best for small or large businesses.pdf
ai tools demonstartion for schools and inter college
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
AI in Product Development-omnex systems
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
System and Network Administraation Chapter 3
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Introduction to Artificial Intelligence
Upgrade and Innovation Strategies for SAP ERP Customers
CHAPTER 2 - PM Management and IT Context
Design an Analysis of Algorithms I-SECS-1021-03
top salesforce developer skills in 2025.pdf
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Design an Analysis of Algorithms II-SECS-1021-03
How to Choose the Right IT Partner for Your Business in Malaysia
How to Migrate SBCGlobal Email to Yahoo Easily

Introduction to Shield and kibana

  • 1. Shield & Kibana Sushil Kumar Software Consultant Knoldus Software LLP.
  • 2. Agenda Shield • Introduction • Installation • Basic Authentication • Role-based Access Control • Message Authentication Kibana • Introduction • Installation • Using Kibana with Shield • Getting Started with Kibana • Demo
  • 4. ● Shield is a plugin for Elasticsearch that enables you to easily secure an elasticsearch cluster. ● With Shield, you can protect your data with username and passwod. ● It also provides advance security features such as encrypting communications, role-based access control, IP filtering, and auditing. Introduction
  • 5. Features ● Preventing unauthorized access with password protection, role-based access control, and IP filtering. ● Preserving the integrity of your data with message authentication and SSL/TLS encryption. ● Maintaining an audit trail so you know who’s doing what to your data.
  • 6. Installation 1. Run bin/plugin install from ES_HOME to install the license plugin 2. Run bin/plugin install to install the Shield plugin into Elasticsearch. Note: The Shield plugin must be installed on every node in the cluster. If you are installing to a live cluster, you must stop all of the nodes, install Shield, and restart the nodes. bin/plugin install license bin/plugin install shield
  • 7. Uninstalling Shield To uninstall Shield: 1. Shut down Elasticsearch. 2. Remove the Shield plugin from Elasticsearch: 3. Restart Elasticsearch. bin/plugin remove shield
  • 8. Basic Authentication Once Shield is installed, a username and password is required to communicate with the cluster. All you need to do to use basic authentication is set up users and assign them to one of the basic predefined roles: ➢ admin: Can perform any cluster or index action. ➢ power_user: Can monitor the cluster and perform any index action. ➢ user: Can perform read actions on any index.
  • 9. Basic Authentication Set up Users Use the esusers command line tool to create an user: Example: Now you can submit requests as your admin user: bin/shield/esusers useradd admin -r admin -p password curl -u admin -XGET 'http://localhost:9200/' curl -u admin:password -XGET 'http://localhost:9200/'
  • 10. Basic Authentication Delete User List Users Update Roles bin/shield/esusers userdel username bin/shield/esusers list bin/shield/esusers roles username -r admin -a user
  • 11. User API ● The Users API enables you to create, read, update, and delete native users from the native realm. ● To use this API, you must have at least the manage_security cluster privilege.
  • 12. User API Adding Submit a PUT or POST request to the /_shield/user/<username> endpoint Response { "user": { "created" : true } } POST /_shield/user/alice { "password" : "j@rV1s", "roles" : [ "user", "other_role1" ] }
  • 13. User API Retrieving GET request to the /_shield/user endpoint Deleting DELETE request to the /_shield/user/<username> endpoint DELETE /_shield/user/ironman GET /_shield/user GET /_shield/user/alice,bob
  • 14. Managing Roles Roles Api Adding Roles PUT or POST request to the /_shield/role/<rolename> endpoint POST /_shield/role/my_role { "cluster": ["monitor"], "indices": [ { "names" : [ "index1", "index2" ], "privileges" : ["all"], "fields" : [ "title", "body" ], "query" : "{"match": {"title": "foo"}}" } ] }
  • 15. Shield Privileges 1. Cluster privileges ● all ● monitor ● manage ● manage_security ● mangae_index_templates ● transport_clients Managing Roles
  • 16. 2. Indices privileges ● all ● monitor ● manage ● read ● index ● create ● delete ● write ● delete_index ● create_index Managing Roles
  • 17. Managing Roles Response ● Can also use wildcards and regular expression to reffer to multiple indices. { "role" : { "created" : true } } "foo-bar": # match the literal `foo-bar` "foo-*": # match anything beginning with "foo-" "/.*-201[0-9]-.*/": # match anything containing 2010-2019
  • 18. Managing Roles Example: POST /_shield/role/customer_care { "indices": [ { "names": [ "*" ], "privileges": ["read"], "fields": [ "issue_id", "description", “customer.* ] } ] }
  • 19. Managing Roles Retrieving Roles GET request to the /_shield/role endpoint: Deleting Roles DELETE request to the /_shield/role/<rolename> endpoint GET /_shield/role GET /_shield/role/my_admin_role,log_admin_role DELETE /_shield/role/my_admin_role
  • 20. Node Authentication and Channel Encryption ● With Shield, you can use SSL/TLS to encrypt communication to and from nodes. ● When SSL/TLS is enabled, the nodes validate each other’s certificates, establishing trust between the nodes. ● Require that nodes authenticate new nodes that join the cluster using SSL certificates.
  • 21. Enable Message Authenticaton Message authentication verifies that a message has not been tampered with or corrupted in transit during node-to-node communication. This creates a system key file in CONFIG_DIR/shield/system_key. Copy the genererated system key to the rest of the nodes in the cluster. Notes: The system key is a symmetric key, so the same key must be on every node in the cluster. Bin/shield/syskeygen
  • 22. Enable Auditing It allow you to stores a record of attempted and successful interactions with your Elasticsearch cluster. You can use this information track of who is doing what to your cluster and identify potential security issues. To enable auditing, add the following setting to elasticsearch.yml: By default, events are logged to a dedicated elasticsearch-access.log file in ES_HOME/logs. shield.audit.enabled: true
  • 24. Introduction ● Kibana is an open source analytics and visualization platform designed to work with Elasticsearch ● Use Kibana to search, view, and interact with data stored in Elasticsearch indices. ● Easily perform advanced data analysis and visualize your data in a variety of charts, tables, and maps. ● Easy to understand large volumes of data. Its simple, browser-based interface enables you to quickly create and share dynamic dashboards that display changes to Elasticsearch queries in real time.
  • 25. Features ● Seamless Integration with Elasticsearch Architected to work with Elasticsearch, Kibana gives shape to any kind of data — structured and unstructured — indexed into Elasticsearch. It also benefits from Elasticsearch's powerful search and analytics capabilities. ● Give shape to your data To better understand large volumes of data, easily create bar charts, line and scatter plots, histograms, pie charts, and maps. ● Sophisticated Analytics Leverage the power of Elasticsearch analytics capabilities to analyze your data intelligently, perform mathematical transformations, and slice and dice your data as you see fit. ● Flexible Interface, Easy to Share Easily create, save, share, and embed your visualized data for quick and smart communication.
  • 26. Features ● Easy Setup Simple and friendly setup and startup. Kibana 4 ships with its own web server to help you get up and running quickly. ● Visualize Data from Many Sources Easily visualize data pushed into Elasticsearch from Logstash, ES-Hadoop, Beats, or third- party technologies like Apache Flume, Fluentd, and many others. ● Simple Data Export Easily export interesting bits of data to merge and meld with other data sets to quickly prototype new analyses and discover something new.
  • 27. Installations To get Kibana up and running: 1. Download the Kibana 4 binary package for your platform. 2. Extract the .zip or tar.gz archive file. 3. Run Kibana from the install directory: bin/kibana (Linux/MacOSX) or binkibana.bat (Windows).
  • 28. Using Kibana with Shield ● Kibana users have to authenticate when your cluster has Shield installed. ● Need to configure credentials for the Kibana server to authenticate requests coming from Kibana webserver. To use Kibana with Shield: 1. Configure credentials for the Kibana server. Create a user account for the Kibana server and assign it the kibana4_server role esusers useradd kibana4-server -r kibana4_server -p password
  • 29. Using Kibana with Shield 2. Specify the credentials for your Kibana server user in the Kibana configuration file, /config/kibana.yml. elasticsearch.username: "kibana4-server" elasticsearch.password: "password"
  • 30. Using Kibana with Shield 3. Derive Kibana user roles kibana_user: cluster: - monitor indices: - names: 'customer' privileges: - view_index_metadata - read - names: '.kibana' privileges: - manage - read
  • 31. Using Kibana with Shield 4. Assign the appropriate roles to your Kibana users or groups of users POST /_shield/user/alice { "password" : "t0pS3cr3", "roles" : [ "kibana_user" ] }
  • 32. Using Kibana with Shield 5. Install the Shield plugin into Kibana. The Shield plugin secures user sessions and enables users to log in and out of Kibana. 6. Configure Kibana to encrypt communications between the browser and the Kibana server. bin/kibana plugin --install kibana/shield/2.3.3 server.ssl.key: /path/to/your/server.key server.ssl.cert: /path/to/your/server.crt shield.encryptionKey: "something_secret"
  • 33. Kibana Dynamic Mapping ● Kibana needs dynamic mapping to use fields in visualizations correctly, as well as to manage the .kibana index where saved searches, visualizations, and dashboards are stored. Create the .kibana index with dynamic mapping enabled just for that index: PUT .kibana { "index.mapper.dynamic": true }
  • 34. References ● https://www.elastic.co/products/kibana ● https://www.elastic.co/products/shield ● http://blog.trifork.com/2015/03/05/shield-your-kibana-dashboards/ ● https://www.timroes.de/2015/02/07/kibana-4-tutorial-part-2-discover/ ● https://www.timroes.de/2015/02/07/kibana-4-tutorial-part-3-visualize/ ● https://www.timroes.de/2015/02/07/kibana-4-tutorial-part-4-dashboard/

Editor's Notes

  • #5: Alternatives: Search Guard - Free (and open source) plugin from floragunn UG https://github.com/salyh/elasticsearch-security-plugin https://github.com/sonian/elasticsearch-jetty https://github.com/codelibs/elasticsearch-auth
  • #6: IP-based authorization. You can whitelist and blacklist specific IP addresses or subnets to control network-level access to a server. Shield preserves the integrity of your data by encrypting communications to and from nodes and authenticating messages to verify that they have not been tampered with or corrupted in transit during node-to-node communication.
  • #9: A secure Elasticsearch cluster manages the privileges of users through roles. A role has a unique name and identifies a set of permissions that translate to privileges on resources. A user can have an arbitrary number of roles. There are two types of permissions: cluster and index.
  • #10: A realm is a user database configured for the use of the Shield plugin. In the native realm, users are stored and distributed with the Elasticsearch cluster. With the native realm, the administrator manages users with the API for user management. In the file realm, users exist in files stored on each node of the Elasticsearch cluster.
  • #11: The file realmis now functions as fallback/recovery realm. For example, if all users lock themselves out of the system (no one remembers their username and password), you can define an admin user in the file realm and use those credentials to restore access..
  • #13: If you are updating a user, you can omit the password field unless you want to change the user’s password. You must specify the user’s roles. Omitting the optional full_name, email, or metadata fields sets those values to null.
  • #15: In the role definition, you specify the cluster privileges and indices privileges the role grants. Optionally, you can also configure field and document level security and assign run_as privileges.
  • #16: All cluster operations, like snapshotting, node shutdown/restart, settings update, rerouting, or managing security All cluster read-ony operations, like cluster health &amp; state, hot threads, node info, node &amp; cluster stats, snapshot/restore status, pending cluster tasks Builds on monitor and adds cluster operations that change values in the cluster. This includes snapshotting, updating settings, and rerouting. This privilege does not include the ability to manage security. All security related operations such as CRUD operations on users and roles and cache clearing All operations on index templates All privileges necessary for a transport client to connect
  • #17: Any action on an index All monitor privileges plus index administration (aliases, analyze, cache clear, close, delete, exists, flush, mapping, open, force merge, refresh, settings, search shards, templates, validate, warmers) All actions, that are required for monitoring and read-only (recovery, segments info, index stats &amp; status) Read only access to actions (count, explain, get, mget, get indexed scripts, more like this, multi percolate/search/termvector), percolate, scroll, clear_scroll, search, suggest, tv)
  • #18: Regular Expressions - to match more complex patterns you can enable regular expressions by wrapping the pattern within a pair of forward slashes (/). Regular expressions are based on Lucene’s regexp automaton syntax. Any pattern starting with / and not ending with / is considered to be malformed.
  • #19: Important Document and field level security is currently meant to operate with read-only privileged accounts. Users with document and field level security enabled for an index should not perform write operations.
  • #20: If the role is successfully deleted, the request returns {&amp;quot;found&amp;quot;: true}. Otherwise, found is set to false.
  • #23: You can also store the events in an Elasticsearch index for easier analysis and control what events are logged. For more information, see Configuring Auditing. shield.audit.outputs: [index, logfile] Note Audit events are batched for indexing so there is a lag before events appear in the index. You can control how frequently batches of events are pushed to the index by setting shield.audit.index.flush_interval in elasticsearch.yml.
  • #29: The Kibana server needs access to the cluster monitoring APIs and the .kibana index. The server does not need access to user indexes. The required privileges are specified in the kibana4_server role provided in the default Shield roles.yml
  • #30: Kibana users need access to the indices that they will be working with and the .kibana index where their saved searches, visualizations, and dashboards are stored. Users also need access to the kibana-devnull index
  • #31: the following kibana_user role only allows users to discover and visualize data in the customer indices.
  • #32: Kibana users need access to the indices that they will be working with and the .kibana index where their saved searches, visualizations, and dashboards are stored. Users also need access to the kibana-devnull index
  • #33: Once you enable SSL encryption between the browser and the Kibana server, access Kibana via HTTPS. For example, https://localhost:5601. Set the shield.encryptionKey property in the kibana.yml configuration file. You can use any text string as the encryption key.