gpt4 book ai didi

elasticsearch - ElasticSearch-使用 “not modificable”文档的可审核解决方案?

转载 作者:行者123 更新时间:2023-12-03 01:55:20 25 4
gpt4 key购买 nike

从这里开始:
https://discuss.elastic.co/t/write-only-cluster-index-auditing-porpouse/49494

我正在寻找一种方法来保证写入ES群集的文档不能更改(或至少具有原始内容的备份)-审核要求。

目前,我可以安全地保护快照,以至于我什至无法修改/删除快照。但是从上次快照到现在的时间呢?

您是否知道一种保护ES快照的方法,以使其成为“只写”群集:)?

可能的解决方案?:
禁止使用URI:XDELETE,* / _ update,但是_version编号更改的“整个文档更新”呢?

最佳答案

实现此目的的一种方法是使用官方的Shield产品,并在要冻结的索引上定义read-only privileges。在下面,角色readonly仅具有对所有索引的读取权限,而full具有完全访问权限:

readonly:
indices:
- names: '*'
privileges:
- read
writer:
indices:
- names: '*'
privileges:
- read
- write

更新: write特权允许用户创建,更新和删除文档。有一个称为 create 的更细粒度的特权,该特权仅允许创建/索引新文档,而不能更新或删除它们。

另一种方法是使用 read-only REST plugin和出色的 @sscarduzio,其配置如下:
readonly:
enable: true
response_if_req_forbidden: Sorry, your request is forbidden.
access_control_rules:

- name: Read-only audit indices
type: allow
actions: [cluster:*, indices:data/read/*]
indices: ["*"]

writer:
enable: true
response_if_req_forbidden: Sorry, your request is forbidden.
access_control_rules:

- name: Indexer process
type: allow
actions: [cluster:*, indices:data/write/*]
indices: ["*"]

这种方法的主要优点是,您仍然可以定义另一个角色(例如 writer),该角色将能够贡献/索引新文档,同时仍然允许其他角色(例如 readonly)为只读。

关于elasticsearch - ElasticSearch-使用 “not modificable”文档的可审核解决方案?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37126481/

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