Coder Social home page Coder Social logo

elasticsearch-httpclient's Introduction

HTTP Client call example

This project is a demo project which reproduces a Security Manager issue when we run the plugin in the context of Elasticsearch as a plugin.

It uses Elasticsearch 6.0.0.

To reproduce:

mvn clean install
  • Install elasticsearch 6.0.0
  • Remove the existing plugin and install the new one:
bin/elasticsearch-plugin remove httpclient
bin/elasticsearch-plugin install file:///path/to/elasticsearch-httpclient/target/releases/httpclient-1.0-SNAPSHOT.zip
  • Start elasticsearch:
bin/elasticsearch
  • Call the REST Endpoint
curl 127.0.0.1:9200?pretty
curl 127.0.0.1:9200/_bano?pretty

You should see:

{
  "name" : "a5UNyZ-",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "Tic8yyC2Q6Gw2AMUAAXwXw",
  "version" : {
    "number" : "6.0.0",
    "build_hash" : "8f0685b",
    "build_date" : "2017-11-10T18:41:22.859Z",
    "build_snapshot" : false,
    "lucene_version" : "7.0.1",
    "minimum_wire_compatibility_version" : "5.6.0",
    "minimum_index_compatibility_version" : "5.0.0"
  },
  "tagline" : "You Know, for Search"
}
{
  "error" : {
    "root_cause" : [
      {
        "type" : "access_control_exception",
        "reason" : "access denied (\"java.net.SocketPermission\" \"127.0.0.1:9200\" \"connect,resolve\")"
      }
    ],
    "type" : "access_control_exception",
    "reason" : "access denied (\"java.net.SocketPermission\" \"127.0.0.1:9200\" \"connect,resolve\")"
  },
  "status" : 500
}

elasticsearch-httpclient's People

Contributors

dadoonet avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.