elasticsearch-authz

Manage Elasticsearch RBAC users, roles, and role mappings via APIs.

546|44|Updated Mar 6, 2026
One-click install
npx skills add https://github.com/elastic/agent-skills --skill elasticsearch-authz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: elasticsearch-authz
Source: https://github.com/elastic/agent-skills/tree/main/skills/elasticsearch/elasticsearch-authz
Command: npx skills add https://github.com/elastic/agent-skills --skill elasticsearch-authz

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill simplifies the complex task of managing Elasticsearch Role-Based Access Control (RBAC), ensuring users have the correct permissions without over-provisioning access.

Core Features & Use Cases

  • User Management: Create, update, enable, disable, and delete native Elasticsearch users.
  • Role Management: Define granular roles with specific index, cluster, and Kibana feature privileges. Supports both Elasticsearch and Kibana APIs for role creation.
  • Role Mappings: Assign roles to users from external realms like LDAP and SAML based on defined rules.
  • Advanced Security: Implement Document-Level Security (DLS) and Field-Level Security (FLS) for fine-grained data access control, including attribute-based access control (ABAC) with templated queries.
  • Use Case: A security administrator needs to grant a new team read-only access to specific log indices and allow them to view dashboards in Kibana, while ensuring they cannot see sensitive PII fields. This Skill can automate the creation of the necessary role and user.

Quick Start

Use the elasticsearch-authz skill to create a new user named 'auditor' with read-only access to all indices.

Frequently Asked Questions about elasticsearch-authz

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up Elasticsearch role-based access control for native users?

Elasticsearch role-based access control for native users is managed by creating, updating, enabling, disabling, and deleting users via Elasticsearch and Kibana APIs. This Skill automates defining granular roles with specific index, cluster, and Kibana feature privileges.

How does document-level and field-level security work in Elasticsearch?

Document-level security (DLS) and field-level security (FLS) in Elasticsearch restrict data access at a granular level. This Skill implements DLS and FLS to ensure users can only view permitted documents and non-sensitive fields, supporting attribute-based access control (ABAC) through templated DLS queries.

Can I map Elasticsearch roles to external authentication realms like LDAP and SAML?

Yes, you can map Elasticsearch roles to external authentication realms like LDAP and SAML. This Skill manages role mappings by assigning roles to users from external realms based on defined rules, integrating external identity providers into your Elasticsearch security configuration.

Does this Elasticsearch RBAC management work with ECH and Serverless deployments?

Yes, this Elasticsearch RBAC management works with self-managed, ECH, and Serverless deployments. It supports creation, updates, and deletion of security entities across these environments using both Elasticsearch and Kibana APIs for comprehensive access control.

What is the best way to restrict a user from viewing sensitive PII fields in Kibana dashboards?

The best way to restrict viewing sensitive PII fields in Kibana dashboards is by applying field-level security (FLS). This Skill automates creating roles that grant read-only access to specific log indices while blocking sensitive fields for Kibana viewers.

When do I need attribute-based access control (ABAC) with templated DLS queries in Elasticsearch?

You need attribute-based access control (ABAC) with templated DLS queries in Elasticsearch when document access must dynamically depend on user attributes. This Skill enables ABAC by integrating templated DLS queries into role definitions for fine-grained, context-aware data filtering.