使用传输客户端的安全连接 [英] Secure connection using transport client

查看:48
本文介绍了使用传输客户端的安全连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

需要使用Java代码中的传输客户端连接到具有https身份验证的安全弹性搜索.我有要连接的userId和密码,但是需要有关如何执行此操作的示例?我正在使用Elasticsearch 5.6.0.

Need to connect to a secure elastic search which has https authentication using Transport client in java code. I have userId and password to connect however need example on how can we do it? I am using elasticsearch 5.6.0.

我一直在寻找xpack和sheild选项,但无法使用它们.

I was looking for xpack and sheild options but could not make use of them.

推荐答案

我使用了PreBuiltXpackTransportClient,并且可以连接到安全的弹性搜索服务器.请在此处参阅文档.

I used PreBuiltXpackTransportClient and could connect to the secured elastic search server. Refer documentation here.

这篇关于使用传输客户端的安全连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆