Skip to content

tommyktech/elasticsearch_http_user_auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Elasticsearch (<= 2.4) HTTP Basic User Auth plugin (and its web console)

Elasticsearch user authentication plugin with http basic auth. This plugin provides user authentication APIs and its web console.

Installation

bin/plugin --url https://raw.githubusercontent.com/TomSearch/elasticsearch-http-user-auth/master/jar/http-user-auth-plugin-1.0-SNAPSHOT.jar --install http-user-auth-plugin

Configuration

Add following lines to elasticsearch.yml:

http.user.auth.disabled: false
http.user.auth.root.password: rootpassword

If you set http.user.auth.disabled to true, your Elasticsearch instance won't load this plugin.
http.user.auth.root.password is a setting for root user's password literally.
Only the root user can access Elasticsearch root APIs (like /_cat, /_cluster) and all indices.
Other users can only access their own indices that are specified by an API of this plugin.

Append username and password to HTTP requests

The authentication method of this plugin is Basic Authentication. Therefore, you should add your username and password to URL strings.

For example, you can call "You know, for search" API like this: http://root:[email protected]:9200/

If you're using some other plugins which use Elasticsearch APIs, you may have to set your root password in their configurations.

For example, configs of Marvel and Kibana 4 shold be as below:

Marvel

elasticsearch.yml:

marvel.agent.exporter.es.hosts: ["root:[email protected]:9200"]

Kibana 4

kibana.yml:

elasticsearch_url: "http://root:rootpassword@localhost:9200"

User Management Console

This plugin provides a web console managing users and their own indices.

http://your.elasticsearch.hostname:9200/_plugin/http-user-auth-plugin/index.html

About

HTTP Basic Authentication plugin for Elasticsearch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published