Is It Possible To Use HTTP Basic Auth To Connect To Nginx Proxied Elasticsearch With Jest?
I am sending requests to Elasticsearch over HTTP from a Java client using Jest. Since my requests must traverse the public Internet, I am using an Nginx proxy in front of Elasticsearch to provide SSL and HTTP Basic Auth. However, I don't see a way to set HTTP Basic Auth credentials with Jest.
Is it possible to use HTTP Basic Auth with Jest? If so how?
HTTP basic auth can be sent as a header.
String authHeader = "Basic " + new String(Base64.encodeBase64(String.format("%s:%s", username, password).getBytes())); Index index = new Index.Builder(json) .index(indexName) .type(type) .id(id) .setHeader("Authorization", authHeader) .build(); JestResult result = client.execute(index);
- → Laravel 5 - Elasticquent / ElasticSearch Missing404Exception with (Re)Mapping
- → Elasticsearch aggregate function error on laravel
- → Access ES aggregation bucket list objects in laravel
- → Creating indexes for Elasticquent in Laravel
- → searchByQuery function returns only 10 rows
- → Advanced elasticsearch query
- → Setting size parameter ES laravel
- → Order by in aggregation ES laravel
- → How to pass search query to elasticsearch from laravel controller?
- → pagination in elasticsearch laravel
- → elasticsearch query by array of id result returned is not sorted by the array of id pass in
- → Elasticsearch query for simple category search, sorting by price and getting records by range
- → Select a document by id on Mongo or Elasticsearch?