![](/img/trans.png)
[英]kibana opendistro can't connect to ElasticSearch open distro container on Docker
[英]Open Distro Elasticsearch - Authenticate to Kibana with JWT
我可以使用基本身份驗證(使用內部用戶數據庫)運行開放發行版,現在我需要使用JWT令牌對Kibana儀表板進行身份驗證。
Elasticsearch配置:
basic_internal_auth_domain:
http_enabled: false
transport_enabled: true
order: 4
http_authenticator:
type: basic
challenge: true
authentication_backend:
type: intern
proxy_auth_domain:
http_enabled: false
transport_enabled: false
order: 3
http_authenticator:
type: proxy
challenge: false
config:
user_header: "x-proxy-user"
roles_header: "x-proxy-roles"
authentication_backend:
type: noop
jwt_auth_domain:
enabled: true
http_enabled: true
transport_enabled: true
order: 0
http_authenticator:
type: jwt
challenge: false
config:
signing_key: "EdzdXd5weiuSVFyddfjhjhfjjchJGRrZmpkayZPUA=="
jwt_header: "Authorization"
jwt_url_parameter: "token"
roles_key: "roles"
subject_key: "sub"
authentication_backend:
type: noop
Kibana配置:
server.name: kibana
server.port: 5601
server.host: "127.0.0.1"
elasticsearch.url: https://127.0.0.1:9200
elasticsearch.ssl.verificationMode: none
elasticsearch.username: kibanaserver
elasticsearch.password: kibanaserver
elasticsearch.requestHeadersWhitelist: ["securitytenant","Authorization"]
opendistro_security.auth.type: "jwt"
opendistro_security.jwt.url_param: token
opendistro_security.multitenancy.enabled: true
opendistro_security.multitenancy.tenants.preferred: ["Private", "Global"]
opendistro_security.readonly_mode.roles: ["kibana_read_only"]
在此之后,當我打開http:// localhost:5601?token = dfkhdfjdfhdjfhdhfkhdjfhjdhfjdhffdjhfdjhf時 ,auth失敗, elasticsearch日志顯示此消息 -
[caoshHTTPBasicAuthenticator] [node-1]沒有'基本授權'標題,發送401和'WWW-Authenticate Basic'
我已經完全按照文檔進行了操作,但現在互聯網上的資料非常少,我認為它仍然處於大多數人的POC階段。 有什么建議么?
那些正在尋找答案的人 - 我的JWT令牌是錯誤的,請確保根據您的服務器時間而不是當地時間配置“iat”,“nbf”和“exp”。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.