pelias / openstreetmap

Import pipeline for OSM in to Pelias
MIT License
112 stars 72 forks source link

Support elasticsearch username / password #545

Closed ghost closed 3 years ago

ghost commented 3 years ago

Hi,

I want to import osm data to an existing Elasticsearch protected by a username and password. However, I cannot find any option key to provide the credential.

Is it possible to import osm data to an authenticated Elasticsearch? If yes, how? If now, is it planned?

missinglink commented 3 years ago

I've been using elasticsearch for about 7 years and never heard of anyone using a username and password.

Can you provide a link to the elastic docs?

ghost commented 3 years ago

We manage many elasticsearch clusters and they are all protected by authentication.

The possible solutions for elasticsearch authentication are:

In my case, I would like to import osm data to an elaasticsearch as a service, provided by elastic: https://www.elastic.co/cloud/

orangejulius commented 3 years ago

Hi @bquartier,

You can configure a username and passsword in pelias.json, in the esclient property, which also supports any of the other configuration options of the (legacy) elasticsearch-js module: https://github.com/pelias/documentation/blob/master/pelias_from_scratch.md#where-on-the-network-to-find-elasticsearch

orangejulius commented 3 years ago

Oh boy, looks like Elastic has made it really hard to find the docs that we used to link to on that page.

Let me know if the following config options work for you: https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/16.x/_basic_auth.html

ghost commented 3 years ago

It works, thank you!

:)