fullscale180 / slab-sinks

Semantic Logging Application Block Sinks
Apache License 2.0
13 stars 9 forks source link

Added logic to handle Basic auth of Elasticsearch #13

Closed MedAnd closed 8 years ago

MedAnd commented 8 years ago

I needed support for logging to secured Elasticsearch clusters. I added logic to handle Basic auth of Elasticsearch with the connection format as per Nest library: http://user:password@localhost:9200

Cheers, AndMed

MedAnd commented 8 years ago

Fix to set Auth on header only once as the client object is reused. Please ignore the previous change.

trentmswanson commented 8 years ago

@MedAnd did you try using the format http://user:password@domain when configuring the sink?

MedAnd commented 8 years ago

@trentmswanson Testing against Elasticsearch 2.1 and using http://user:password@domain did not work out of the box. I found I had to add user:password as a header which seems to have done the trick.