0

I have the below configuration for spring data elastic search.

<elasticsearch:transport-client id="client" cluster-name="elasticsearch" 
    cluster-nodes="localhost:9300" />


<bean name="elasticsearchTemplate"
    class="org.springframework.data.elasticsearch.core.ElasticsearchTemplate">
    <constructor-arg name="client" ref="client" />
</bean>

I am planning to secure the elastic search data using Shield.

In that case, how do we change the above configuration to pass the username and password?

Vijay
  • 4,694
  • 1
  • 30
  • 38
lives
  • 1,243
  • 5
  • 25
  • 61

1 Answers1

0

I think this is currently not supported, but there is an open pull request: https://github.com/spring-projects/spring-data-elasticsearch/pull/152

Also similar to Spring Data Elastic Search with Shield

xeraa
  • 10,456
  • 3
  • 33
  • 66
  • Thanks . But Shield needs commercial license right ? – lives May 01 '17 at 09:59
  • Yes, there is a trial license, but after that you'll need a commercial license. Alternatively you can use an HTTP reverse proxy (nginx,...) or use https://cloud.elastic.co where X-Pack is included. – xeraa May 01 '17 at 12:24