What you will learn in this TP
- Create and delete a user
- Create and delete a role
- Apply least privilege
All steps and instructions are shown. Recommended for this lab: semi-guided
Prerequisites #
Context. Each person and application must have only the rights it needs. You manage users and roles through the API.
Prerequisites: an Elasticsearch cluster and Kibana (lab "Installing Elasticsearch"), Dev Tools · Estimated time: 30 min
You need an Elasticsearch cluster with a Kibana instance connected to it. If that is not yet the case, we invite you to complete the lab on installing Elasticsearch.User management #
What is the procedure?
How do you create an Elasticsearch user?
Create a user
Create a user via the API matching the image below:
The user's password will be 'Imp055ible@deviner'Delete a user
Delete the 'remote_monitoring_user' user
Role management #
What is the procedure?
How do you create an Elasticsearch role?
Create a role
Create a role via the API with these characteristics:- Name: mon premier role
- Cluster privileges: none
- Run as: none
- Index privileges:
- mon-premier-index: write
- The others: read
- Spaces: set the same ones as on the 'Mon premier espace' space
WARNING: Only the privileges set in roles actually provide security. Those set in spaces only hide things.
Delete a role
Delete the 'editor' role
Validate your work
Check that each goal above is reached and that you get the result described in the introduction.
Difficulty level : ●●●○○ (3/5)
My progress
Sign in to track your progress and take notes. Sign in
💬 Recent discussions about this course
- Elasticsearch : supprimer automatiquement les logs de plus de 30 jours✓ solved · 1 reply(ies)
Ask a question about this lesson →See all discussions about this course
Course Glossary
RBAC (Role-Based Access Control)
An access control method where permissions are assigned to specific roles (e.g., admin, reader) rather than directly to individual users.
Authentication
The process of verifying the identity of a user or system (e.g., login/password, tokens, biometrics).
Authorization
The process that occurs after authentication to determine if the entity has the necessary rights and privileges to access a resource.
API Key
A unique alphanumeric code used to identify, authenticate, and authorize access to an Application Programming Interface (API).
Architecture
The overall structural design of an IT system, defining its various components, their relationships, and the principles guiding its evolution.
Repository
A centralized storage location. This can refer to a source code repository (e.g., Git) or an artifact and binary repository (e.g., Harbor, Nexus, Arti...
Elasticsearch
A distributed, RESTful search and analytics engine capable of addressing a growing number of use cases, built on Apache Lucene.
Recommended Articles
Advanced Elasticsearch security: TLS, certificates, API keys, FLS, DLS and audit
Secure Elasticsearch in depth: transport and HTTP TLS, certificate management with elasticsearch-...
Administering Kibana: spaces, roles, users and monitoring
Organize Kibana for several teams: spaces, roles and privileges on indices and features, users an...
Elasticsearch distributed architecture: node roles, shards, replicas and allocation
Understand how Elasticsearch works as a distributed system: node roles, master nodes and quorum, ...
Automation and infrastructure as code for Elasticsearch: API, Terraform, Ansible and CI/CD
Automate Elasticsearch administration: REST API and clients, the elasticstack Terraform provider ...
Elasticsearch ingestion: Bulk API, ingest pipelines, enrich and reindex
Ingest and transform data in Elasticsearch: Bulk API, ingest pipelines and processors (grok, diss...
Elasticsearch monitoring and troubleshooting: health, unassigned shards, JVM, hot threads and slow logs
Diagnose an Elasticsearch cluster: cluster health and CAT APIs, unassigned shards and allocation ...
Understanding the Elastic Common Schema (ECS)
As always in our consulting engagements, we recommend that companies harmonise and standardise: k...
Elasticsearch best practices: mappings, shards, lifecycle and operations
Elasticsearch best practices: shard sizing, explicit mappings, templates, ILM, JVM memory, securi...
Advanced OpenSearch security: authentication, roles and audit
Securing OpenSearch in depth: transport and API TLS, internal, LDAP, OpenID Connect and SAML auth...