简体   繁体   English

如何向 Elastic Transport Client 添加身份验证

[英]How to add authentication to Elastic Transport Client

How to add authentication to elastic transport client.如何向弹性传输客户端添加身份验证。 Are there any opensource authentication plugins for elastic search.是否有任何用于弹性搜索的开源身份验证插件。 I tried with readonlyrest and searchguard but both of them did not satisfy my requirement.我尝试使用 readonlyrest 和 searchguard,但它们都不满足我的要求。

To use transport level authentication with Search Guard do:要将传输级别身份验证与 Search Guard 一起使用,请执行以下操作:

  • Set up a transport client, and configure it to use a client certificate when talking to Elasticsearch设置传输客户端,并将其配置为在与 Elasticsearch 通信时使用客户端证书
  • Configure the Distinguished Name of the certificate as a Search Guard user.将证书的可分辨名称配置为 Search Guard 用户。 This user does not need any login credentials or roles since it is already identified by its certificate此用户不需要任何登录凭据或角色,因为它已由其证书标识
  • Send a Basic Authentication header with each request.随每个请求发送一个基本身份验证标头。 This header contains the username and password and want to use for this request此标头包含用户名和密码,并希望用于此请求
  • Search Guard will apply all security checks for the provided credentials, as if they would have been provided on the REST level Search Guard 将对提供的凭据应用所有安全检查,就好像它们是在 REST 级别上提供的一样
  • This means you can implement access control based on indices and types, and also apply document- and field-level security on the transport level.这意味着您可以根据索引和类型实施访问控制,还可以在传输级别应用文档级和字段级安全性。

See also https://floragunn.com/transport-client-authentication-authorization/另见https://floragunn.com/transport-client-authentication-authorization/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM