gpt4 book ai didi

elasticsearch - Open Distro Elasticsearch-使用JWT向Kibana进行身份验证

转载 作者:行者123 更新时间:2023-12-02 23:53:26 25 4
gpt4 key购买 nike

我可以使用基本身份验证(使用内部用户数据库)运行开放发行版,现在我需要使用JWT token 对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时,身份验证失败,elasticsearch日志显示此消息-

[c.a.o.s.h.HTTPBasicAuthenticator] [node-1] No 'Basic Authorization' header, send 401 and 'WWW-Authenticate Basic'



我已经仔细阅读了文档,但是现在互联网上的资料很少,对于我猜的大多数人来说,它仍处于POC阶段。有什么建议么?

最佳答案

那些正在寻找答案的人-我的JWT token 错误,请确保您根据服务器时间而非本地时间配置“iat”,“nbf”和“exp”。

关于elasticsearch - Open Distro Elasticsearch-使用JWT向Kibana进行身份验证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55867183/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com