Kibana匿名訪問

一、配置

1. 修改kibana.yml配置文件

vi /config/kibana.yml

追加以下內容:

xpack.security.authc.providers:
  basic.basic1:
    order: 0
  anonymous.anonymous1:
    order: 1
    credentials:
      username: "anonymous"
      password: "anonymous"

2. 新增匿名用戶和角色

新增匿名用戶和角色,並將二者關聯

image

image

二、頁面集成

1. iframe​ 嵌套(適用於Dashboards)

  1. Open the main menu, then click Dashboard or Visualize Library.
  2. Open the dashboard or visualization you want to embed.
  3. 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.

image

<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)

image

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章