Я изменил config/elasticsearch.yml
на
xpack.security.enabled: true
А теперь после запуска эластичного поиска (./bin/elasticsearch
) и затем выполните:
curl localhost:9200
получение:
{"error":{"root_cause":[{"type":"security_exception","reason":"missing authentication credentials for REST request [/]","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}}],"type":"security_exception","reason":"missing authentication credentials for REST request [/]","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}},"status":401}
Затем попробовал эти 2:
curl localhost:9200 -u elastic:elastic
curl localhost:9200 -u elastic:changeme
получать:
{"error":{"root_cause":[{"type":"security_exception","reason":"failed to authenticate user [elastic]",
"header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}}], "type":"security_exception", "reason":"failed to authenticate user [elastic]","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}},"status":401}%
Какое имя пользователя / пароль по умолчанию для Elasticsearch 7.2.0?