When asking questions, please provide the following information:
* Search Guard and Elasticsearch version 6.0.0
* Installed and used enterprise modules, if any No
* JVM version and operating system version 1.7
* Search Guard configuration files
* Elasticsearch log messages on debug level
* Other installed Elasticsearch or Kibana plugins, if any
Hi,
I am using searchguard 6. And from java side I have implemented below configuration.
Settings settings = Settings.builder()
.put(SSLConfigConstants.SEARCHGUARD_SSL_TRANSPORT_PEMCERT_FILEPATH,"C:\\Users\\c-ajitb\\Desktop\\SearchguardFiles\\esnode.pem")
.put(SSLConfigConstants.SEARCHGUARD_SSL_TRANSPORT_PEMKEY_FILEPATH, "C:\\Users\\c-ajitb\\Desktop\\SearchguardFiles\\esnode-key.pem")
.put(SSLConfigConstants.SEARCHGUARD_SSL_TRANSPORT_PEMTRUSTEDCAS_FILEPATH, "C:\\Users\\c-ajitb\\Desktop\\SearchguardFiles\\root-ca.pem")
.put(SSLConfigConstants.SEARCHGUARD_SSL_TRANSPORT_ENFORCE_HOSTNAME_VERIFICATION, "false")
.put(SSLConfigConstants.SEARCHGUARD_SSL_HTTP_ENABLED, "true")
.put(SSLConfigConstants.SEARCHGUARD_SSL_HTTP_PEMCERT_FILEPATH, "C:\\Users\\c-ajitb\\Desktop\\SearchguardFiles\\esnode.pem")
.put(SSLConfigConstants.SEARCHGUARD_SSL_HTTP_PEMKEY_FILEPATH, "C:\\Users\\c-ajitb\\Desktop\\SearchguardFiles\\esnode-key.pem")
.put(SSLConfigConstants.SEARCHGUARD_SSL_HTTP_PEMTRUSTEDCAS_FILEPATH, "C:\\Users\\c-ajitb\\Desktop\\SearchguardFiles\\root-ca.pem")
TransportClient transclient = new PreBuiltTransportClient(settings,SearchGuardSSLPlugin.class).addTransportAddress(new TransportAddress(InetAddress.getByName("172.21.153.176"), 9300));
transclient.threadPool().getThreadContext().putHeader("Authorization", "Basic "+Base64.getEncoder().encodeToString("admin:admin".getBytes()));
GetResponse getResponse = transclient.prepareGet("testindex", "testtype", "1").get();
System.out.println("Response="+getResponse.getSource());
But I am getting below exception.
ElasticsearchSecurityException[No user found for indices:data/read/get]
I have given admin credentials.
Please reply and provide solution.
Thanks,
Ajit