![](/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.