Kibana匿名访问
文章目录
一、配置
1.修改kibana.yml配置文件
vim /etc/kibana/kibana.yml
追加以下内容:
xpack.security.authc.providers:
basic.basic1:
order: 0
anonymous.anonymous1:
order: 1
credentials:
username: "anonymous"
password: "anonymous"
2.新增匿名用户和角色
新增匿名用户和角色,并将二者关联
二、页面集成
1.iframe嵌套(适用于Dashboards)
- Open the main menu, then click Dashboard or Visualize Library.
- Open the dashboard or visualization you want to embed.
- To generate the HTML code snippet, open the Share menu, then click Embed code > Copy iFrame code.
You can embed this snippet in your web page, and then add analysis, images, and links to give more context to the object you’re sharing.
<iframe src="https://localhost:5601/app/monitoring?auth_provider_hint=anonymous1#/elasticsearch/nodes?embed=true&_g=(....)" height="600" width="800"></iframe>
2.直接调整至链接(适用于日志流)
http://localhost:5601/app/logs/stream?flyoutOptions=(flyoutId:!n,flyoutVisibility:hidden,surroundingLogsId:!n)
三、匿名访问
1.直接以匿名用户方式访问
http://localhost:5601/app/logs/stream?auth_provider_hint=anonymous1&flyoutOptions=(flyoutId:!n,flyoutVisibility:hidden,surroundingLogsId:!n)
2.由用户选择是否采用匿名方式访问
http://localhost:5601/app/logs/stream?flyoutOptions=(flyoutId:!n,flyoutVisibility:hidden,surroundingLogsId:!n)
参考:
elasticsearch anonymous-access