创建一个不能删除 influxdb 中数据的用户?

Create a user who can't delete data in influxdb?

是否可以创建一个不能删除 influxdb 中数据的非管理员用户?

我想创建一个可以 read/write (query/insert) 数据但不能删除已经插入的数据的用户。

根据我在 official docs 中看到的情况,我认为我做不到。那是对的吗?还是有偷偷摸摸的解决方法?

Non-admin users

Non-admin users can have one of the following three privileges per database:
* READ
WRITE
ALL (both READ and WRITE access)

READ, WRITE, and ALL privileges are controlled per user per database. A new non-admin user has no access to any database until they are specifically granted privileges to a database by an admin user.

GRANT READ, WRITE or ALL database privileges to an existing user:

GRANT [READ,WRITE,ALL] ON <database_name> TO <username>

没有, 删除是一个 write 操作。 写入 权限允许您进行更改,可以是添加、覆盖或删除内容。即使删除受到某种限制,如果您可以插入数据,那么您始终可以覆盖现有数据,这允许您销毁任何实际数据,本质上是 "deleting" 它。

编辑:正如下面的评论所指出的,这适用于 influxdb 的社区版。事实上,企业版支持更细化的角色,并支持 OP 所要求的,即 DROP_DATA 角色。在这里阅读更多 https://docs.influxdata.com/chronograf/v1.7/administration/managing-influxdb-users/#dropdata and here https://docs.influxdata.com/enterprise_influxdb/v1.7/guides/fine-grained-authorization/