How can I authorize user while using command line?

Hi. I use Search Guard 5 with Elasticsearch and Kibana and I have a problem with curl commands.

I have a system user “es_user” which is elasticsearch admin. I want to run curl commands in command line like:
curl -XGET ‘localhost:9200/_cat/indices?v&pretty’
to
show all indices. I added “es_user” to internal SG database, but when I
run curl commands in command line I see that user is “Unauthorized”.
How can I give acces to Elasticsearch via command line? I cannot list, create, open, close etc. indices, because of that.


You need to “tell” curl to use basic authentication:

curl --user es_user:es_user_password …

``

You are right. Thank you very much!

W dniu poniedziałek, 27 marca 2017 09:43:27 UTC+2 użytkownik Fabien Wernli napisał:

···

You need to “tell” curl to use basic authentication:

curl --user es_user:es_user_password …

``