0

I've a web app that needs to use ElasticSearch but my host does not permit to use Java apps.

It is possible to put the ElasticSearch server on other machine(Remote) so that the webapp makes the queries to a remote server? If yes, ElasticSearch have some way to secure the data in the ElasticSearch server? How can I protect other users to make queries to this remote ElasticSearch server?

Best Regards,

javanna
  • 59,145
  • 14
  • 144
  • 125
André
  • 24,706
  • 43
  • 121
  • 178
  • There are a number of hosted solutions: http://www.bonsai.io/, http://qbox.io/, http://www.found.no/, http://www.searchly.com/. Otherwise, you can certainly host your own ES cluster in any server environment (AWS or a VPS like Linode, DigitalOcean, etc.), but it is your responsibility to secure it. You could simply firewall incoming/outgoing connections, but that might be limiting for you. Read http://stackoverflow.com/questions/4960298/how-to-secure-an-internet-facing-elastic-search-implementation-in-a-shared-hosti for great suggestions. – James Addison Sep 16 '13 at 16:42

1 Answers1

0

Yes. If you don't have the option to move your application to another server that permits Java, you can access the remote server using JSON calls or a client if available for your platform (http://www.elasticsearch.org/guide/en/elasticsearch/client/community/current/clients.html).

To make things secure, you can install the jetty plugin (https://github.com/sonian/elasticsearch-jetty), configure SSL, authentication and maybe add a IP restriction like creating a jetty-iprestriction.xml with the content bellow and adding a reference to it in elasticsearch.yml.

<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">

<Configure id="ESServer" class="org.eclipse.jetty.server.Server">


<Set name="handler">
  <New id="Handlers" class="org.eclipse.jetty.server.handler.HandlerCollection">
    <Set name="handlers">
     <Array type="org.eclipse.jetty.server.Handler">
   <Item>

     <New class="org.eclipse.jetty.server.handler.IPAccessHandler">
       <Call name="addWhite">
         <!-- allowed server ip -->
         <Arg>xxx.xxx.xxx.xxx</Arg>
       </Call>
      <Set name="handler">
       <New class="com.sonian.elasticsearch.http.jetty.handler.JettyHttpServerTransportHandler"
             id="HttpServerAdapterHandler">
            <Set name="transport"><Ref id="ESServerTransport"/></Set>
        </New>
       </Set>
     </New>

   </Item>
       <Item>
         <New id="DefaultHandler" class="org.eclipse.jetty.server.handler.DefaultHandler"/>
       </Item>
       <Item>
         <New id="RequestLog" class="org.eclipse.jetty.server.handler.RequestLogHandler"/>
       </Item>
     </Array>
    </Set>
  </New>
</Set>

</Configure>
Oswaldo
  • 513
  • 5
  • 13