操作失败,并显示“security_exception:[security_exception]”原因:操作[indices:admin/create]未经用户授权

问题描述 投票:0回答:2

我正在尝试在Windows机器上安装elasticsearch和kibana。 启动弹性搜索后,弹性搜索工作正常。但如果我启动 kibana 服务器,它会显示以下错误:

[2022-07-08T17:21:28.195+05:30][INFO ][savedobjects-service] Starting saved objects migrations
[2022-07-08T17:21:28.231+05:30][INFO ][savedobjects-service] [.kibana] INIT -> CREATE_NEW_TARGET. took: 18ms.
[2022-07-08T17:21:28.235+05:30][INFO ][savedobjects-service] [.kibana_task_manager] INIT -> CREATE_NEW_TARGET. took: 20ms.
[2022-07-08T17:21:28.245+05:30][ERROR][savedobjects-service] [.kibana_task_manager] Action failed with 'security_exception: [security_exception] Reason: action [indices:admin/create] is unauthorized for user [kunal] with roles [monitoring,network,admins,demorole] on restricted indices [.kibana_task_manager_8.3.2_001], this action is granted by the index privileges [create_index,manage,all]'. Retrying attempt 1 in 2 seconds.
[2022-07-08T17:21:28.246+05:30][INFO ][savedobjects-service] [.kibana_task_manager] CREATE_NEW_TARGET -> CREATE_NEW_TARGET. took: 10ms.
[2022-07-08T17:21:28.248+05:30][ERROR][savedobjects-service] [.kibana] Action failed with 'security_exception: [security_exception] Reason: action [indices:admin/create] is unauthorized for user [kunal] with roles [monitoring,network,admins,demorole] on restricted indices [.kibana_8.3.2_001], this action is granted by the index privileges [create_index,manage,all]'. Retrying attempt 1 in 2 seconds.
[2022-07-08T17:21:28.248+05:30][INFO ][savedobjects-service] [.kibana] CREATE_NEW_TARGET -> CREATE_NEW_TARGET. took: 18ms.
[2022-07-08T17:21:30.276+05:30][ERROR][savedobjects-service] [.kibana_task_manager] Action failed with 'security_exception: [security_exception] Reason: action [indices:admin/create] is unauthorized for user [kunal] with roles [monitoring,network,admins,demorole] on restricted indices [.kibana_task_manager_8.3.2_001], this action is granted by the index privileges [create_index,manage,all]'. Retrying attempt 2 in 4 seconds.
[2022-07-08T17:21:30.277+05:30][INFO ][savedobjects-service] [.kibana_task_manager] CREATE_NEW_TARGET -> CREATE_NEW_TARGET. took: 2031ms.
[2022-07-08T17:21:30.284+05:30][ERROR][savedobjects-service] [.kibana] Action failed with 'security_exception: [security_exception] Reason: action [indices:admin/create] is unauthorized for user [kunal] with roles [monitoring,network,admins,demorole] on restricted indices [.kibana_8.3.2_001], this action is granted by the index privileges [create_index,manage,all]'. Retrying attempt 2 in 4 seconds.
[2022-07-08T17:21:30.285+05:30][INFO ][savedobjects-service] [.kibana] CREATE_NEW_TARGET -> CREATE_NEW_TARGET. took: 2036ms.
[2022-07-08T17:21:34.311+05:30][ERROR][savedobjects-service] [.kibana_task_manager] Action failed with 'security_exception: [security_exception] Reason: action [indices:admin/create] is unauthorized for user [kunal] with roles [monitoring,network,admins,demorole] on restricted indices [.kibana_task_manager_8.3.2_001], this action is granted by the index privileges [create_index,manage,all]'. Retrying attempt 3 in 8 seconds.
[2022-07-08T17:21:34.313+05:30][INFO ][savedobjects-service] [.kibana_task_manager] CREATE_NEW_TARGET -> CREATE_NEW_TARGET. took: 4035ms.
[2022-07-08T17:21:34.321+05:30][ERROR][savedobjects-service] [.kibana] Action failed with 'security_exception: [security_exception] Reason: action [indices:admin/create] is unauthorized for user [kunal] with roles [monitoring,network,admins,demorole] on restricted indices [.kibana_8.3.2_001], this action is granted by the index privileges [create_index,manage,all]'. Retrying attempt 3 in 8 seconds.

请找到我的弹性搜索文件: 角色.yml

# The default roles file is empty as the preferred method of defining roles is
# through the API/UI. File based roles are useful in error scenarios when the
# API based roles may not be available.
admins:
  cluster:
    - all
  indices:
    - names:
        - "*"
      privileges:
        - all
devs:
  cluster:
    - manage
  indices:
    - names:
        - "*"
      privileges:
        - write
        - delete
        - create_index

users_roles 文件

monitoring:kunal
network:kunal
admins:kunal

我使用 kibana 的用户 kunal 进行身份验证。

我无法弄清楚这里的权限错误是什么,因为对于 admins 用户,我已经授予了所有权限。

elasticsearch kibana
2个回答
0
投票

Tldr;

删除

kibana.index
文件中的
kibana.yml

解决

我觉得您已经修改了内部 kibana 索引的默认名称。 默认情况下它是

.kibana
但你的是
.kibana_task_manager_8.3.2_001

这让我相信。

  1. 您正在使用 v
    8.3.2
  2. 您更改
    kibana.index
    设置

但这已被弃用。 [文档]

您也有谈论此问题

免责声明:

我还没见过你

kibana.yml
文件。


0
投票

请检查您的...lasticsearch-8.3。

© www.soinside.com 2019 - 2024. All rights reserved.