Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
gradle/wrapper Add gradle wrapper Feb 21, 2018
src Update to 6.2.2 Feb 21, 2018
LICENSE.txt add LICENSE.txt and NOTICE.txt Oct 20, 2015
NOTICE.txt add LICENSE.txt and NOTICE.txt Oct 20, 2015
README.textile Add reference to blog post on custom realms (#34) Jul 12, 2018
build.gradle Update to 6.2.2 Feb 21, 2018
gradlew Add gradle wrapper Feb 21, 2018
gradlew.bat Add gradle wrapper Feb 21, 2018
settings.gradle updates for elasticsearch and x-pack 5.0.0 beta1 Sep 22, 2016


Custom Realm Extension for X-Pack

Open X-Pack

We have opened X-Pack which gives you access to the source code for the X-Pack SecurityExtension feature, and also our test cases for that.

Those test cases are maintained on an ongoing basis, and will always match the latest state of the X-Pack code. As such, we are no longer maintaining this sample realm repository. If you wish to see an example realm, you can see a working, maintained example in the Elasticsearch repository

The blog post How to Develop Your Own Security Extensions and Custom Realms for Elasticsearch also provides an example for implementing a custom realm in Elasticsearch 6.3 or above, with commentary to assist.

Elasticsearch Versions and Branches

The “master” branch of the Elasticsearch git repository tracks the most recent deveopment, including unreleased features and changes. The security extension example from master is unlikely to work on any released version of Elasticsearch.

It is important that you browse to the correct version/branch for the version of Elasticsearch that you are running.

Older versions of Elasticsearch

This repository contains versions of the custom realm extension that work with Elasticsearch releases from as far back as 2.0

Branch Elasticsearch Version
6.2 6.2.x
6.0 6.0.x
5.6 5.6.x
5.5 5.5.x
5.4 5.4.x
5.3 5.3.x
5.2 5.2.x
5.1 5.1.x
5.0 5.0.x
2.4 2.4.x
2.3 2.3.x
2.2 2.2.x
2.1 2.1.x
2.0 2.0.x

Creating an X-Pack Extension

For versions prior to 6.3 please follow the instructions in the README.textile file on the correct branch of this repository (see table above).

For versions 6.3.0 and later, Security Extensions have changed and can be loaded using standard Elasticsearch plugin mechanisms.
Please read Elasticsearch’s plugin author instructions
In order to registry your SecurityExtension with X-Pack, it must be included in the resources/META-INF/services/ file of your main jar file, as per the example project


If you have questions about custom realms, please join us in our discussion forums where we will be able to help you.

You can’t perform that action at this time.