elasticsearch-authn

Authenticate to Elasticsearch clusters using native users, API keys, LDAP, SAML, OIDC, JWT, PKI, and Kerberos.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill simplifies the process of authenticating to Elasticsearch clusters using various methods, ensuring secure and appropriate access for different use cases.

Core Features & Use Cases

  • Multiple Authentication Methods: Supports native users, API keys, LDAP, SAML, OIDC, JWT, PKI, and Kerberos.
  • API Key Management: Enables creation, retrieval, and invalidation of API keys with scoped privileges.
  • Use Case: You need to connect an application to Elasticsearch using an API key with read-only access to specific indices. This Skill can generate and configure such a key.

Quick Start

Authenticate to Elasticsearch using the environment variables for username and password.

Frequently Asked Questions about elasticsearch-authn

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

FAQPage Schema
How do I authenticate to Elasticsearch using an API key?

Elasticsearch authentication via API keys is supported by creating, retrieving, and invalidating keys with scoped privileges. You can configure read-only access to specific indices for secure programmatic workflows.

What authentication methods are available for connecting to Elasticsearch clusters?

Elasticsearch clusters support multiple authentication realms including native users, API keys, LDAP, SAML, OIDC, JWT, PKI, and Kerberos. This ensures secure and appropriate access for different use cases.

Can I use Elasticsearch API keys to scope permissions for automated workflows?

Yes, Elasticsearch API key management enables the creation of keys with scoped privileges. This facilitates secure programmatic access for automated workflows by restricting permissions to specific indices or actions.

Do I need network access and environment variables to configure Elasticsearch authentication?

Yes, configuring Elasticsearch authentication requires network access to the endpoint and appropriate credentials configured via environment variables. This setup ensures secure connectivity to the cluster.

How does SAML or OIDC authentication work with Elasticsearch?

SAML and OIDC are external realms supported for Elasticsearch authentication. They facilitate secure access by delegating identity verification to external providers, integrating with existing enterprise identity systems.