gpt4 book ai didi

elasticsearch - 如何在 Elasticsearch 中授权请求?

转载 作者:行者123 更新时间:2023-12-03 01:26:35 26 4
gpt4 key购买 nike

我正在尝试发送任何请求以在 Elasticsearch 中获取我的数据。我正在使用 Elasticsearch 和 kibana 运行 docker。

我访问弹性的网址是:http:192.168.1.102:9200 , 我的凭证是 username: 'elastic ',password: MagicWord
我尝试使用 passorwd 和用户名发出请求:http://elastic.Magic@ 192.168.1.102:9200/storedevent ,但它不起作用。

我需要一个 token 来访问 postman 的弹性吗?

打印:

401Unauthorized

错误:

{
"error": {
"root_cause": [
{
"type": "security_exception",
"reason": "missing authentication credentials for REST request [/storedevent]",
"header": {
"WWW-Authenticate": "Basic realm=\"security\" charset=\"UTF-8\""
}
}
],
"type": "security_exception",
"reason": "missing authentication credentials for REST request [/storedevent]",
"header": {
"WWW-Authenticate": "Basic realm=\"security\" charset=\"UTF-8\""
}
},
"status": 401
}

最佳答案

在 postman 中,您需要在 Basic Auth 而不是 url 中传递凭据。 enter image description here

关于elasticsearch - 如何在 Elasticsearch 中授权请求?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58018209/

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