gpt4 book ai didi

solr - 以只读模式运行 Solr

转载 作者:行者123 更新时间:2023-12-04 14:19:40 26 4
gpt4 key购买 nike

我想我在这里遗漏了一些明显的东西。我不得不想象很多人向其他开发人员开放他们的 Solr 服务器并且不希望他们能够修改索引。

solrconfig.xml 中是否有可以设置为有效地使索引只读的东西?

更新澄清:
我的目标是将 Solr 与由另一个应用程序管理的现有 Lucene 索引一起使用。这工作得很好,但我想确保 Solr 永远不会尝试写入这个索引。

最佳答案

将 Solr 实例公开到公共(public)互联网是一个坏主意。即使您可以剥离一些组件以使其成为只读,但它的设计并未考虑到安全性,它旨在用作内部服务,就像您不会公开 RDBMS 一样。

来自 Solr Security wiki page :

First and foremost, Solr does not concern itself with security either at the document level or the communication level. It is strongly recommended that the application server containing Solr be firewalled such the only clients with access to Solr are your own. A default/example installation of Solr allows any client with access to it to add, update, and delete documents (and of course search/read too), including access to the Solr configuration and schema files and the administrative user interface.



ajax-solr ,用于在浏览器中运行的 JavaScript 的 Solr 客户端, recommends talking to Solr through a proxy .

guardian.co.uk 为例: 众所周知 they use Solr for searching ,但他们建立了 API让其他人访问他们的内容。这样他们可以 definecontrol他们希望人们搜索什么以及如何搜索。

否则,任何脚本小子都可以编写一个简单的循环来 DoS 您的 Solr 实例,从而导致您的网站瘫痪。

关于solr - 以只读模式运行 Solr,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3637014/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com