0

我正在尝试在 ES 5.6.3 中实现 search-guard-5-5.6.3-

在执行时

./sgadmin_demo.sh 

我明白了

WARNING: JAVA_HOME not set, will use /usr/bin/java
Search Guard Admin v5
Will connect to localhost:9300 ... done

### LICENSE NOTICE Search Guard ###

If you use one or more of the following features in production
make sure you have a valid Search Guard license
(See https://floragunn.com/searchguard-validate-license)

* Kibana Multitenancy
* LDAP authentication/authorization
* Active Directory authentication/authorization
* REST Management API
* JSON Web Token (JWT) authentication/authorization
* Kerberos authentication/authorization
* Document- and Fieldlevel Security (DLS/FLS)
* Auditlogging

In case of any doubt mail to <sales@floragunn.com>
###################################
Contacting elasticsearch cluster 'searchguard_demo' and wait for YELLOW         clusterstate ...
Clustername: searchguard_demo
Clusterstate: YELLOW
Number of nodes: 1
Number of data nodes: 1
searchguard index already exists, so we do not need to create one.
Populate config from /app/elasticsearch-5.6.3/plugins/search-guard-    5/sgconfig/
Will update 'config' with /app/elasticsearch-5.6.3/plugins/search-guard-5/sgconfig/sg_config.yml
SUCC: Configuration for 'config' created or updated
Will update 'roles' with /app/elasticsearch-5.6.3/plugins/search-guard-5/sgconfig/sg_roles.yml
SUCC: Configuration for 'roles' created or updated
Will update 'rolesmapping' with /app/elasticsearch-5.6.3/plugins/search-guard-5/sgconfig/sg_roles_mapping.yml
SUCC: Configuration for 'rolesmapping' created or updated
Will update 'internalusers' with /app/elasticsearch-5.6.3/plugins/search-guard-5/sgconfig/sg_internal_users.yml
SUCC: Configuration for 'internalusers' created or updated
Will update 'actiongroups' with /app/elasticsearch-5.6.3/plugins/search-    guard-5/sgconfig/sg_action_groups.yml
SUCC: Configuration for 'actiongroups' created or updated
Done with success

并在发泄的同时

$ curl --insecure -u admin:admin 'localhost:9200/_searchguard/authinfo?pretty' 

我收到以下错误

curl: (52) Empty reply from server

在 ES 日志中它说:

[2017-11-07T18:27:06,684][WARN ][c.f.s.h.SearchGuardHttpServerTransport] 
[aN2lbPk] Someone (/127.0.0.1:44850) speaks http plaintext instead of ssl, 
will close the channel

有没有我可能需要研究的配置?

4

1 回答 1

3

您需要通过 HTTPS(不是 HTTP)进行连接,这就是为什么您会看到“有人 (/127.0.0.1:44850) 使用 http 纯文本而不是 ssl”日志条目的原因。

所以试试

$ curl --insecure -u admin:admin 'https://localhost:9200/_searchguard/authinfo?pretty'

--insecure 标志仅与 HTTPS 一起有意义

于 2017-11-27T14:33:06.490 回答