2

Does Spring Data Elastic Search template support username and password? What are the options to if we need to use spring data to connect to elastic search that is protected with Shield.

Current configuration

<elasticsearch:transport-client id="client" cluster-nodes="${elasticsearch.cluster.host}:${elasticsearch.cluster.port}"
 cluster-name="${elasticsearch.cluster.name}" />

<bean name="elasticsearchTemplate" class="org.springframework.data.elasticsearch.core.ElasticsearchTemplate">
    <constructor-arg name="client" ref="client"/>
</bean>
  • 1
    I have the same problem as you. The only usefull documentation I found so far is: https://www.elastic.co/guide/en/elasticsearch/client/php-api/current/_security.html But this is for PHP... If you figure it out can you please give me a heads up? – Glenn Van Schil Nov 10 '15 at 11:05
  • Were you able to find any solution to this problem ? – lives Apr 26 '17 at 06:03
  • We didn't use Shield. We dropped that idea instead installed ES on EC2 instance and used it – Tapan Gupta Apr 28 '17 at 14:51

1 Answers1

0

I don't think this is currently being supported, but there is an open pull request for this feature: https://github.com/spring-projects/spring-data-elasticsearch/pull/152

xeraa
  • 10,456
  • 3
  • 33
  • 66