Solr:文档和文档子文档级安全性

发布于 2024-12-29 17:49:00 字数 321 浏览 2 评论 0原文

我有一个非常了解的 Solr 问题。该索引包含一组员工记录文档,其中包含一组公共访问字段和一组安全字段。根据用户的安全凭证(可以在文档中作为一个字段进行索引),如果文档匹配,则显示其所有公共字段以及他有权访问的一些安全字段。此安全字段列表会因同一索引中的文档而异。示例:一个部门(属于一个公司)的经理可以查看他手下的员工(文档)的所有安全字段,但不能查看不在他手下工作的人员(无论是否在同一家公司)。但他仍然可以看到所有员工的所有公共字段(匹配和过滤的文档)。

因此,作为经理,我可以看到在我手下工作的每个人的所有(公共+安全)字段,但我的助理只能看到他手下的一些安全字段。如何在 Solr 中实现这一点。谢谢。

I have a rather very know Solr issue. The index contain a group of docs of employee records that has a set of public access fields and a set of secure fields. Based on the user's security credentials (which may be indexed in the doc as one field), if a document matched, all its public fields and some of the secured fields which he has access. This list of secure fields varies document to document in the same index. Example: a manage of a department (belonging to one company) can view all secure fields of employees (doc) under him but not for those who do not work under him (whether in the same company or not). But he can still see ALL the public fields of ALL the of the employees (matched and filtered docs).

So being manager, I can see all (public + secure) fields of every one working under me but my asst can see only some of the secure fields who are under him. How to implement this in Solr. Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

祁梦 2025-01-05 17:49:00

文档指出 Solr 不关心文档级别的安全性。

Solr 被设计为数据的索引,而不是数据库的替代品(访问控制是一项重要的数据库功能,只会增加索引的复杂性)

我的建议:

  1. 从索引中删除所有敏感数据 。每个 Solr 文档都可以包含对保存需要访问控制的敏感数据的第三方系统/数据库的引用(或链接)。
  2. 加密索引中的敏感内容 使用公钥/私钥加密,您可以控制谁能够解密 Solr 文档的敏感字段。 (此解决方案的扩展性不太好,也不允许搜索加密字段)
  3. 为每个管理员创建敏感搜索索引:使用 Web 服务器的身份验证机制来控制对索引和加载的访问那里有敏感数据。

The documentation states that Solr does not concern itself with security at the document level.

Solr is designed to be an index of your data, not a replacement for your database (Access control is an important DB feature, only adds complexity to an index)

My suggestions:

  1. Remove all sensitive data from the index. Each Solr document could include a reference (or link) to a 3rd party system/database holding the sensitive data requiring access control.
  2. Encrypt the sensitive content within the index Using public/private key encryption, you can control who is able to decrypt the sensitive fields of a Solr document. (This solution wouldn't scale very well, nor does it allow searching of encrypted fields)
  3. Create a sensitive search index, for each manager: Use the web server's authentication mechanism to control access to the index and load sensitive data there.
对不⑦ 2025-01-05 17:49:00

我建议采取以下步骤:

  1. 将公共内容和安全内容分开,可以使用两个独立的核心。
  2. 添加位于 User 和 SOLR webapp 之间的 ServletFilter,然后您可以在 SOLR 结果之上使用一些基于 ACL 的基本安全性来根据您的应用程序要求过滤掉内容。

I would suggest to take the following steps:

  1. separate out the public and secure content, you can use two separate cores.
  2. add a ServletFilter that sits between User and SOLR webapp and then you can use some basic ACL based security on top of SOLR results to filter out the content as per your application requirements.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文