Hi could anyone suggest me a good elastic client for elixir? I came across elastix (https://github.com/werbitzky/elastix) and tirexs(https://github.com/Zatvobor/tirexs). But they do not seem to show any examples on authentication part of the API… Would be grateful if someone suggests me the how to achieve this.
Thanks in advance…
Hey, have you given a look at elistix? Super simple and no new DSL to learn!
I’ve used elastix and have good luck with it. It’s pretty small and simple. The official elasticsearch documentation is great.
Thank you paulsullivanjr. Yes I tried… but it does not seem to give any example on how to use credentials and configs to mention certificates… Not sure how to do that…
Thanks for the reply pablofullana… I have not tried it… but how do I set basic auth credentials and make it work with ssl?
Check the links out that may be helpful. I haven’t done this yet and don’t know what the license looks like but these links may provide some help. Hope it helps.
https://www.elastic.co/products/x-pack/security
http://blog.raffaeu.com/archive/2016/02/17/enable-authentication-in-elasticsearch.aspx
It looks like elastix
supports the Shield authentication parameters - you’d just need to set the appropriate options under :elastix
in your config.exs
: https://github.com/werbitzky/elastix/blob/master/lib/elastix/http.ex#L62
I can confirm that tirexs can handle authentication against ES. Either embed the username password in the URI string param (http://user:password@hostname:port/path
) or in the %URI{}
object set userinfo: "user:password"
. For runtime configurability, do it via conform
On the ES side you need to install x-pack and configure accordingly. Reasonably easy to automate locking down the pre-seeded users and create your own using curl from bash/puppet/ansible.
x-pack requires a license, but will work for free for 30 days. It’s more than enough for dev&test.