easy way to make an elasticsearch server read-only

前端 未结 7 2039
日久生厌
日久生厌 2021-02-02 13:03

It\'s really easy to just upload a bunch of json data to an elasticsearch server to have a basic query api, with lots of options

I\'d just like to know if there\'s and e

7条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-02 13:18

    You can set a readonly flag on your index, this does limit some operations though, so you will need to see if thats acceptable.

    curl -XPUT http://:9200//_settings -d'
    {
        "index":{
            "blocks":{
                "read_only":true
            }
        }
    }'
    

    As mentioned in one of the other answers, really you should have ES running in a trusted environment, where you can control access to it.

    More information on index settings here : http://www.elasticsearch.org/guide/reference/api/admin-indices-update-settings/

提交回复
热议问题