debadair / shield-custom-realm-example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Example of Custom Realm Plugin for Elasticsearch Shield

Introduction

This plugin contains an example custom realm for Shield.

Please make sure to use the correct branch of this repository that corresponds to the version of elasticsearch that you are developing the plugin for.

Example Plugin Branch Elasticsearch
master 3.0.0 and above
2.x 2.1.x
2.0 2.0.x

Creating Elasticsearch Plugin

A custom realm must be packaged using a standard Elasticsearch plugin. An Elasticsearch plugin can be written in java and built using maven. More information can be found in the Elasticsearch documentation.

In most cases, taking this project and modifying the structure should allow you get to quickly start developing your own custom realm for Elasticsearch Shield.

Building and Testing the Plugin

Checkout the branch that matches the latest officially released version of Shield and run mvn clean verify. This will compile the plugin, run unit tests, package the plugin, download elasticsearch and install the created plugin, and run tests against a cluster running this plugin.

Integration Points with Shield

This plugin shows an example and documents the two integrations points with Shield. These are the ability to define one or more custom realms and the ability to define a single custom authentication failure handler to control the challenges sent to the user as part of the authentication process. These classes have lots of code comments documenting their functionality.

About


Languages

Language:Java 100.0%